Are you interested in changing (1) how field references are represented in RelNodes, (2) how field references are printed in plans, (3) how references to fields are created when you are building a tree of RelNodes.
(1) would be a huge disruptive change (and require us to decide what to do when field names are not unique); (2) is straightforward - you can write your own printer; (3) is already solved by RelBuilder. Julian PS Your message went through moderation. You should subscribe to the dev@ list in so that you receive timely replies, and we are saved the effort of moderation. > On Sep 23, 2024, at 10:02 AM, He, Guanlin <gbh5...@psu.edu> wrote: > > 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 > > >