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

Clean up IR Subscript #21217

Merged
merged 2 commits into from
Mar 23, 2024
Merged

Clean up IR Subscript #21217

merged 2 commits into from
Mar 23, 2024

Conversation

martint
Copy link
Member

@martint martint commented Mar 23, 2024

Rename to FieldReference and make the field an integer instead of an IR expression.

This node is only relevant for expression of Row type, and the field is known at construction time.

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.

@cla-bot cla-bot bot added the cla-signed label Mar 23, 2024
@github-actions github-actions bot added tests:hive iceberg Iceberg connector delta-lake Delta Lake connector hive Hive connector mongodb MongoDB connector labels Mar 23, 2024
@@ -883,36 +880,20 @@ protected Object visitRow(Row node, Object context)
}

@Override
protected Object visitSubscript(Subscript node, Object context)
protected Object visitSubscript(FieldReference node, Object context)
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this method be renamed to visitFieldDereference ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, good catch

martint added 2 commits March 23, 2024 15:46
It only applies to expressions of Row type
It's a fixed compile-time value, so it's unnecessary
to represent it as an arbitrary Expression. That's a
vestige from when it used to be named Subscript and
represented array accesses, too.
@martint martint merged commit b833968 into trinodb:master Mar 23, 2024
93 of 94 checks passed
@martint martint deleted the ir-subscript branch March 23, 2024 23:55
@github-actions github-actions bot added this to the 444 milestone Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed delta-lake Delta Lake connector hive Hive connector iceberg Iceberg connector mongodb MongoDB connector
Development

Successfully merging this pull request may close these issues.

3 participants