tests: Add SQL file-based test framework#3325
Closed
andygrove wants to merge 1 commit intoapache:mainfrom
Closed
Conversation
Introduce a sqllogictest-inspired framework for writing Comet tests as plain .sql files instead of Scala code. Convert 11 tests from CometExpressionSuite to demonstrate the approach. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3325 +/- ##
============================================
- Coverage 56.12% 54.98% -1.15%
- Complexity 976 1437 +461
============================================
Files 119 175 +56
Lines 11743 16167 +4424
Branches 2251 2682 +431
============================================
+ Hits 6591 8889 +2298
- Misses 4012 6011 +1999
- Partials 1140 1267 +127 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
Author
|
Actually, I may as well replace this with #3328 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.sqlfilesCometExpressionSuiteinto 8.sqlfiles underspark/src/test/resources/sql-tests/expressions/CometSqlFileTestSuite(test runner) andSqlFileTestParser(parser)Supported directives
-- Config: key=value-- ConfigMatrix: key=val1,val2statementquerycheckSparkAnswerAndOperatorquery spark_answer_onlycheckSparkAnswer(no operator check)query tolerance=0.001Why
.sqlfile and run.sltfiles extensively for SQL testingConfig/ConfigMatrixheaders replace nestedSeq.foreach/withSQLConfboilerplateTest plan
CometExpressionSuitetests still pass (118 tests)🤖 Generated with Claude Code