Jefffrey commented on code in PR #21737:
URL: https://github.com/apache/datafusion/pull/21737#discussion_r3408970299
##########
datafusion/catalog/src/information_schema.rs:
##########
@@ -411,26 +412,136 @@ impl InformationSchemaConfig {
}
}
+/// Resolve a native type `NativeType` to `DataType` for use in the
information schema
+/// Since it is one-to-many, use the most representative type on tie
+fn get_data_type_for_schema(native_type: &NativeType) -> Result<DataType> {
+ match native_type {
+ NativeType::Null => Ok(DataType::Null),
+ NativeType::Boolean => Ok(DataType::Boolean),
+ NativeType::Int8 => Ok(DataType::Int8),
+ NativeType::Int16 => Ok(DataType::Int16),
+ NativeType::Int32 => Ok(DataType::Int32),
Review Comment:
It feels like we're just moving this logic from where it was in
`get_example_types` to here; I think to properly work towards closing the
original issue we might need a larger rework around how datatypes work with
information schema, otherwise we're still stuck with this datatype <--->
nativetype interwork no matter where we move it 🤔
--
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]