Skip to content

Add decimal FFI import/export with arrow-rs and Polars round-trips - #186

Merged
pbower merged 2 commits into
feature/decimalfrom
MA-EPC86-DECIMAL-TSK378-FFI
Aug 31, 2026
Merged

Add decimal FFI import/export with arrow-rs and Polars round-trips#186
pbower merged 2 commits into
feature/decimalfrom
MA-EPC86-DECIMAL-TSK378-FFI

Conversation

@pbower

@pbower pbower commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Implements import_from_c and import_from_c_owned for all three decimal widths (replaces placeholder panics from TSK376)
  • Implements export_to_c and export_view_to_c with windowed offset support for 4, 8, and 16 byte element widths
  • arrow-rs bridge round-trips for Decimal128
  • Polars bridge round-trips for decimal types with exhaustive type test cases
  • Precision/scale preservation verified across all FFI paths

Test plan

  • cargo test --features "decimal,cast_arrow" passes
  • cargo test --features "decimal,cast_polars" passes
  • cargo test without decimal passes (no regression)

@pbower pbower changed the title Add decimal FFI import/export with arrow-rs and Polars round-trips (TSK378) Add decimal FFI import/export with arrow-rs and Polars round-trips Aug 31, 2026
@pbower
pbower merged commit 03716ca into feature/decimal Aug 31, 2026
17 checks passed
@pbower
pbower deleted the MA-EPC86-DECIMAL-TSK378-FFI branch August 31, 2026 05:06
pbower added a commit that referenced this pull request Aug 31, 2026
* Add DecimalArray foundation and i128 trait impls (#181)

* Add Decimal32, Decimal64, Decimal128 variants to ArrowType (#180)

* Wire DecimalArray into NumericArray, Array, Scalar with From impls (#182)

* Wire DecimalArray into NumericArray, Array, and Scalar enums with From impls and tests (#182)

* Implement decimal conversion arms in NumericArray try_ accessors

* Add decimal FFI import/export with arrow-rs and Polars round-trips (#186)

* Add decimal FFI import/export with arrow-rs and Polars round-trips

* Integrate DecimalArray into Value, ArrayV, NumericArrayV, SuperArray, SuperArrayV, and Consolidate (#187)

* Add decimal broadcast dispatch and scale-aware print formatting (#184)

* Add decimal arithmetic kernels with checked overflow and auto-promotion + fix null mask drop on broadcasting (#185)

* Add decimal arithmetic kernels with checked overflow and auto-promotion
* Propagate null mask through broadcast for all array types

* Add DecimalArray type conversions and width conversion methods (#183)

* Add decimal support to pyo3 and minarrow-py Python bridges (#188)

* Add Decimal32 and Decimal64 round-trip tests for arrow-rs

* Add decimal support to pyo3 and minarrow-py Python bridges

* Make precision and scale report values for all numeric types
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.

1 participant