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

[CALCITE-6340] RelBuilder drops traits when aggregating over duplicate projected fields #3757

Merged

Conversation

jduo
Copy link
Member

@jduo jduo commented Apr 11, 2024

Calculate the post-pruning RelTraitSet on the projection using TraitSet#apply(Mapping)

@jduo jduo force-pushed the calcite-6340-relbuilder-project-prune branch 6 times, most recently from 6f4a096 to 617bfa0 Compare April 12, 2024 17:13
Copy link
Member

@asolimando asolimando left a 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

@jduo jduo changed the title [CALCITE-6340] RelBuilder always creates Project with Convention.NONE during aggregate_ [CALCITE-6340] RelBuilder drops set conventions when aggregating over duplicate projected fields Apr 18, 2024
Copy link
Member

@asolimando asolimando left a 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

Copy link
Member

@asolimando asolimando left a 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

@jduo
Copy link
Member Author

jduo commented May 9, 2024

@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).

@jduo jduo force-pushed the calcite-6340-relbuilder-project-prune branch from 1b8dbec to da2a597 Compare May 9, 2024 20:43
Copy link
Member

@asolimando asolimando left a 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.

@jduo
Copy link
Member Author

jduo commented May 15, 2024

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?

@asolimando
Copy link
Member

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.

Copy link
Member

@asolimando asolimando left a 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.

@asolimando asolimando added the LGTM-will-merge-soon Overall PR looks OK. Only minor things left. label May 16, 2024
@jduo jduo changed the title [CALCITE-6340] RelBuilder drops set conventions when aggregating over duplicate projected fields [CALCITE-6340] RelBuilder drops traits when aggregating over duplicate projected fields May 16, 2024
…e projected fields

Calculate the post-pruning RelTraitSet on the projection using TraitSet#apply(Mapping)

Co-authored-by: Alessandro Solimando <alessandro.solimando@gmail.com>
@jduo jduo force-pushed the calcite-6340-relbuilder-project-prune branch 2 times, most recently from 8960442 to 0b2fd0b Compare May 16, 2024 20:27
@jduo
Copy link
Member Author

jduo commented May 16, 2024

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.

Thanks @asolimando . I've squashed and updated the title.

Copy link

sonarcloud bot commented May 16, 2024

@asolimando asolimando merged commit 327bfcc into apache:main May 20, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LGTM-will-merge-soon Overall PR looks OK. Only minor things left.
Projects
None yet
3 participants