• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

vortex-data / vortex / 16840805129
88%

Build:
DEFAULT BRANCH: develop
Ran 08 Aug 2025 09:27PM UTC
Jobs 2
Files 639
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 Aug 2025 09:22PM UTC coverage: 86.234% (+1.0%) from 85.215%
16840805129

push

github

web-flow
fix: incorrect decimal scalar nbytes (#4176)

# Summary

Successfully improved test coverage for the vortex-scalar crate by
analyzing a coverage report showing 11 files with coverage below 85% and
systematically adding comprehensive tests. The work increased the test
count from 294 to 419 tests (125 new tests).

## Key Accomplishments

  1. Critical Bug Fix

- Fixed decimal nbytes() logic bug (vortex-scalar/src/lib.rs#L192): The
comparison was inverted - changed from >=
  to <= when checking DECIMAL128_MAX_PRECISION
- This bug would have caused i128 decimals to report 32 bytes instead of
16 bytes, and i256 decimals to report 16
  bytes instead of 32 bytes

  2. Documentation Improvements

- Added comprehensive F16 coercion documentation explaining the
bit-pattern interpretation behavior
- Documented PartialOrd behavior with clear examples of when comparisons
return None vs Some
- Improved error messages for type casting failures to be more
descriptive

  3. Testing Patterns Established

  - Comprehensive boundary testing for numeric types
  - Null handling across all scalar types
  - Type casting with overflow detection
  - Error case validation
  - Partial ordering behavior verification

## Test Categories Added

1. Type Conversions: Comprehensive casting between decimal, primitive,
and other types
  2. Boundary Conditions: Testing limits of each numeric type
  3. Null Handling: Ensuring proper null propagation and handling
  4. Error Cases: Validating appropriate errors for invalid operations
  5. Memory Management: Testing nbytes() calculations for all types
  6. Temporal Extensions: Arrow FFI conversion for time/date types

## Bug Fixed

```rust
  // BEFORE (BUG):
  if dt.precision() >= DECIMAL128_MAX_PRECISION {
      size_of::<i128>()
  } else {
      size_of::<i256>()
  }
```

```rust
  // AFTER (FIXED):
  if dt.precision() <= DECIMAL128_MAX_PRECISION {
      size_of::<i128>()
  } else {
      size_of::<i256>()
  }
```

## Impact

The improveme... (continued)

1755 of 1768 new or added lines in 12 files covered. (99.26%)

53520 of 62064 relevant lines covered (86.23%)

546012.47 hits per line

Uncovered Changes

Lines Coverage ∆ File
9
97.19
-0.57% vortex-scalar/src/tests/core.rs
3
98.66
-1.34% vortex-scalar/src/arrow/tests.rs
1
87.36
20.81% vortex-scalar/src/pvalue.rs
Jobs
ID Job ID Ran Files Coverage
1 run-tests - 16840805129.1 08 Aug 2025 09:28PM UTC 639
84.08
GitHub Action Run
2 run-tpc-h - 16840805129.2 08 Aug 2025 09:27PM UTC 581
48.09
GitHub Action Run
Source Files on build 16840805129
  • Tree
  • List 639
  • Changed 16
  • Source Changed 12
  • Coverage Changed 16
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #16840805129
  • de5f71d7 on github
  • Prev Build on develop (#16839690806)
  • Next Build on develop (#16849533673)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc