-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Multi-stage] Clean up unnecessary checks in rules #14066
[Multi-stage] Clean up unnecessary checks in rules #14066
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #14066 +/- ##
============================================
+ Coverage 61.75% 65.02% +3.27%
- Complexity 207 1533 +1326
============================================
Files 2436 2564 +128
Lines 133233 140692 +7459
Branches 20636 21592 +956
============================================
+ Hits 82274 91482 +9208
+ Misses 44911 42491 -2420
- Partials 6048 6719 +671
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
569292a
to
a740dc8
Compare
super(operand(Aggregate.class, | ||
some(operand(Join.class, some(operand(RelNode.class, any()), operand(Aggregate.class, any()))))), factory, | ||
null); |
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.
Nit: I would recommend to start using the new way to instantiate rules instead of this one, which is deprecated. See PinotImplicitTableHintRule in #13943.
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.
Yes, I also noticed that. PinotSortExchangeCopyRule
is also using the config in the constructor (I believe the benefit is to allow reusing the same rule to match different trees).
We can use a separate PR to clean this up.
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.
I've recently ended up reading Hive's CalcitePlanner class, which is pretty similar to our QueryEnvironment class and I think that is something we can get inspiration of once our rule logic starts to be more complex.
matches()
copy()
instead ofcreate()
if we are modifying aRelNode
to preserve the hints