spark icon indicating copy to clipboard operation
spark copied to clipboard

[SPARK-47716][SQL] Avoid view name conflict in SQLQueryTestSuite semantic sort test case

Open jchen5 opened this issue 10 months ago • 3 comments

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

jchen5 avatar Apr 03 '24 14:04 jchen5

@andylam-db @vitaliili-db

jchen5 avatar Apr 03 '24 14:04 jchen5

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?

dongjoon-hyun avatar May 10 '24 16:05 dongjoon-hyun

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.

beliefer avatar May 11 '24 06:05 beliefer

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.

jchen5 avatar May 13 '24 15:05 jchen5

Hi @HyukjinKwon @dongjoon-hyun can you do a quick review of the updated PR?

jchen5 avatar May 30 '24 12:05 jchen5

Merged to master.

HyukjinKwon avatar May 31 '24 00:05 HyukjinKwon