Skip to content

chore: Update CometTestBase to stop setting the scan implementation to native_comet#2176

Merged
andygrove merged 9 commits intoapache:mainfrom
andygrove:tests-use-default-scan
Aug 19, 2025
Merged

chore: Update CometTestBase to stop setting the scan implementation to native_comet#2176
andygrove merged 9 commits intoapache:mainfrom
andygrove:tests-use-default-scan

Conversation

@andygrove
Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes #2172

Rationale for this change

Comet's default scan implementation is auto, so we should use that same default in the test suite.

What changes are included in this PR?

How are these changes tested?

@andygrove andygrove changed the title Tests use default scan chore: Update CometTestBase to stop setting the scan implementation to native_comet Aug 17, 2025
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Aug 17, 2025

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 58.52%. Comparing base (f09f8af) to head (4fba4a8).
⚠️ Report is 1165 commits behind head on main.

Files with missing lines Patch % Lines
...n/scala/org/apache/comet/rules/CometScanRule.scala 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2176      +/-   ##
============================================
+ Coverage     56.12%   58.52%   +2.40%     
- Complexity      976     1279     +303     
============================================
  Files           119      143      +24     
  Lines         11743    13187    +1444     
  Branches       2251     2358     +107     
============================================
+ Hits           6591     7718    +1127     
- Misses         4012     4245     +233     
- Partials       1140     1224      +84     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@andygrove andygrove marked this pull request as ready for review August 18, 2025 15:12
Copy link
Copy Markdown
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

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

lgtm thanks @andygrove
Thanks for commenting test failures

Copy link
Copy Markdown
Contributor

@parthchandra parthchandra left a comment

Choose a reason for hiding this comment

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

For the tests that are failing with native_iceberg_compat, are these regressions? We have the Spark SQL Tests (native_iceberg_compat) pipeline that is required for CI.

// usingDataFusionParquetExec does not support CometBatchScanExec yet
if (!isDataFusionScan) {
assert(CometBatchScanExec.isTypeSupported(dt, "", fallbackReasons) == expected)
withSQLConf(CometConf.COMET_NATIVE_SCAN_IMPL.key -> CometConf.SCAN_NATIVE_COMET) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This test should pass for all scan impls. (the isDataFusionScan check modifies the test appropriately)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Alas, it fails with:

true did not equal false
ScalaTestFailureLocation: org.apache.comet.parquet.ParquetReadSuite at (ParquetReadSuite.scala:118)
Expected :false
Actual   :true

The error wasn't super helpful.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

After improving the error message:

Failed on isTypeSupported check for ArrayType(TimestampType,true); expected=false, actual=true

If I set the scan impl to native_iceberg_compat, native_datafusion, or native_comet, then it passes. It just does not work with auto. I will file a separate issue.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I see the issue ... I will push a fix

Copy link
Copy Markdown
Member Author

@andygrove andygrove Aug 19, 2025

Choose a reason for hiding this comment

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

I spent some time trying to get these two tests to pass but the implementations are not correct. I updated them to explicitly use native_comet for now (so no change in behavior) and filed a follow-on issue to reimplement these two tests.

#2188

We would also need to update or remove these tests as part of #2177

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@parthchandra could you take another look?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks okay. I also filed #2195 to follow up on the signed/unsigned incompatibility which was, iirc, one of the reasons for conditional code in many tests.

@andygrove
Copy link
Copy Markdown
Member Author

For the tests that are failing with native_iceberg_compat, are these regressions? We have the Spark SQL Tests (native_iceberg_compat) pipeline that is required for CI.

I checked, and that workflow does not run on PRs. It has to be run manually, and we haven't done that in a while.

@andygrove
Copy link
Copy Markdown
Member Author

For the tests that are failing with native_iceberg_compat, are these regressions? We have the Spark SQL Tests (native_iceberg_compat) pipeline that is required for CI.

I checked, and that workflow does not run on PRs. It has to be run manually, and we haven't done that in a while.

Actually, we update the default Spark SQL tests to run with auto in a separate workflow. Those tests pass. The failures are in our own tests, not Spark SQL.

@parthchandra
Copy link
Copy Markdown
Contributor

Actually, we update the default Spark SQL tests to run with auto in a separate workflow. Those tests pass. The failures are in our own tests, not Spark SQL.

Ah, thanks for checking and clarifying.

@andygrove andygrove mentioned this pull request Aug 18, 2025
@andygrove andygrove merged commit c777fa8 into apache:main Aug 19, 2025
91 checks passed
@andygrove andygrove deleted the tests-use-default-scan branch August 19, 2025 18:01
@andygrove
Copy link
Copy Markdown
Member Author

Thanks for the reviews @comphead and @parthchandra

coderfender pushed a commit to coderfender/datafusion-comet that referenced this pull request Dec 13, 2025
mbutrovich added a commit to mbutrovich/datafusion-comet that referenced this pull request Mar 6, 2026
mbutrovich added a commit to mbutrovich/datafusion-comet that referenced this pull request Mar 6, 2026
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.

CometTestBase should no longer set the scan implementation to native_comet

4 participants