Skip to content

fix: Expose bucketing information from CometNativeScanExec#3437

Merged
andygrove merged 1 commit intoapache:mainfrom
andygrove:fix-bucketed-scan-native-datafusion
Feb 7, 2026
Merged

fix: Expose bucketing information from CometNativeScanExec#3437
andygrove merged 1 commit intoapache:mainfrom
andygrove:fix-bucketed-scan-native-datafusion

Conversation

@andygrove
Copy link
Copy Markdown
Member

Summary

  • Add CometNativeScanExec pattern matching to BucketedReadSuite and DisableUnnecessaryBucketedScanSuite in all three Spark version diffs (3.4.3, 3.5.8, 4.0.1)
  • Remove IgnoreCometNativeDataFusion(#3319) tags from 7 tests in the 3.5.8 diff that are now expected to pass

Details

When native_datafusion scan mode is active, CometNativeScanExec replaces FileSourceScanExec in the query plan. The test suites already pattern-match on CometScanExec but not CometNativeScanExec, causing ~7 bucketed scan tests to fail.

Changes in BucketedReadSuite.scala:

  • getFileScan() — match on CometNativeScanExec
  • getBucketScan() — match on CometNativeScanExec
  • verify() in bucket coalescing test — match on CometNativeScanExec for optionalNumCoalescedBuckets

Changes in DisableUnnecessaryBucketedScanSuite.scala:

  • Import CometNativeScanExec
  • checkNumBucketedScan() — match on CometNativeScanExec

Closes #3319

Test plan

  • Verify diffs apply cleanly to respective Spark versions
  • Run BucketedReadSuite and DisableUnnecessaryBucketedScanSuite with ENABLE_COMET=true and native_datafusion scan mode

🤖 Generated with Claude Code

Add CometNativeScanExec pattern matching to BucketedReadSuite and
DisableUnnecessaryBucketedScanSuite so that bucketing tests pass when
native_datafusion scan mode is active.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@andygrove andygrove marked this pull request as ready for review February 7, 2026 00:34
@andygrove andygrove requested a review from mbutrovich February 7, 2026 00:34
Copy link
Copy Markdown
Contributor

@mbutrovich mbutrovich left a comment

Choose a reason for hiding this comment

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

My brain sometimes has a hard time parsing diffs of diffs, but I think this looks right. Thanks @andygrove! More coverage of CometNativeScan!

@andygrove andygrove merged commit 4cab60d into apache:main Feb 7, 2026
111 checks passed
@andygrove andygrove deleted the fix-bucketed-scan-native-datafusion branch February 7, 2026 02:12
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.

[native_datafusion] [Spark SQL Tests] Bucketing not exposed by CometNativeScan

2 participants