alamb commented on issue #7142:
URL: 
https://github.com/apache/arrow-datafusion/issues/7142#issuecomment-1810272533

   > ArrayAppend has signature Any(2). We don't have a way to know it has null 
so we need to convert it. Maybe we should review 
https://github.com/apache/arrow-datafusion/issues/7580?
   
   I haven't had a chance to review #7580 in depth
   
   However, I agree one core problem is there is no current signature that can 
express something like "the first agument is a ListArray and the subsequent 
arguments must be the same element type of that list"
   
   Perhaps we can either:
   1.  add a `TypeSignture` variant that expresses this concept somehow
   2. Add a `TypeSignature` that has custom rules (via a trait or something)
   
   Something like
   
   ```rust
   trait SignatureComputation {
    /// Returns a Vec of all possible valid argument types for this signature. 
    fn get_valid_types( 
        &self,
        signature: &TypeSignature, 
        current_types: &[DataType], 
    ) -> Result<Vec<Vec<DataType>>>;
   ```
   
   And then 
   ```rust
   enum TypeSignature { 
    ...
    Computation(Arc<dyn SignatureComputation),
   ...
   }
   ```
   
   Which would allow arbitrarily complex type signatures
   
   
    


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