dlovell opened a new pull request, #8463:
URL: https://github.com/apache/arrow-datafusion/pull/8463

   ## Which issue does this PR close?
   
   Closes #8118 
   
   ## Rationale for this change
   
   Datafusion can read in data with / have structs with fields of different 
types, but currently can't create a struct column with fields of different 
types: struct creation casts of all the struct fields to the same type.
   
   ## What changes are included in this PR?
   
   This PR defines `TypeSignature::VariadicLimited` and assigns it as the 
return type of `BuiltinScalarFunction::Struct`. 
`TypeSignature::VariadicLimited` is like a `TypeSignature::VariadicAny` with a 
limited definition of `Any` and is distinct from `TypeSignature::Variadic` in 
that it does not cast any fields.
   
   ## Are these changes tested?
   
   There is a test for a successful and an unsuccessful invocation of 
`get_valid_types` for `TypeSignature::VariadicLimited`
   
   ## Are there any user-facing changes?
   
   The type of the generated struct column will be different: users who are 
expecting a cast will be surprised.


-- 
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]

Reply via email to