Skip to content
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

feat: allow naming/aliasing relations #649

Merged
merged 4 commits into from
Jul 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions proto/substrait/algebra.proto
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ message RelCommon {
Hint hint = 3;
substrait.extensions.AdvancedExtension advanced_extension = 4;

// Optional name (alias) for this relation, if provided, should be unique across the root.
// Safe to ignore, or can be used for qualifying the relation or debugging.
// Repeated to allow for multiple levels of naming, e.g. catalog/schema/table
repeated string rel_names = 5;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an alias for the relation? Or for the fields in the relation? If it is an alias for the relation should this maybe just be repeated string alias = 5;?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alias for the relation. Yeah, naming is hard 😅 I tried to align with the "names" in ReadTable rel, but yes I'd be happy with just "alias".


// Direct indicates no change on presence and ordering of fields in the output
message Direct {}

Expand Down
Loading