EeshanBembi opened a new pull request, #21458:
URL: https://github.com/apache/datafusion/pull/21458

   ## Which issue does this PR close?
   
   Closes #21144
   
   ## Rationale for this change
   
   PR #20312 added the extension type registry framework with UUID 
pretty-printing support. This PR implements `DFExtensionType` for the remaining 
six Arrow canonical extension types so they are recognized and correctly 
formatted by 
`MemoryExtensionTypeRegistry::new_with_canonical_extension_types()`.
   
   ## What changes are included in this PR?
   
   Added `DFExtensionType` implementations for:
   
   - **`Bool8`** (`arrow.bool8`): displays `Int8` values as `true`/`false` 
instead of raw integers (zero → `false`, non-zero → `true`)
   - **`Json`** (`arrow.json`): registered with default string formatter; 
values are already valid UTF-8 JSON
   - **`Opaque`** (`arrow.opaque`): registered with default formatter; storage 
type is `Null` per the spec recommendation
   - **`FixedShapeTensor`** (`arrow.fixed_shape_tensor`): registered with 
default `FixedSizeList` formatter; `storage_type()` computed from `value_type` 
and `list_size`
   - **`VariableShapeTensor`** (`arrow.variable_shape_tensor`): registered with 
default `Struct` formatter; `storage_type()` computed from `value_type` and 
`dimensions`
   - **`TimestampWithOffset`** (`arrow.timestamp_with_offset`): registered with 
default `Struct` formatter
   
   All six types are wired into 
`MemoryExtensionTypeRegistry::new_with_canonical_extension_types()`.
   
   New files:
   - `datafusion/common/src/types/canonical_extensions/bool8.rs`
   - `datafusion/common/src/types/canonical_extensions/json.rs`
   - `datafusion/common/src/types/canonical_extensions/opaque.rs`
   - `datafusion/common/src/types/canonical_extensions/fixed_shape_tensor.rs`
   - `datafusion/common/src/types/canonical_extensions/variable_shape_tensor.rs`
   - `datafusion/common/src/types/canonical_extensions/timestamp_with_offset.rs`
   
   ## Are there any user-facing changes?
   
   `MemoryExtensionTypeRegistry::new_with_canonical_extension_types()` now 
registers all 7 Arrow canonical extension types (previously only UUID). 
Sessions using this registry will now pretty-print `Bool8` columns as 
`true`/`false` and have all other canonical types properly recognized.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to