-
Notifications
You must be signed in to change notification settings - Fork 33
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
[REFACTOR] Move DF reformat from StatementExecutionManagerImpl to QueryResultWriterImpl #701
[REFACTOR] Move DF reformat from StatementExecutionManagerImpl to QueryResultWriterImpl #701
Conversation
Signed-off-by: Louis Chu <clingzhi@amazon.com>
statementsExecutionManager.executeStatement(flintStatement) | ||
val startTime = System.currentTimeMillis() | ||
val df = statementsExecutionManager.executeStatement(flintStatement) | ||
queryResultWriter.reformatDataFrame(df, flintStatement, startTime) |
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.
just wonder why query result writer has to expose this new API and cannot do this in writeDataFrame
API? Anything happen after this and before writeDataFrame called?
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.
just wonder why query result writer has to expose this new API and cannot do this in
writeDataFrame
API? Anything happen after this and before writeDataFrame called?
Reformat data will call the 'collect' API on the driver node to trigger an execution. If onlyspark.sql()
is called without an execution triggerred on the same thread, Spark will not process the query execution, and the thread seems to be idle.
Verified this in IT that query will not able to process in this case.
assertion failed: Timeout occurred after 60000 milliseconds waiting for query result.
java.lang.AssertionError: assertion failed: Timeout occurred after 60000 milliseconds waiting for query result.
Add more comments in 19ac42b
Signed-off-by: Louis Chu <clingzhi@amazon.com>
…ryResultWriterImpl (#701) * Refactor query result writer Signed-off-by: Louis Chu <clingzhi@amazon.com> * Add more scala doc and update sbt Signed-off-by: Louis Chu <clingzhi@amazon.com> --------- Signed-off-by: Louis Chu <clingzhi@amazon.com> (cherry picked from commit d76e0cd) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…ryResultWriterImpl (#701) * Refactor query result writer Signed-off-by: Louis Chu <clingzhi@amazon.com> * Add more scala doc and update sbt Signed-off-by: Louis Chu <clingzhi@amazon.com> --------- Signed-off-by: Louis Chu <clingzhi@amazon.com> (cherry picked from commit d76e0cd) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…ryResultWriterImpl (#701) (#716) * Refactor query result writer * Add more scala doc and update sbt --------- (cherry picked from commit d76e0cd) Signed-off-by: Louis Chu <clingzhi@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…l to QueryResultWriterImpl (opensearch-project#701) (opensearch-project#715)" This reverts commit 74397d8.
…l to QueryResultWriterImpl (opensearch-project#701) (opensearch-project#716)" This reverts commit daa33e5.
Description
Move DF reformat from
StatementExecutionManagerImpl
toQueryResultWriterImpl
so that people use customStatementExecutionManager
still can work with defaultQueryResultWriterImpl
and write result to OpenSearch result index for custom data source.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.