sdf-jkl opened a new issue, #26866: URL: https://github.com/apache/datafusion/issues/26866
### Is your feature request related to a problem or challenge? `DESCRIBE`, `SHOW COLUMNS`, and `information_schema.columns` report the Arrow storage type of a column, even when its field metadata identifies an extension type. For example, a UUID column is reported as `FixedSizeBinary(16)`. This hides the logical type from users and tools inspecting the schema. Downstream applications can register extension types and customize how their values are displayed, but there is no corresponding hook for their type names in schema introspection. ### Describe the solution you'd like Allow registered extension types to provide a display name, and use it consistently in: - `DESCRIBE` output; - `information_schema.columns.data_type`; - `SHOW COLUMNS`, which reads `information_schema.columns`. For example, a registered UUID type could display as `UUID` instead of `FixedSizeBinary(16)`. The mechanism should also support downstream extension types, including parameterized names when their metadata requires them. Resolve the name using the field's extension metadata and the query session's registry. Preserve existing storage-type display for ordinary fields and extensions without a registered name override. A naming hook on `DFExtensionType` could be cool. Add SLT coverage for the introspection paths and fallback behavior using registered extension types. ### Describe alternatives you've considered Applications can rewrite introspection results themselves, but each application then has to handle the different schema-inspection paths. Showing the raw `ARROW:extension:name` would expose the type identifier, but would not allow a friendly or parameterized name. ### Additional context Currently, both [`plan_describe`](https://github.com/apache/datafusion/blob/8733e2edc6f694a1abba81a1e5c8aaba2d005f68/datafusion/core/src/physical_planner.rs#L3435-L3453) and [information-schema column construction](https://github.com/apache/datafusion/blob/8733e2edc6f694a1abba81a1e5c8aaba2d005f68/datafusion/catalog/src/information_schema.rs#L1015-L1016) format `field.data_type()` directly. [`DFExtensionType`](https://github.com/apache/datafusion/blob/8733e2edc6f694a1abba81a1e5c8aaba2d005f68/datafusion/common/src/types/extension.rs#L59) has a value-formatter hook but no type-name hook. Related work: - Part of [#12644 — Support Extension Types / User Defined Types in DataFusion](https://github.com/apache/datafusion/issues/12644). - [#20312](https://github.com/apache/datafusion/pull/20312) introduced the extension registry and value-formatting support. - [#21714](https://github.com/apache/datafusion/pull/21714) maps SQL UUID and JSON types to extension-tagged fields. This feature would expose those logical types during schema introspection, as well as types registered by downstream applications. - [#18277](https://github.com/apache/datafusion/pull/18277), closed without merging, explored displaying types with metadata in plan and scalar representations. -- 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]
