Skip to content
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

[Backport 2.x] Add customized result index in data source etc #2220

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

Backport 70450e4 from #2212.

* Add customized result index in data source etc

This PR
- Introduce `spark.flint.datasource.name` parameter for data source specification.
- Enhance data source creation to allow custom result indices; fallback to default if unavailable.
- Include error details in the async result response, sourced from the result index.
- Migrate to `org.apache.spark.sql.FlintJob` following updates in OpenSearch-Spark.
- Populate query status from result index over EMR-S job status to handle edge cases where jobs may succeed, but queries or mappings fail.

Testing done:
1. manual testing including if with or without custom result index async query still works
2. added new unit tests

Signed-off-by: Kaituo Li <kaituo@amazon.com>

* address comments

Signed-off-by: Kaituo Li <kaituo@amazon.com>

* revert incorrect change

iiiiii-off-by: Kaituo Li <kaituo@amazon.com>

---------

Signed-off-by: Kaituo Li <kaituo@amazon.com>
(cherry picked from commit 70450e4)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

Merging #2220 (cb9a04a) into 2.x (b22e8f1) will decrease coverage by 0.01%.
The diff coverage is 96.92%.

@@             Coverage Diff              @@
##                2.x    #2220      +/-   ##
============================================
- Coverage     96.41%   96.41%   -0.01%     
- Complexity     4759     4764       +5     
============================================
  Files           440      440              
  Lines         12817    12853      +36     
  Branches        872      875       +3     
============================================
+ Hits          12358    12392      +34     
- Misses          450      452       +2     
  Partials          9        9              
Flag Coverage Δ
sql-engine 96.41% <96.92%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...rch/sql/datasources/utils/XContentParserUtils.java 100.00% <100.00%> (ø)
...park/asyncquery/AsyncQueryExecutorServiceImpl.java 100.00% <100.00%> (ø)
...h/sql/spark/asyncquery/model/AsyncQueryResult.java 100.00% <100.00%> (ø)
.../spark/asyncquery/model/SparkSubmitParameters.java 98.59% <100.00%> (+0.02%) ⬆️
...h/sql/spark/client/EmrServerlessClientImplEMR.java 100.00% <100.00%> (ø)
...g/opensearch/sql/spark/client/StartJobRequest.java 100.00% <ø> (ø)
...earch/sql/spark/data/constants/SparkConstants.java 0.00% <ø> (ø)
...rch/sql/spark/dispatcher/SparkQueryDispatcher.java 100.00% <100.00%> (ø)
...sql/spark/response/JobExecutionResponseReader.java 100.00% <100.00%> (ø)
.../transport/TransportGetAsyncQueryResultAction.java 100.00% <100.00%> (ø)
... and 2 more

@penghuo penghuo merged commit 232622d into 2.x Oct 5, 2023
32 of 34 checks passed
@github-actions github-actions bot deleted the backport/backport-2212-to-2.x branch October 5, 2023 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants