Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

# Minarrow Rust

## 0.18.3 - 2026-10-01 Nightly Compatibility Release

## Added
* `arrow_type` on `NumericArray`, `TextArray` and `TemporalArray`.
* `Value::fields`, returning the fields that describe a value's columns.
* `PyInput` and `From` implementations in minarrow-py.

## Maintenance
* Compatibility with the 2026-09-30 Rust nightly, which moves the unstable allocator surface to `allocator_ext`. Requires that nightly or later.
* Upgraded vec64 to 0.5.3.

## 0.18.2 Minor Enhancements Release

## Added
Expand All @@ -33,7 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

* Typed, row-wise accessors (e.g., `.get_u64(i)`) on `ArrayView` including hot path variants that skip bounds checks.
* Typed, row-wise accessors (e.g., `.get_u64(i)`) on `ArrayView` including hot path variants that skip bounds checks.
* **Decimal array support** behind the `decimal` feature flag.
* Added `DecimalArray<T>` for Decimal32, Decimal64, and Decimal128.
* Supports configurable precision and scale.
Expand All @@ -57,8 +68,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Adds `SuperArray::check_type_uniformity()`, gated to the same feature,
reporting whether all chunks have the same `ArrowType`.
* Ensures that a `Field`, when present, still guarantees that describes every chunk. Attaching a field to non-uniform chunks is rejected. Hence, it is not possible to create
a `SuperTable` with mixed `SuperArray`s either, as that would be contractually incorrect.
* With the feature off, behaviour is unchanged.
a `SuperTable` with mixed `SuperArray`s either, as that would be contractually incorrect.
* With the feature off, behaviour is unchanged.
* `fa_dt32!` and `fa_dt64!` macros for building a named `FieldArray` of datetimes.
* KernelError::Overflow(String) enum error type.

Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
[package]
name = "minarrow"
version = "0.18.2"
version = "0.18.3"
edition = "2024"
authors = ['Peter G. Bower']
build = "build.rs"
# Gives dependent build scripts the source root as `DEP_MINARROW_ROOT`, for
# generators that read minarrow's conversions with `syn`.
links = "minarrow"
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/pbower/minarrow"
Expand Down
6 changes: 6 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ fn has_feature(list: &str, feature: &str) -> bool {
}

fn main() {
// The source root, published to dependent build scripts as `DEP_MINARROW_ROOT`.
println!(
"cargo:root={}",
env::var("CARGO_MANIFEST_DIR").expect("cargo sets CARGO_MANIFEST_DIR")
);

////////////////////////////////////////////////////////////////
// C-FFI Integration tests
////////////////////////////////////////////////////////////////
Expand Down
8 changes: 4 additions & 4 deletions minarrow-py/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions minarrow-py/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ homepage = "https://github.com/pbower/minarrow"
readme = "README.md"
keywords = ["arrow", "columnar", "dataframe", "pyarrow", "analytics"]
description = "Minimal, straightforward and fast SIMD-compatible Apache Arrow inter-op for Python."
# Gives dependent build scripts the source root as `DEP_MINARROW_PY_ROOT`, for
# generators that read the conversions from the Python classes with `syn`.
links = "minarrow_py"

[workspace]

Expand Down
5 changes: 5 additions & 0 deletions minarrow-py/build.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
fn main() {
pyo3_build_config::use_pyo3_cfgs();
// The source root, published to dependent build scripts as `DEP_MINARROW_PY_ROOT`.
println!(
"cargo:root={}",
std::env::var("CARGO_MANIFEST_DIR").expect("cargo sets CARGO_MANIFEST_DIR")
);
}
2 changes: 1 addition & 1 deletion minarrow-py/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# minarrow (through vec64) uses allocator_api and portable_simd, which are only
# minarrow (through vec64) uses allocator_ext and portable_simd, which are only
# available on the nightly toolchain. cargo selects it automatically here, so
# local builds, CI, and source installs all use the right channel.
[toolchain]
Expand Down
10 changes: 10 additions & 0 deletions minarrow-py/src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,16 @@ impl From<&PyArray> for ArrayV {
}
}

impl From<&PyArray> for Array {
fn from(py_array: &PyArray) -> Self {
match &py_array.0 {
PyArrayInner::Array(array) => (**array).clone(),
PyArrayInner::Field(field) => field.array.clone(),
PyArrayInner::View(view) => view.to_array(),
}
}
}

