protected ConditionExpression toCondition(ValueNode condition,List<ExpressionNode> projects) throws StandardException {
  List<ConditionExpression> conditions=new ArrayList<>(1);
  addCondition(conditions,condition,projects);
switch (conditions.size()) {
case 0:
    return new BooleanConstantExpression(Boolean.TRUE);
case 1:
  return conditions.get(0);
case 2:
TInstance type=typesTranslator.typeForSQLType(condition.getType());
return new LogicalFunctionCondition("and",conditions,condition.getType(),condition,type);
default :
{
ConditionExpression rhs=null;
for (ConditionExpression lhs : conditions) {
rhs=andConditions(rhs,lhs);
}
return rhs;
}
}
}

protected ConditionExpression toCondition ( ValueNode condition , List < ExpressionNode > projects ) throws StandardException { List < ConditionExpression > conditions = new ArrayList < > ( 1 ) ; addCondition ( conditions , condition , projects ) ; switch ( conditions . size ( ) ) { case 0 : return new BooleanConstantExpression ( Boolean . TRUE ) ; case 1 : return conditions . get ( 0 ) ; case 2 : TInstance type = typesTranslator . typeForSQLType ( condition . getType ( ) ) ; return new LogicalFunctionCondition ( "and" , conditions , condition . getType ( ) , condition , type ) ; default : { ConditionExpression rhs = null ; for ( ConditionExpression lhs : conditions ) { rhs = andConditions ( rhs , lhs ) ; } return rhs ; } } }
get given condition as a single node .
