-
Notifications
You must be signed in to change notification settings - Fork 148
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
[v3.0.0] Deprecate OpenSearch DSL format #3367
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Sean Kao <[email protected]>
Signed-off-by: Sean Kao <[email protected]>
Signed-off-by: Sean Kao <[email protected]>
Signed-off-by: Sean Kao <[email protected]>
d96e854
to
7de6452
Compare
This reverts commit e3157aa. Signed-off-by: Sean Kao <[email protected]>
Signed-off-by: Sean Kao <[email protected]>
Signed-off-by: Sean Kao <[email protected]>
Signed-off-by: Sean Kao <[email protected]>
Signed-off-by: Sean Kao <[email protected]>
7de6452
to
48d512a
Compare
Signed-off-by: Sean Kao <[email protected]>
Signed-off-by: Sean Kao <[email protected]>
Signed-off-by: Sean Kao <[email protected]>
Signed-off-by: Sean Kao <[email protected]>
Signed-off-by: Sean Kao <[email protected]>
Signed-off-by: Sean Kao <[email protected]>
Signed-off-by: Sean Kao <[email protected]>
Signed-off-by: Sean Kao <[email protected]>
@@ -116,7 +126,7 @@ public static QueryAction create(Client client, QueryActionRequest request) | |||
} else { | |||
sqlExpr.accept(new TermFieldRewriter()); | |||
// migrate aggregation to query planner framework. | |||
if (shouldMigrateToQueryPlan(sqlExpr, request.getFormat())) { | |||
if (!bypassMigrateToQueryPlan && shouldMigrateToQueryPlan(sqlExpr)) { |
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.
Previously some test cases use Format.JSON to bypass this check and get QueryAction for SELECT (either AggregationQueryAction or DefaultQueryAction). After removing Format.JSON, those test case wouldn't work without this flag.
Signed-off-by: Sean Kao <[email protected]>
if (format == Format.JSON) { | ||
return false; | ||
} |
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.
Now there is no JSON format, I'm thinking should we ignore/fix the failed IT instead of adding a flag bypassMigrateToQueryPlan
?
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.
main problem trying to solve with this flag is CheckScriptContents.getScriptFieldFromQuery
needs access to a SearchRequestBuilder
in QueryAction
, which I think QueryPlanQueryAction
doesn't expose. Will double check if there's another way
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 for the tests that used this method, it's a simple fix to change the query to not have any aggregation. Doing so will avoid migrating to QueryPlanner as well.
Those are UTs testing the string operators, and the GROUP BY and ORDER BY aren't used anyway, so it should be safe to remove them.
Signed-off-by: Sean Kao <[email protected]>
Signed-off-by: Sean Kao <[email protected]>
Signed-off-by: Sean Kao <[email protected]>
return create(client, sql, false); | ||
} | ||
|
||
public static QueryAction create(Client client, String sql, boolean bypassMigrateToQueryPlan) |
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.
This function only used in UT? if so, add a tag/java-doc on this function.
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 removed this in latest commit. It was an attempt to fix some test cases, but it turns out changing the test cases is easier.
Description
Removes the OpenSearch DSL response format.
This PR focus only on deprecating the format, and will silent the affected legacy test cases. #3372 is created to track the task to decide which of the legacy tests are worth keeping and what to do with them.
Documentation website changes required:
possibly more
Related Issues
Resolves #3280
Check List
- [ ] New functionality includes testing.- [ ] API changes companion pull request created.--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.