spark
spark copied to clipboard
[SPARK-47716][SQL] Avoid view name conflict in SQLQueryTestSuite semantic sort test case
What changes were proposed in this pull request?
In SQLQueryTestSuite, the test case "Test logic for determining whether a query is semantically sorted" can sometimes failure with an error
Cannot create table or view `main`.`default`.`t1` because it already exists.
if run concurrently with other sql test cases that also create tables with the same name.
Fix it by putting it in a schema with a unique name.
Why are the changes needed?
Fix flaky test issue
Does this PR introduce any user-facing change?
No
How was this patch tested?
Test itself
Was this patch authored or co-authored using generative AI tooling?
No
@andylam-db @vitaliili-db
Hi, @jchen5 and all. How do you want to proceed this PR?
I guess https://github.com/apache/spark/pull/45855#discussion_r1550652914 is the latest direction. Could you update the PR in that direction?
Not related to this PR. It seems we should move the test case Test logic for determining whether a query is semantically sorted
to other place.
SQLQueryTestSuite
is used to generate and test golden files.
Sure, I'll update the PR.
Not related to this PR. It seems we should move the test case Test logic for determining whether a query is semantically sorted to other place.
The test case is a "meta" test for the SQLQueryTestSuite framework, so that's why it is there. I agree it may be good to move it to its own suite.
Hi @HyukjinKwon @dongjoon-hyun can you do a quick review of the updated PR?
Merged to master.