CurtHagenlocher opened a new pull request, #4919:
URL: https://github.com/apache/arrow-adbc/pull/4919

   ## What's changed
   
   The ADO.NET client now reads and binds the canonical extension types that 
Apache.Arrow 23 implements.
   
   | Extension | .NET value | Binding |
   |---|---|---|
   | `arrow.uuid` | `Guid` | `DbType.Guid` (from a `Guid`, a string, or 16 
bytes) |
   | `arrow.bool8` | `bool` | — |
   | `arrow.timestamp_with_offset` | `DateTimeOffset`, keeping the original 
offset | — |
   | `arrow.parquet.variant` | JSON string or `Dictionary`/`List`/scalar, 
depending on `StructBehavior` | — |
   | any other extension type | the storage value | — |
   
   Previously, any extension column made the reader throw 
`NotSupportedException`.
   
   ### Drivers loaded through the C API
   
   `CArrowArrayStreamImporter` doesn't take an extension registry, so a native 
driver's UUID column arrives as `fixed_size_binary(16)` with only 
`ARROW:extension:name` in its field metadata. The reader resolves these fields 
using the built-in definitions plus anything registered in 
`ExtensionTypeRegistry.Default`, then wraps the storage column in the extension 
array the first time it's read in each batch. The new 
`AdbcDataReader.GetArrowArray(ordinal)` returns that wrapped array. Once 
apache/arrow-dotnet#466 adds a registry overload to the stream importer, this 
becomes a fallback.
   
   ### Other changes
   
   - `IArrowArrayExtensions.ValueAt` and `GetValueConverter` handle 
`GuidArray`, `Bool8Array`, `TimestampWithOffsetArray`, and fall back to storage 
for other extension arrays. They also now support `fixed_size_binary`.
   - `Prepare()` maps uuid, bool8 and timestamp_with_offset parameters to 
`DbType.Guid`, `DbType.Boolean` and `DbType.DateTimeOffset`.
   - `DbType.DateTimeOffset` parameters are bound as UTC timestamps, which 
every driver understands; the original offset is not sent.
   - The client now references `Apache.Arrow.Operations` to read shredded 
variants and to format variants as JSON. The core library has no new dependency.
   - The client readme documents the mappings.
   
   ### Tests
   
   - Mocked-driver tests cover each type, both as real extension arrays and as 
storage with extension metadata, plus user-registered definitions, unknown 
extension types, parameter binding and `Prepare()`.
   - A DuckDB test with `arrow_lossless_conversion` reads UUID and BOOLEAN as 
`Guid` and `bool` and round-trips `Guid` parameters. DuckDB 1.5.6 can't export 
VARIANT over Arrow, so variants are only covered by the mocked tests.
   
   Closes #4918.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


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