-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[ES|QL] Consider min/max from predicates when transform date_trunc/bucket to round_to option 2 #132143
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
[ES|QL] Consider min/max from predicates when transform date_trunc/bucket to round_to option 2 #132143
Conversation
Hi @fang-xing-esql, I've created a changelog YAML for you. |
Pinging @elastic/es-analytical-engine (Team:Analytics) |
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
I think this is the better approach than the one of LocalSurrogateExpression. The code is easier to read/follow and the logic makes more sense like this. Thank you!
Thanks a lot for reviewing @astefan ! |
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.
Progress!
I think it'd be nice to have the rule be pluggable in some way - there are other things we're going to do this with. But let's do that when have another one or two.
This is the second option to implement considering
min
/max
from predicates when transformdate_trunc
/bucket
toround_to
. Instead of doing the transformation within each function by implementingLocalSurrogateExpression
#131341 , this approach create a dedicated rule to transformdate_trunc
/bucket
toround_to
.