public static OjaiFunctionsProcessor process(FunctionCall call) { final OjaiFunctionsProcessor processor = new OjaiFunctionsProcessor(); call.accept(processor, null); return processor; }
public static OjaiFunctionsProcessor process(FunctionCall call) { final OjaiFunctionsProcessor processor = new OjaiFunctionsProcessor(); call.accept(processor, null); return processor; }
@Override public HoldingContainer visitAnyValueExpression(AnyValueExpression e, ClassGenerator<?> value) throws RuntimeException { List<LogicalExpression> newArgs = Lists.newArrayList(); newArgs.add(e.getInput()); // input_expr FunctionCall fc = new FunctionCall(AnyValueExpression.ANY_VALUE, newArgs, e.getPosition()); return fc.accept(this, value); }
@Override public LogicalExpression visitConvertExpression(ConvertExpression e, FunctionLookupContext functionLookupContext) { String convertFunctionName = e.getConvertFunction() + e.getEncodingType(); List<LogicalExpression> newArgs = Lists.newArrayList(); newArgs.add(e.getInput()); //input_expr FunctionCall fc = new FunctionCall(convertFunctionName, newArgs, e.getPosition()); return fc.accept(this, functionLookupContext); }
@Override public HoldingContainer visitConvertExpression(ConvertExpression e, ClassGenerator<?> value) throws RuntimeException { String convertFunctionName = e.getConvertFunction() + e.getEncodingType(); List<LogicalExpression> newArgs = Lists.newArrayList(); newArgs.add(e.getInput()); // input_expr FunctionCall fc = new FunctionCall(convertFunctionName, newArgs, e.getPosition()); return fc.accept(this, value); }
errorCollector = new ErrorCollectorImpl(); LogicalExpression thenExpression = new FunctionCall(call.getName(), newArgs, call.getPosition()).accept(this, functionLookupContext);
return fc.accept(this, functionLookupContext);