-
Notifications
You must be signed in to change notification settings - Fork 143
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
Add session and statement state for all query types #2413
Add session and statement state for all query types #2413
Conversation
} | ||
JSONObject result = new JSONObject(); | ||
result.put(STATUS_FIELD, statementState.getState()); | ||
result.put(ERROR_FIELD, Optional.of(statement.getStatementModel().getError()).orElse("")); |
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.
is error written to result index or statement model in request index?
Are these different cases?
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.
both, Flint spark job,
- write result, state, error, to result index.
- write state and error to request index.
@kaituo please help confirm also.
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.
yes
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2413 +/- ##
============================================
+ Coverage 95.54% 95.56% +0.01%
- Complexity 4985 4987 +2
============================================
Files 478 478
Lines 13883 13919 +36
Branches 931 931
============================================
+ Hits 13265 13301 +36
Misses 598 598
Partials 20 20
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
@kaituo two questions.
- should we add a new StatementState
cancelling
and Spark job update it ascancelled
? - what is the required configuration of REPL job, we have following configurations now, do we need more?
- config.put(FLINT_JOB_REQUEST_INDEX, DATASOURCE_TO_REQUEST_INDEX.apply(datasourceName));
- config.put(FLINT_JOB_SESSION_ID, sessionId);
|
createSessionAndStatement( | ||
dispatchQueryRequest, | ||
dispatchQueryRequest.getApplicationId(), | ||
DROP_INDEX_JOB_ID, |
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.
does that mean there is only one job id for all DML queries? Would it cause issues if there is a concurrent DML running?
dispatchQueryRequest, | ||
dispatchQueryRequest.getApplicationId(), | ||
jobId, | ||
SessionType.BATCH, |
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.
should the type be streaming?
Closing as stale -- reopen if needed |
Description
Issues Resolved
#2401
Check List
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.