Subodh-17 opened a new pull request, #12280:
URL: https://github.com/apache/arrow-rs/pull/12280

   ## Summary
   
   Fixes #12214.
   
   When `variant_get` fails to cast a Variant value into a string or binary 
array, the error message can expose internal Rust builder type names instead of 
the corresponding canonical Arrow data type names.
   
   This change provides explicit human-readable type names for the affected 
builders:
   
   - `GenericStringBuilder<O>`: `Utf8` / `LargeUtf8`
   - `GenericBinaryBuilder<O>`: `Binary` / `LargeBinary`
   - `StringViewBuilder`: `Utf8View`
   - `BinaryViewBuilder`: `BinaryView`
   
   The offset-size distinction uses `O::IS_LARGE`, preserving the existing 
builder abstraction.
   
   ## Tests
   
   Added builder-level unit tests and `variant_get` regression tests covering:
   
   - `Utf8`
   - `LargeUtf8`
   - `Utf8View`
   - `Binary`
   - `LargeBinary`
   - `BinaryView`
   
   The regression tests also preserve the `Int32` control case and assert that 
internal Rust builder type names do not leak into the user-facing error 
messages.
   
   ## Validation
   
   - `cargo test -p arrow-array --lib` — targeted builder tests passed.
   - `cargo test -p parquet-variant-compute --lib` — 375 tests passed.
   - `cargo fmt --all -- --check` — passed.
   - `cargo clippy -p arrow-array -p parquet-variant-compute --all-targets -- 
-D warnings` — passed.
   - `git diff --check` — passed.
   - End-to-end reproducer — verified all six canonical type names.
   
   Relates to 
https://github.com/datafusion-contrib/datafusion-variant/issues/173.
   


-- 
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]

Reply via email to