You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Justin Swett (Jira)" <ji...@apache.org> on 2020/03/25 18:10:00 UTC
[jira] [Created] (CALCITE-3875) Create visitor to emit java code
that would reproduce the visited rel
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)