diff --git a/CHANGELOG.md b/CHANGELOG.md index 78c4eba..4e112cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,108 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 # Minarrow Rust +## 0.17.0 - 2026-08-15 + +This release: + - Corrects integer arithmetic rounding semantics for scalar + - Adds `Display` for all public types + - Includes a broad set of API additions and performance improvements. + +### Numerical result changes + +Several arithmetic corrections in this release produce different results for +integer inputs compared to 0.16.x. The affected operations are listed below so +that users can validate downstream expectations. + +**Please consider the below carefully before upgrading:** + +- **Integer array division now floors toward negative infinity.** Previously the +SIMD and scalar kernel paths used Rust's truncating `/` (toward zero). Both +`Divide` and `FloorDiv` now floor consistently, matching Python and NumPy +semantics. For example, `-7 / 2` at the array kernel level was `-3` and is now +`-4`. Unsigned integer division is unaffected. + +- **Scalar integer division returns `Scalar::Float64`.** `Scalar::Int64(-7) / +Scalar::Int64(2)` was `Scalar::Int64(-3)` and is now `Scalar::Float64(-3.5)`. +Division by zero follows IEEE 754 (Inf/NaN) instead of panicking. + +- **Integer power with an out-of-range exponent.** Previously an exponent that +did not fit `u32` was silently treated as 0, returning 1. The kernel now panics +for dense arrays and nullifies the lane for masked arrays. Integer power +overflow wraps consistently with add/subtract/multiply. + +### Added +- `Display` implementation for `Value` and every constituent type that + previously lacked one: `Matrix`, `NdArray`, `NdArrayV`, `SuperNdArray`, + `SuperNdArrayV`, `SuperArrayV`, `SuperTableV`, `XArray` and `Cube`. Each + type's output matches the register of the existing `Table` display, with + `MAX_PREVIEW` truncation for large data. +- `Bitmask` iteration kernels (`iter_window_bits`) with a SIMD fast path on + x86-64. `Bitmask::iter_set()` and `iter_cleared()` now run in + O(matching_bits) rather than O(total_bits). +- `BitmaskV` gains `get_unchecked` and now derives `Copy`. +- `as_tuple_ref()` on `BooleanArrayV`, `TextArrayV` and `TemporalArrayV` for + borrow-only access without `Arc::clone`. +- `TemporalArray::time_unit()` and `TemporalArrayV::time_unit()` returning the + backing `TimeUnit`. +- `TryFrom> for Array` for end-to-end concatenation. +- `TryFrom for Scalar` for single-element extraction. +- `Array::set_range(range, scalar)` and `Array::set(idx, Scalar::Null)` for + in-place range fills and null masking. +- Broadened `TryFrom` and `From` impls across `BoxValue`, `ArcValue`, + `SuperArray`, `SuperNdArray`, `SuperTable`, `NdArrayV`, `Cube` and their view + counterparts. Wrapped values now unwrap transparently. +- `ArrowType::minarrow_category_label()` returning high-level type categories. +- `CategoricalIndexType::arrow_index_name()` for the Arrow index type string. +- `Cube::from_table(table, col, name)` for splitting a table into a cube along + a column's distinct values. + +### Changed +- `ArrayV::gather_indices` rewritten for throughput: single variant match per + gather, bulk null mask transfer, x86-64 prefetch hints, and `TableV` gather + now delegates per-column to avoid duplicated per-type logic. +- `Cube::from_table` grouping uses hash-based value equality via + `hash_element_at` and `value_eq` instead of per-row string allocation. +- `cube` feature now implies `views`, `select` and `hash`. +- `Cube` has had various semantic improvements to its operation. +- `libc` dependency is now optional, gated behind the `memfd` feature. +- `log` dependency is now optional, included in default features. When disabled, + `warn!` falls back to `eprintln!`. +- `vec64` dependency bumped to 0.5.0 for Rust nightly compatibility. + +### Fixed +- `Value::len()` for `ArrayView` variants now returns the view length instead + of the backing array length. +- `NumericArrayV::guarantee_f64()` returns a windowed `BitmaskV` aligned with + the data slice, fixing misaligned null masks on non-zero-offset views. +- Schema-level metadata preserved during arena-based table consolidation when + the `table_metadata` feature is enabled. + +# Minarrow-py / Minarrow-pyo3 + +## 0.17.0 - 2026-08-15 + +### Added +- `PyMatrix` class with construction from rows, columns or a `PyTable`, + indexing, transpose, row/column extraction and `to_table()`. +- `PyCube` class with construction from a list of tables, positional and named + indexing, iteration, and `from_table` for column-based splitting. +- Temporal dtype support in `build_array`: `Date32`, `Date64`, `Time32`, + `Time64`, `Duration32`, `Duration64` and `Timestamp` with unit specifiers. +- `py_to_scalar` publicly re-exported from minarrow-py. +- `PyArray` and `PyTable` publicly re-exported from minarrow-py for downstream + pyo3 crates. +- Efficient `read_sequence` extraction into `Vec64`, avoiding double + allocation through pyo3's `Vec` path. + +### Changed +- `parse_dtype` categorical alias respects `default_categorical_8`, returning + `UInt8` when that feature is active. +- `default_categorical_8` feature propagates from minarrow-py to minarrow-pyo3. +- Bumped minarrow dependency to 0.17.0. + +--- + ## 0.16.2 - 2026-07-23 ### Added diff --git a/Cargo.lock b/Cargo.lock index 541357b..ca11020 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1667,7 +1667,7 @@ dependencies = [ [[package]] name = "minarrow" -version = "0.16.2" +version = "0.17.0" dependencies = [ "ahash", "arrow", diff --git a/Cargo.toml b/Cargo.toml index 6c36df6..4816839 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "minarrow" -version = "0.16.2" +version = "0.17.0" edition = "2024" authors = ['Peter G. Bower'] build = "build.rs" diff --git a/minarrow-py/Cargo.lock b/minarrow-py/Cargo.lock index 4a28354..51d624c 100644 --- a/minarrow-py/Cargo.lock +++ b/minarrow-py/Cargo.lock @@ -28,7 +28,7 @@ checksum = "953f07c43838f8e6f9758cab68bf5bed85465e7587ebe0b823f1bcd81978ad3a" [[package]] name = "minarrow" -version = "0.16.2" +version = "0.17.0" dependencies = [ "log", "num-traits", @@ -37,7 +37,7 @@ dependencies = [ [[package]] name = "minarrow-py" -version = "0.16.1" +version = "0.17.0" dependencies = [ "minarrow", "minarrow-pyo3", @@ -48,7 +48,7 @@ dependencies = [ [[package]] name = "minarrow-pyo3" -version = "0.16.2" +version = "0.17.0" dependencies = [ "minarrow", "pyo3", @@ -197,6 +197,6 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "vec64" -version = "0.4.7" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14d6d15c0dbb3d2929a916fe20a15e7d04e787c9fbc29b3940e0654b11482c6" +checksum = "94b5a35bf381f20a9d41312bd977f43e997ab5bc82deb85b503b3346e6a437b7" diff --git a/minarrow-py/Cargo.toml b/minarrow-py/Cargo.toml index e70d16a..975dc75 100644 --- a/minarrow-py/Cargo.toml +++ b/minarrow-py/Cargo.toml @@ -2,7 +2,7 @@ cargo-features = ["trim-paths"] [package] name = "minarrow-py" -version = "0.16.1" +version = "0.17.0" edition = "2024" authors = ["Peter G. Bower"] license = "Apache-2.0" @@ -19,8 +19,8 @@ name = "minarrow_py" crate-type = ["cdylib", "rlib"] [dependencies] -minarrow = { version = "0.16", path = ".." } -minarrow-pyo3 = { version = "0.16", path = "../pyo3", optional = true, default-features = false } +minarrow = { version = "0.17", path = ".." } +minarrow-pyo3 = { version = "0.17", path = "../pyo3", optional = true, default-features = false } pyo3 = { version = "0.29", features = ["abi3-py39"] } thiserror = "2" diff --git a/minarrow-py/pyproject.toml b/minarrow-py/pyproject.toml index b3d8a51..24cfe29 100644 --- a/minarrow-py/pyproject.toml +++ b/minarrow-py/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "minarrow" -version = "0.16.0" +version = "0.17.0" description = "Minimal, straightforward and fast SIMD-compatible Apache Arrow inter-op for Python." readme = "README.md" requires-python = ">=3.9" diff --git a/pyo3/CHANGELOG.md b/pyo3/CHANGELOG.md index 7569896..6fd292e 100644 --- a/pyo3/CHANGELOG.md +++ b/pyo3/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.17.0] - 2026-08-15 +- Bumped `minarrow` dependency from 0.16.2 to 0.17.0. + ## [0.16.2] - 2026-07-23 - Bumped `minarrow` dependency from 0.16.1 to 0.16.2. diff --git a/pyo3/Cargo.lock b/pyo3/Cargo.lock index 6a33543..489ab20 100644 --- a/pyo3/Cargo.lock +++ b/pyo3/Cargo.lock @@ -28,7 +28,7 @@ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "minarrow" -version = "0.16.2" +version = "0.17.0" dependencies = [ "log", "num-traits", @@ -37,7 +37,7 @@ dependencies = [ [[package]] name = "minarrow-pyo3" -version = "0.16.2" +version = "0.17.0" dependencies = [ "minarrow", "pyo3", @@ -186,6 +186,6 @@ checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "vec64" -version = "0.4.7" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14d6d15c0dbb3d2929a916fe20a15e7d04e787c9fbc29b3940e0654b11482c6" +checksum = "94b5a35bf381f20a9d41312bd977f43e997ab5bc82deb85b503b3346e6a437b7" diff --git a/pyo3/Cargo.toml b/pyo3/Cargo.toml index b71b84d..1c778cf 100644 --- a/pyo3/Cargo.toml +++ b/pyo3/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "minarrow-pyo3" -version = "0.16.2" +version = "0.17.0" edition = "2024" authors = ['Peter G. Bower'] license = "Apache-2.0" @@ -24,7 +24,7 @@ name = "minarrow_pyo3" crate-type = ["cdylib", "rlib"] [dependencies] -minarrow = { version = "0.16.2", path = "..", features = ["large_string"] } +minarrow = { version = "0.17.0", path = "..", features = ["large_string"] } pyo3 = { version = "0.29" } thiserror = "2"