-
Notifications
You must be signed in to change notification settings - Fork 178
Enhance doc and error message handling for bins on time-related fields
#4713
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
base: main
Are you sure you want to change the base?
Conversation
4977779 to
3a75657
Compare
bins on time-related fieldsbins on time-related fields
|
unit tests in CI seems flaky |
|
|
||
| // Create validated binnable field (validates that field is numeric or time-based) | ||
| // Note: bins parameter works with both numeric and time-based fields | ||
| // Note: bins parameter on time-based fields requires pushdown to be enabled |
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: Describe the default behavior and the configuration that controls pushdown.
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.
Updated comments and documentation
| "Expected clear error message about bins parameter not supported on timestamp fields when " | ||
| + "pushdown is disabled, but got: " | ||
| + errorMessage, | ||
| errorMessage.contains( |
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.
Although we enabled push down, we still don't support query like source=events_null | bin @timestamp bins=3.
Shall we call out that it's also required to be used as the aggregation bucket field?
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.
Updated comments and documentation
…d fields with pushdown disabled Signed-off-by: Kai Huang <[email protected]>
Signed-off-by: Kai Huang <[email protected]>
Signed-off-by: Kai Huang <[email protected]>
Signed-off-by: Kai Huang <[email protected]>
Signed-off-by: Kai Huang <[email protected]>
| && errorMsg.contains("Error while preparing plan") | ||
| && errorMsg.contains("WIDTH_BUCKET")) { | ||
| throw new UnsupportedOperationException( | ||
| "The 'bins' parameter on timestamp fields is not supported when pushdown is" |
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 think we should change error message as well.
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.
Updated error message
Signed-off-by: Kai Huang <[email protected]>
Description
Summary
This PR adds clear error handling and documentation for the known limitation that the bins parameter on timestamp fields requires pushdown to be enabled.
Related Issues
bincommand fails with param bins on time-related fields #4578