Skip to content

Conversation

@andygrove
Copy link
Member

@andygrove andygrove commented Jan 23, 2026

Which issue does this PR close?

N/A

Rationale for this change

We have many tests that explicitly specify native_comet scan. This means we do not get coverage with other scan implementations when CI overrides the default scan implementation.

What changes are included in this PR?

  • Stop explicitly specifying native_comet in some tests
  • Change some Parquet data gen code to stop writing invalid signed values into unsigned u8/u16 so that we can test other scans
  • Add explicit tests for native_comet with invalid signed values in unsigned u8/u16 - we only need to test this once

How are these changes tested?

…plementations

The "test multiple pages with different sizes and nulls" test previously
used negative values for unsigned integer Parquet types (UINT_8, UINT_16,
UINT_32, UINT_64), which required native_comet to handle correctly. This
limited test coverage to only the native_comet scan implementation.

This change:
- Modifies the test to use valid unsigned values (non-negative) so it can
  run with any scan implementation (native_datafusion, native_iceberg_compat)
- Extracts the invalid unsigned value handling into a dedicated test
  "native_comet reads unsigned int types with values exceeding signed range"
  that explicitly tests native_comet's ability to handle these edge cases

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@codecov-commenter
Copy link

codecov-commenter commented Jan 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.07%. Comparing base (f09f8af) to head (998b161).
⚠️ Report is 876 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3258      +/-   ##
============================================
+ Coverage     56.12%   60.07%   +3.94%     
- Complexity      976     1437     +461     
============================================
  Files           119      172      +53     
  Lines         11743    15926    +4183     
  Branches       2251     2631     +380     
============================================
+ Hits           6591     9567    +2976     
- Misses         4012     5031    +1019     
- Partials       1140     1328     +188     

☔ 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 changed the title test: increase ParquetReadSuite coverage for non-native_comet scan implementations test: increase test coverage for non-native_comet scan implementations Jan 23, 2026
andygrove and others added 2 commits January 23, 2026 14:26
Modify makeParquetFileAllPrimitiveTypes to generate valid unsigned values
(non-negative) for UINT fields instead of negative values. This allows
tests using this function to work with any scan implementation.

Changes:
- UINT_8: use Math.abs(i) % 256 instead of (-i).toByte
- UINT_16: use Math.abs(i) % 65536 instead of (-i).toShort
- UINT_32: use Math.abs(i) instead of -i
- UINT_64: use Math.abs(i.toLong) instead of (-i).toLong

Remove explicit native_comet scan setting from CometExpressionSuite tests:
- round
- hex
- test integral divide

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ants

Remove explicit native_comet scan setting from additional tests:
- basic data type support
- uint data type support

Delete redundant "excluding u8/u16" test variants since the data
generator now produces valid unsigned values that work with all
scan implementations.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@andygrove andygrove marked this pull request as ready for review January 23, 2026 23:19

test("test integral divide") {
// this test requires native_comet scan due to unsigned u8/u16 issue
withSQLConf(CometConf.COMET_NATIVE_SCAN_IMPL.key -> CometConf.SCAN_NATIVE_COMET) {
Copy link
Member Author

Choose a reason for hiding this comment

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

integral divide tests should not be specific to native_comet

withTempDir { dir =>
val path = new Path(dir.toURI.toString, "hex.parquet")
// this test requires native_comet scan due to unsigned u8/u16 issue
withSQLConf(CometConf.COMET_NATIVE_SCAN_IMPL.key -> CometConf.SCAN_NATIVE_COMET) {
Copy link
Member Author

Choose a reason for hiding this comment

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

hex tests should not be specific to native_comet

@andygrove andygrove marked this pull request as draft January 23, 2026 23:21
@andygrove andygrove closed this Jan 24, 2026
@andygrove andygrove deleted the increase-scan-impl-test-coverage branch January 24, 2026 00:05
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