-
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
Unescape query from EMR spark submit parameter #306
Unescape query from EMR spark submit parameter #306
Conversation
Signed-off-by: Sean Kao <[email protected]>
Signed-off-by: Sean Kao <[email protected]>
let's include this in 0.3 after testing |
Because we've started working on 0.4 task, is this the last PR for 0.3? If not, I think we'd better cut 0.3 branch now? |
@@ -371,6 +380,7 @@ trait FlintJobExecutor { | |||
val startTime = System.currentTimeMillis() | |||
// we have to set job group in the same thread that started the query according to spark doc | |||
spark.sparkContext.setJobGroup(queryId, "Job group for " + queryId, interruptOnCancel = true) | |||
logInfo(s"Executing query: $query") |
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 may require sensitive info anonymized like: https://github.com/opensearch-project/sql/blob/2649200e065dff48282dce438ceb0ee5ac39054e/sql/src/main/java/org/opensearch/sql/sql/antlr/AnonymizerListener.java#L34. Probably we can do this later since this is also helpful for analyzing query pattern.
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.
@seankao-az @noCharger could you address this in other 0.3 PR if any? Probably remove it for now?
Can we include this #303? I will add one more commit later today. |
Sure. Will block other 0.4 PRs for now. |
We can cut the branch and backport too. |
@dai-chen cut 0.3 branch to unblock 0.4. |
Description
In a previous PR in sql, query is escaped in spark submit parameter. This PR unescapes the query on the receiving end, retrieving the original query. This affects only the query in SparkConf.
End to end test is performed as follows:
Query:
Spark submit parameter for the EMR job (query escaped and wrapped with quotes):
Query received on spark before this PR fix (query still escaped and result in syntax error):
Query received on spark after this PR fix (query unescaped):
Issues Resolved
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.