Hello dev community,
    Long calcite plans are very hard to debug sometimes because of our
filter, aggregate expressions involve InputReferences which are hard to
quickly follow down the tree.

eg ->  JoinRel(condition=[=($0, $2)], joinType=[inner])
Filter  ( condition=[$0 = 100])
AggregateRel(group=[{0}], sun_sales=[SUM($1)], mon_sales=[SUM($2)]

Better Plans ->
JoinRel( condition=[(tableName1.columnName, tableName2.columnName2)] )
...

I can override RelMdExpressionLineage for this use case for RexNodes like
for Joins and Filters but AggregateCalls cannot be handled properly by this
relMd.
    Is there any existing functionality that I missed that already has the
functionality for this use case or should we work on a new writer or add a
visitor internally in calcite to transform this plan into a better human
readable plan. There can also be a few more operators than need this
"readable transformation"

Warm Regards,

Jay Narale

[1]
https://github.com/apache/calcite/blob/7e0057e8de93930f1b2952a1cbcee8ad7a6bfb4b/core/src/main/java/org/apache/calcite/rel/metadata/RelMdExpressionLineage.java

Reply via email to