jayzhan211 commented on code in PR #21737:
URL: https://github.com/apache/datafusion/pull/21737#discussion_r4155661435
##########
parquet-testing:
##########
Review Comment:
Do we need this change?
##########
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:
Resolving each `NativeType` against `Null` collapses `String` to `Utf8View`,
so string functions that return `Int64` for `LargeUtf8` lose that row. Diffing
`information_schema.routines`/`parameters` against the base shows the `Int64`
OUT row disappearing for `bit_length`, `char_length`, `character_length`,
`find_in_set`, `instr`, `length`, `levenshtein`, `octet_length`, `position`,
`strpos`. If that's intended, please pin it in `information_schema.slt` and
mention it under user-facing changes:
```sql
query TT rowsort
select routine_name, data_type from information_schema.routines where
routine_name = 'length';
----
length Int32
```
--
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]