public static LogicalExpression createBooleanOperator(String functionName, List<LogicalExpression> args){ return createBooleanOperator(functionName, ExpressionPosition.UNKNOWN, args); }
((OrExprContext)_localctx).e = exprs.get(0); }else{ ((OrExprContext)_localctx).e = FunctionCallFactory.createBooleanOperator("or", p, exprs);
((AndExprContext)_localctx).e = exprs.get(0); }else{ ((AndExprContext)_localctx).e = FunctionCallFactory.createBooleanOperator("and", p, exprs);
public static LogicalExpression createBooleanOperator(String functionName, List<LogicalExpression> args){ return createBooleanOperator(functionName, ExpressionPosition.UNKNOWN, args); }
private LogicalExpression doFunction(RexCall call, String funcName) { List<LogicalExpression> args = Lists.newArrayList(); for(RexNode r : call.getOperands()){ args.add(r.accept(this)); } if (FunctionCallFactory.isBooleanOperator(funcName)) { LogicalExpression func = FunctionCallFactory.createBooleanOperator(funcName, args); return func; } else { args = Lists.reverse(args); LogicalExpression lastArg = args.get(0); for(int i = 1; i < args.size(); i++){ lastArg = FunctionCallFactory.createExpression(funcName, Lists.newArrayList(args.get(i), lastArg)); } return lastArg; } } private LogicalExpression doUnknown(RexNode o){
((AndExprContext)_localctx).e = exprs.get(0); }else{ ((AndExprContext)_localctx).e = FunctionCallFactory.createBooleanOperator("and", p, exprs);
((OrExprContext)_localctx).e = exprs.get(0); }else{ ((OrExprContext)_localctx).e = FunctionCallFactory.createBooleanOperator("or", p, exprs);