-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-29516][SQL][TEST] Test ThriftServerQueryTestSuite asynchronously #26172
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
Conversation
|
Test build #112309 has finished for PR 26172 at commit
|
|
cc @zsxwing since he also asked this before. The way I see this is that a new extended test coverage. |
|
It seems the reason is build/sbt "hive-thriftserver/test-only *.ThriftServerQueryTestSuite -- -z postgreSQL" -Phive-thriftserverThe output is: |
|
Test build #112325 has finished for PR 26172 at commit
|
|
This error happen because in SparkSession.sql() method, spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/ParseDriver.scala Line 94 in e99a9f7
spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/ParseDriver.scala Line 95 in e99a9f7
|
|
Test build #112367 has finished for PR 26172 at commit
|
|
retest this please |
| * @since 2.0.0 | ||
| */ | ||
| def sql(sqlText: String): DataFrame = { | ||
| SparkSession.setActiveSession(this) |
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.
To keep it in scope of thriftserver, could we set it in SparkExecuteStatementOperation.execute, using the sqlContext available there?
I'm not sure what other implications it can have here, it would be safer to set there.
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.
To keep it in scope of thriftserver, could we set it in SparkExecuteStatementOperation.execute, using the sqlContext available there?
I'm not sure what other implications it can have here, it would be safer to set there.
It's ok to set in SparkExecuteStatementOperation.execute.
#26187 (comment)
I think it ok to set this before parse sql, It was the right thing to do
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.
Ok. Let the reviewers of #26187 decide it there. (@cloud-fan @zsxwing )
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.
So the issue with async queries was that the parser was using the wrong dialect fallback, because it was picking the wrong SQLConf, because it was not set in the background execution thread?
@wangyum @AngersZhuuuu Does fixing this potentially fix any other of the failures in ThriftServerQueryTestSuite that are currently blacklisted to be ignored?
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.
@juliuszsompolski Other failures can't be fixed by #26187:
Lines 87 to 102 in 7f8841b
| // Missing UDF | |
| "postgreSQL/boolean.sql", | |
| "postgreSQL/case.sql", | |
| // SPARK-28624 | |
| "date.sql", | |
| // SPARK-28620 | |
| "postgreSQL/float4.sql", | |
| // SPARK-28636 | |
| "decimalArithmeticOperations.sql", | |
| "literals.sql", | |
| "subquery/scalar-subquery/scalar-subquery-predicate.sql", | |
| "subquery/in-subquery/in-limit.sql", | |
| "subquery/in-subquery/in-group-by.sql", | |
| "subquery/in-subquery/simple-in.sql", | |
| "subquery/in-subquery/in-order-by.sql", | |
| "subquery/in-subquery/in-set-operations.sql" |
|
Test build #112369 has finished for PR 26172 at commit
|
### What changes were proposed in this pull request? As I have comment in [SPARK-29516](#26172 (comment)) SparkSession.sql() method parse process not under current sparksession's conf, so some configuration about parser is not valid in multi-thread situation. In this pr, we add a SQLConf parameter to AbstractSqlParser and initial it with SessionState's conf. Then for each SparkSession's parser process. It will use's it's own SessionState's SQLConf and to be thread safe ### Why are the changes needed? Fix bug ### Does this PR introduce any user-facing change? NO ### How was this patch tested? NO Closes #26187 from AngersZhuuuu/SPARK-29530. Authored-by: angerszhu <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
|
Test build #112415 has finished for PR 26172 at commit
|
|
Test build #112416 has finished for PR 26172 at commit
|
|
Test build #112430 has finished for PR 26172 at commit
|
|
retest this please |
|
Test build #112435 has finished for PR 26172 at commit
|
juliuszsompolski
left a comment
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.
LGTM!
|
Thank you all! |
|
Merged to master. |
What changes were proposed in this pull request?
This PR test
ThriftServerQueryTestSuitein an asynchronous way.Why are the changes needed?
The default value of
spark.sql.hive.thriftServer.asyncistrue.Does this PR introduce any user-facing change?
No
How was this patch tested?