ImmutableList.<Type>of(ExecutableExpression.class), declarations); return Expressions.toString(Lists.newArrayList(classDeclaration), "\n", false);
/** * Converts an expression to Java source code. */ public static String toString(Node expression) { return toString(Collections.singletonList(expression), "", true); }
String s = Expressions.toString(declarations, "\n", false);
String s = Expressions.toString(declarations, "\n", false);
ImmutableList.<Type>of(ExecutableExpression.class), declarations); return Expressions.toString(Lists.newArrayList(classDeclaration), "\n", false);
Expressions.classDecl(Modifier.PUBLIC, "Buzz", null, ImmutableList.of(Scalar.class), declarations); String s = Expressions.toString(declarations, "\n", false); if (CalcitePrepareImpl.DEBUG) { Util.debugCode(System.out, s);
Expressions.classDecl(Modifier.PUBLIC, "Buzz", null, ImmutableList.of(Scalar.class), declarations); String s = Expressions.toString(declarations, "\n", false); if (CalcitePrepareImpl.DEBUG) { Util.debugCode(System.out, s);
BuiltInMethod.FUNCTION1_APPLY.method.getName(), ImmutableList.of(root0_), blockBuilder.toBlock()); String code = Expressions.toString(methodDecl); if (CalcitePrepareImpl.DEBUG) { Util.debugCode(System.out, code);
BuiltInMethod.FUNCTION1_APPLY.method.getName(), ImmutableList.of(root0_), blockBuilder.toBlock()); String code = Expressions.toString(methodDecl); if (CalcitePrepareImpl.DEBUG) { Util.debugCode(System.out, code);
public static Bindable toBindable(Map<String, Object> parameters, CalcitePrepare.SparkHandler spark, EnumerableRel rel, EnumerableRel.Prefer prefer) { EnumerableRelImplementor relImplementor = new EnumerableRelImplementor(rel.getCluster().getRexBuilder(), parameters); final ClassDeclaration expr = relImplementor.implementRoot(rel, prefer); String s = Expressions.toString(expr.memberDeclarations, "\n", false); if (CalcitePrepareImpl.DEBUG) { Util.debugCode(System.out, s); } Hook.JAVA_PLAN.run(s); try { if (spark != null && spark.enabled()) { return spark.compile(expr, s); } else { return getBindable(expr, s, rel.getRowType().getFieldCount()); } } catch (Exception e) { throw Helper.INSTANCE.wrap("Error while compiling generated Java code:\n" + s, e); } }
public static Bindable toBindable(Map<String, Object> parameters, CalcitePrepare.SparkHandler spark, EnumerableRel rel, EnumerableRel.Prefer prefer) { EnumerableRelImplementor relImplementor = new EnumerableRelImplementor(rel.getCluster().getRexBuilder(), parameters); final ClassDeclaration expr = relImplementor.implementRoot(rel, prefer); String s = Expressions.toString(expr.memberDeclarations, "\n", false); if (CalcitePrepareImpl.DEBUG) { Util.debugCode(System.out, s); } Hook.JAVA_PLAN.run(s); try { if (spark != null && spark.enabled()) { return spark.compile(expr, s); } else { return getBindable(expr, s, rel.getRowType().getFieldCount()); } } catch (Exception e) { throw Helper.INSTANCE.wrap("Error while compiling generated Java code:\n" + s, e); } }