theirix commented on code in PR #21737:
URL: https://github.com/apache/datafusion/pull/21737#discussion_r4187385317
##########
datafusion/catalog/src/information_schema.rs:
##########
@@ -454,118 +455,98 @@ impl InformationSchemaConfig {
}
}
-/// get the arguments and return types of a UDF
-/// returns a tuple of (arg_types, return_type)
+/// Origins used to enumerate the physical types a native type can take
+const RESOLVE_CAST_SOURCES: [DataType; 2] = [DataType::Null,
DataType::LargeUtf8];
+
+/// Build argument fields for `information_schema` to provide possible return
types
+fn resolve_informational_fields(idx: usize, t: &NativeType) ->
Result<Vec<FieldRef>> {
+ // Since native types map to several physical types, resolve it against
+ // ambiguous types to get canonical `DataType`s for the native type
+ let data_types = RESOLVE_CAST_SOURCES
Review Comment:
It's reasonable, since `default_cast_for` cannot handle it on its own - added
--
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]