-
Notifications
You must be signed in to change notification settings - Fork 278
test: increase test coverage for non-native_comet scan implementations #3258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
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>
|
|
||
| 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) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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
Which issue does this PR close?
N/A
Rationale for this change
We have many tests that explicitly specify
native_cometscan. 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?
native_cometin some testsHow are these changes tested?