#[pymethods]
impl PyArray {
/// Construct from a Python sequence, inferring the dtype. `None` elements
Expand Down
13 changes: 13 additions & 0 deletions minarrow-py/src/arrow_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ impl From<PyTimeUnit> for TimeUnit {
}
}

#[cfg(feature = "datetime")]
impl From<&PyTimeUnit> for TimeUnit {
fn from(unit: &PyTimeUnit) -> Self {
(*unit).into()
}
}

/// The unit of an interval type. Mirrors `minarrow::IntervalUnit`.
#[cfg(feature = "datetime")]
#[pyclass(from_py_object, eq, eq_int, name = "IntervalUnit", module = "minarrow")]
Expand Down Expand Up @@ -296,6 +303,12 @@ py_arrow_type_numeric!([
Dictionary { index: PyCategoricalIndexType },
]);

impl From<&PyArrowType> for ArrowType {
fn from(dtype: &PyArrowType) -> Self {
dtype.clone().into()
}
}

#[pymethods]
impl PyArrowType {
fn __repr__(&self) -> String {
Expand Down
12 changes: 12 additions & 0 deletions minarrow-py/src/cube.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ impl From<Cube> for PyCube {
}
}

impl From<&PyCube> for Cube {
fn from(py_cube: &PyCube) -> Self {
(*py_cube.0).clone()
}
}

impl From<&PyCube> for Arc<Cube> {
fn from(py_cube: &PyCube) -> Self {
py_cube.0.clone()
}
}

/// The table at `index`, as the Python object carrying it.
fn table_at(cube: &Cube, index: usize) -> Option<PyTable> {
cube.table(index)
Expand Down
6 changes: 6 additions & 0 deletions minarrow-py/src/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ use crate::dtype::{dtype_from_arrow, DType};
#[derive(Clone)]
pub struct PyField(pub Field);

impl From<&PyField> for Field {
fn from(py_field: &PyField) -> Self {
py_field.0.clone()
}
}

#[pymethods]
impl PyField {
/// Construct from a name and an `ArrowType`. `metadata` is a string mapping.
Expand Down
6 changes: 6 additions & 0 deletions minarrow-py/src/matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ impl From<Matrix> for PyMatrix {
}
}

impl From<&PyMatrix> for Matrix {
fn from(py_matrix: &PyMatrix) -> Self {
py_matrix.0.clone()
}
}

#[pymethods]
impl PyMatrix {
/// Build a matrix from rows, each row a list of the same length.
Expand Down
24 changes: 24 additions & 0 deletions minarrow-py/src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,30 @@ impl From<TableV> for PyTable {
}
}

impl From<&PyTable> for TableV {
fn from(py_table: &PyTable) -> Self {
py_table.0.as_view()
}
}

impl From<&PyTable> for Table {
fn from(py_table: &PyTable) -> Self {
match &py_table.0 {
PyTableInner::Owned(table) => (**table).clone(),
PyTableInner::View(view) => view.to_table(),
}
}
}

impl From<&PyTable> for Arc<Table> {
fn from(py_table: &PyTable) -> Self {
match &py_table.0 {
PyTableInner::Owned(table) => table.clone(),
PyTableInner::View(view) => Arc::new(view.to_table()),
}
}
}

#[pymethods]
impl PyTable {
/// Construct from a dict of column name to sequence. Columns must share a
Expand Down
3 changes: 3 additions & 0 deletions pyo3/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.18.3] - 2026-10-01
- Bumped `minarrow` dependency from 0.18.2 to 0.18.3 for compatibility with the 2026-09-30 Rust nightly.

## [0.18.2] - 2026-09-19
- Bumped `minarrow` dependency from 0.18.1 to 0.18.2.

Expand Down
8 changes: 4 additions & 4 deletions pyo3/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyo3/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "minarrow-pyo3"
version = "0.18.2"
version = "0.18.3"
edition = "2024"
authors = ['Peter G. Bower']
license = "Apache-2.0"
Expand All @@ -24,7 +24,7 @@ name = "minarrow_pyo3"
crate-type = ["cdylib", "rlib"]

[dependencies]
minarrow = { version = "0.18.2", path = "..", features = ["large_string"] }
minarrow = { version = "0.18.3", path = "..", features = ["large_string"] }
pyo3 = { version = "0.29" }
thiserror = "2"

Expand Down
Loading