theirix commented on code in PR #21737:
URL: https://github.com/apache/datafusion/pull/21737#discussion_r4183587271
##########
datafusion/catalog/src/information_schema.rs:
##########
@@ -454,26 +454,32 @@ impl InformationSchemaConfig {
}
}
+/// Build the argument field for `information_schema` to provide a return type
+fn resolve_informational_field(idx: usize, t: &NativeType) -> Result<FieldRef>
{
+ // Since a native type maps to several physical types, resolve it against
`Null` data type
+ // to get the canonical `DataType` for the native type
+ let data_type = t.default_cast_for(&DataType::Null)?;
Review Comment:
Yes, it's a tie between logical type and physical type. Changed to resolve
ambiguity by checking more types, not just null. It allows emitting int32 and
int64 as expected.
Also, refactored three udf/udaf/udwf functions into one to reduce code
duplication.
--
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]