-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support alias for rel #571
Comments
Thanks for creating this issue. The concept of aliases has come up in community discussions in the past but I can't find a good concrete issue for this idea. I think it would be a good idea to add aliases as an "optional extension" or an "official hint" of sorts. We have also talked in the past about having some way to annotate parts of the plan with extra information. My concern with your proposed I think something using I'm also going to CC @jacques-n who has talked about "annotations" before and I think was very close to writing up some kind of proposal / idea doc at one point in time. |
Thanks for your patience!
That's really a better idea.
Thank you for your advice. Do you mean that we can put the alias name into AdvancedExtension? By the way, the comment shows that
|
Yes
Good catch, you are right, I got it backwards. |
Same goal as in #648 - to support what Spark's and DataFusion's SubqueryAlias relation does. As Substrait mostly only referes to columns by their index, there is no inherent need for table name/qualifiers within Substrait. However, some consumers, e.g. DataFusion, require column names to be either unique or qualified for joins, which is troublesome w/o the possibility to qualify relations. Also, for debugging failed plans and for roundtrip testing of X -> Substrait -> X conversions, it would be convenient to have proper, human-readable names to refer to. Closes #571
Since substrait always use field indices to refer to fields,it may cause some problem when revert from substrait to logical plan.
Taking datafusion-6867 for example, datafusion use table+field to distinguish fields.
Without alias for rel, it can't distinguish between left input and right input in self join.
I think alias for rel is not complicated to implement and improves ease of use.
A simple design is given below.
The text was updated successfully, but these errors were encountered: