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
[CALCITE-6340] RelBuilder drops traits when aggregating over duplicate projected fields #3757
[CALCITE-6340] RelBuilder drops traits when aggregating over duplicate projected fields #3757
Conversation
6f4a096
to
617bfa0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jduo overall LGTM but there are a couple of changes I'd like you to make before getting this in, please take a look
core/src/main/java/org/apache/calcite/plan/RelCompositeTrait.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few modifications as described in the unresolved comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jduo, I have made some modifications to the PR in this commit, can you take a look?
I have added a conditional check on the results based on the status of the ticket you filed (as it's customary in Calcite), and I have also refined some tests and added few more
EDIT: finally it seems that all traits are dropped by this bug, so I suggest to rename the jira ticket as "[CALCITE-6340] RelBuilder drops traits when aggregating over duplicate projected fields" and update it in the final commit (when you will be squashing after getting approval) and wherever it is referenced in the code
I think the changes proposed are mostly OK, but the Bug entry should be for the new ticket (6391) instead of this one (6340). |
1b8dbec
to
da2a597
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few more minor changes and for me we are good to go.
Please don't force-push until the review process is on-going as it makes incremental reviewing more difficult.
In this case I force-pushed because there was a merge conflict against the head. Would it be preferred if I waited for the review to finish before dealing with these? |
Unless for cases in which this is breaking CI then it's indeed preferable for the review process to be over. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @jduo for taking care of the comments, can you squash the commits into a single one and make sure the commit message matches exactly the title of the Jira ticket preceded by [CALCITE-6340]
(you can check the guidelines here if you are in doubt).
After that, I will wait for a couple more days in case someone has further comments, then I will merge.
…e projected fields Calculate the post-pruning RelTraitSet on the projection using TraitSet#apply(Mapping) Co-authored-by: Alessandro Solimando <alessandro.solimando@gmail.com>
8960442
to
0b2fd0b
Compare
Thanks @asolimando . I've squashed and updated the title. |
Quality Gate passedIssues Measures |
Calculate the post-pruning RelTraitSet on the projection using TraitSet#apply(Mapping)