In general these identifiers can represent either subexpressions  of the 
expressions in the original program, or even new expressions that do not appear 
in the program (e.g., when stddev is expanded), so there many be no column name 
associated with an expression.

Mihai
________________________________
From: He, Guanlin <gbh5...@psu.edu>
Sent: Monday, September 23, 2024 10:02 AM
To: dev@calcite.apache.org <dev@calcite.apache.org>
Subject: Question regarding calcite logical algebra's ordinal place holder

Hi developers of calcite.

I am wondering if there is a way to change the ordinal in RelNode's relational 
algebra into the field name.

For example if I have logical planning like:
LogicalProject(name=[$1])
  LogicalJoin(condition=[=($0, $6)], joinType=[inner])

How could I change back into: and only output logcal algebra string.

LogicalProject(name=[student.name])
  LogicalJoin(condition=[=(student.id, section.id)], joinType=[inner])

I am currently iterating through relNode and fill exps by their rowType but 
this method is really mess and need alot of pre condition ( for example, case 
join and case agg). I am wondering if there is a easy way that I dont know 
could do that.

Best,
Guanllin He



Reply via email to