Skip to content

chore: Remove deprecated SCAN_NATIVE_COMET constant and related test code#3671

Merged
andygrove merged 2 commits intoapache:mainfrom
andygrove:chore/remove-scan-native-comet
Mar 11, 2026
Merged

chore: Remove deprecated SCAN_NATIVE_COMET constant and related test code#3671
andygrove merged 2 commits intoapache:mainfrom
andygrove:chore/remove-scan-native-comet

Conversation

@andygrove
Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes #2186.

Rationale for this change

The native_comet scan implementation was deprecated in 0.9.0 and has been superseded by native_iceberg_compat and native_datafusion. The SCAN_NATIVE_COMET constant and all test code referencing it is dead code that adds maintenance burden and confusion.

What changes are included in this PR?

  • Remove CometConf.SCAN_NATIVE_COMET constant and its deprecation annotations
  • Remove usingLegacyNativeCometScan helper methods from CometTestBase
  • Remove ParquetReadV2Suite class (all tests were already ignored)
  • Remove 12 ignored/dead tests across 6 test suites that required SCAN_NATIVE_COMET
  • Simplify conditional branches in active tests that checked for SCAN_NATIVE_COMET — these now always take the non-legacy path (e.g., checkSparkAnswerAndOperator instead of checkSparkAnswer)
  • Remove assume(usingLegacyNativeCometScan) guards (always false, so those tests never ran)
  • Simplify if (!usingLegacyNativeCometScan) blocks (always true)
  • Simplify hasUnsignedSmallIntSafetyCheck to remove dead legacy check
  • Update comments referencing native_comet in CometScanExec and Utils

Net result: -820 lines of dead code removed across 17 files.

How are these changes tested?

This is a cleanup of deprecated/dead code. All removed tests were either already ignored or guarded by assume(usingLegacyNativeCometScan) which always evaluated to false. The remaining test simplifications only remove the else branches that were never executed. Existing CI tests cover the active scan implementations.

…code

Remove the deprecated `CometConf.SCAN_NATIVE_COMET` constant (`native_comet`)
and all test code that references it, including the `usingLegacyNativeCometScan`
helper. The native_comet scan was deprecated in 0.9.0 and has been superseded
by native_iceberg_compat and native_datafusion scan implementations.

- Remove `SCAN_NATIVE_COMET` constant and deprecation annotations
- Remove `usingLegacyNativeCometScan` helper methods from CometTestBase
- Remove `ParquetReadV2Suite` class (all tests were ignored)
- Remove 12 ignored/dead tests across 6 test suites
- Simplify conditional branches that checked for SCAN_NATIVE_COMET
- Remove `assume(usingLegacyNativeCometScan)` guards (always false)
- Simplify `if (!usingLegacyNativeCometScan)` blocks (always true)
@andygrove andygrove changed the title Remove deprecated SCAN_NATIVE_COMET constant and related test code chore: Remove deprecated SCAN_NATIVE_COMET constant and related test code Mar 11, 2026
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.

Thanks for the cleanup @andygrove!

@andygrove andygrove merged commit 1da18dd into apache:main Mar 11, 2026
112 checks passed
@andygrove andygrove deleted the chore/remove-scan-native-comet branch March 11, 2026 22:14
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.

Deprecate native_comet scan (remove from auto scan mode)

2 participants