Justin Swett created CALCITE-3875: ------------------------------------- Summary: Create visitor to emit java code that would reproduce the visited rel Key: CALCITE-3875 URL: https://issues.apache.org/jira/browse/CALCITE-3875 Project: Calcite Issue Type: New Feature Affects Versions: 1.22.0 Reporter: Justin Swett
It would be nice to have a visitor that would emit java code that could be used to reproduce the visited rel node, e.g. Something like: {code:java} ... String javaCode = RelOptUtil.toCode( myComplicatedRel ); println(javaCode); // outputs something final RelBuilder builder = relBuilder(); final RelNode root = builder .scan("EMP") .aggregate(builder.groupKey(), builder.aggregateCall(SqlStdOperatorTable.SUM0, false, false, null, "s", builder.field(3))) .build(); {code} This could be useful setting up reproducible test cases that are somewhat tricky to recreate in the wild. -- This message was sent by Atlassian Jira (v8.3.4#803005)