-
Notifications
You must be signed in to change notification settings - Fork 158
Fix error when pushing down script filter with struct field #3693
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
Conversation
Signed-off-by: Heng Qian <[email protected]>
Signed-off-by: Heng Qian <[email protected]>
if (LOG.isDebugEnabled()) { | ||
LOG.debug("Cannot pushdown the filter condition: {}", queryCondition, e); | ||
} else { | ||
LOG.info("Cannot pushdown the filter condition: {}, ", queryCondition); |
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.
sanitize queryCondition before logging.
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.
Do you mean anonymizing the queryCondition by using PPLQueryDataAnonymizer
?
I think, after anonymizing, we cannot get any useful information from the log. If it's not allowed to show that information in log, maybe we should remove queryCondition here directly.
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.
Or maybe only keep debug level log and keep queryCondition in debug log. Does it make sense? What's your opinion? @penghuo
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.
queryCondtion include user meta data, we should not log it. remove it
Signed-off-by: Heng Qian <[email protected]>
…tField # Conflicts: # integ-test/src/test/resources/expectedOutput/ppl/explain_patterns_agg_push.json
Signed-off-by: Heng Qian <[email protected]>
* Fix error when pushing down script filter with struct field Signed-off-by: Heng Qian <[email protected]> * Fix IT Signed-off-by: Heng Qian <[email protected]> * Address comments Signed-off-by: Heng Qian <[email protected]> * Fix IT Signed-off-by: Heng Qian <[email protected]> --------- Signed-off-by: Heng Qian <[email protected]> Signed-off-by: xinyual <[email protected]>
Description
Fix error when pushing down script filter with struct field. This bug only happens in v2 engine, since calcite engine doesn't support script pushing down currently.
It's caused by that the
FilterScript::getDoc
only provides the capability of looking up leaf node, thus it will throw exceptionNo field found for [xxx] in mapping
when using fields of struct type. We could address this issue by preventing push down script filter with fields of struct type.https://github.com/opensearch-project/OpenSearch/blob/9bca961b799625438d024491320323b310dc531f/server/src/main/java/org/opensearch/script/FilterScript.java#L73
Related Issues
Resolves #3312
Check List
--signoff
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.