Skip to content

Conversation

@yaooqinn
Copy link
Member

What changes were proposed in this pull request?

This PR enables ANSI in SQL *SQLQueryTestSuite by default for regular tests and switches the original ansi/ ones to nonansi, following SPARK-44444, which turn on ansi for prod,

Why are the changes needed?

test improvements

Does this PR introduce any user-facing change?

no

How was this patch tested?

new golden files

Was this patch authored or co-authored using generative AI tooling?

no

@github-actions github-actions bot added the SQL label Nov 14, 2024
@yaooqinn yaooqinn marked this pull request as draft November 14, 2024 15:27
-- Type Coerced Union
SELECT udf(c1) as c1, udf(c2) as c2
FROM (SELECT udf(c1) as c1, udf(c2) as c2 FROM t1
FROM (SELECT udf(c1) as c1, udf(c2) as c2 FROM t1 WHERE c2 = 'a'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stabilize error

values (0, 1) tab(x, y)
|> union table t;
|> union table t
|> where x = 0;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stabilize error


-- test decimal operations
select id, a+b, a-b, a*b, a/b from decimals_test order by id;
select /*+ COALESCE(1) */ id, a+b, a-b, a*b, a/b from decimals_test order by id;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stabilize error

@yaooqinn yaooqinn marked this pull request as ready for review November 15, 2024 09:53
@yaooqinn
Copy link
Member Author

cc @dongjoon-hyun as the initiator of SPARK-44444, also cc @cloud-fan, thank you

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for making this efforts, @yaooqinn . It looks reasonable to me.

Although it's too verbose due to the switching the directory locations, I believe it's okay because we need to regenerate the SQL result always when we are going to backport from branch-4.0 to branch-3.5.

Copy link
Member

@MaxGekk MaxGekk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yaooqinn yaooqinn closed this in b626528 Nov 18, 2024
@yaooqinn
Copy link
Member Author

Merged to master, thank you @dongjoon-hyun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants