Skip to content

[SPARK-51510] Add SQL-file based SQLTests suite #18

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

Closed
wants to merge 1 commit into from

Conversation

dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Mar 14, 2025

What changes were proposed in this pull request?

This PR aims to add SQL-file based SQLTests suite as a new test framework. For example,

  • pipesyntax.sql
VALUES (0), (1) tab(col)
|> EXTEND col * 2 AS result
  • pipesyntax.sql.json
[["0","0"],["1","2"]]

Why are the changes needed?

This framework helps us improve test coverage by adding SQL file and golden answer files.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Manual test against Apache Spark 4.0.0 RC2 and pass the CIs.

$ swift test --filter SQLTests
...
􀟈  Suite SQLTests started.
􀟈  Test runAll() started.
pipesyntax.sql
select.sql
􁁛  Test runAll() passed after 0.083 seconds.
􁁛  Suite SQLTests passed after 0.083 seconds.
􁁛  Test run with 1 test passed after 0.083 seconds.

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

No.

@dongjoon-hyun
Copy link
Member Author

Could you review this test framework PR when you have some time, @LuciferYang ?

Copy link

@LuciferYang LuciferYang left a comment

Choose a reason for hiding this comment

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

+1, LGTM

@dongjoon-hyun
Copy link
Member Author

Thank you, @LuciferYang !

@dongjoon-hyun
Copy link
Member Author

Merged to main.

@dongjoon-hyun dongjoon-hyun deleted the SPARK-51510 branch March 14, 2025 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants