JingsongLi opened a new pull request, #1413: URL: https://github.com/apache/paimon-rust/pull/1413
### Purpose Expose exact typed VARIANT extraction to Python. The existing numeric-field helper produces float32 output, which cannot retain int64 or Decimal128 precision and does not cover PyPaimon's other supported scalar and nested types. ### Brief change log - Add `pypaimon_rust.data.variant_get(column, path, data_type)` backed by Rust binary-path extraction, without implicit casts. - Support booleans, signed integers, float32/64, strings, binary, dates, microsecond timestamps, Decimal128, and recursive structs, lists and string-keyed maps. - Preserve PyArrow field annotations, opaque metadata, custom/NUL-containing names and decimal scales by restoring schema wrappers around shared buffers; handle Binary/LargeBinary input children and Int32 dictionary metadata; reject unsupported extension targets before their logical identity is lost. - Cover null/missing paths, narrowing overflow, decimal precision, nested field annotations, valid nonnullable child slices, empty end slices and invalid payloads. ### Tests - Python VARIANT and read suites: 265 passed. - Rust VARIANT tests with Rust 1.98.0 and `storage-all,internal-api`: 79 passed; 2 manual benchmarks ignored. - `cargo +1.98.0 clippy --locked -p pypaimon_rust --lib -- -D warnings`. - `cargo +1.98.0 fmt --all -- --check` and `git diff --check`. - Direct differential checks against PyPaimon's Python extraction implementation: 2,914 scalar checks, 448 nested/schema/layout checks and eight existing numeric-helper checks passed. ### API and Format Adds the Python `data.variant_get` function and the corresponding Rust Arrow helper. Persistent VARIANT encoding is unchanged. ### Documentation Updates the Python type stub and Python integration documentation with supported types, exact extraction semantics and error behavior. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
