[v3.0.0] Deprecate OpenSearch DSL format#3367
[v3.0.0] Deprecate OpenSearch DSL format#3367noCharger merged 21 commits intoopensearch-project:mainfrom
Conversation
Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
d96e854 to
7de6452
Compare
This reverts commit e3157aa. Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
7de6452 to
48d512a
Compare
Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
| 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.
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 <seankao@amazon.com>
| if (format == Format.JSON) { | ||
| return false; | ||
| } |
There was a problem hiding this comment.
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.
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.
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 <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
| return create(client, sql, false); | ||
| } | ||
|
|
||
| public static QueryAction create(Client client, String sql, boolean bypassMigrateToQueryPlan) |
There was a problem hiding this comment.
This function only used in UT? if so, add a tag/java-doc on this function.
There was a problem hiding this comment.
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.
dai-chen
left a comment
There was a problem hiding this comment.
Thanks for the changes!
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.