universalmind303 opened a new issue, #9139:
URL: https://github.com/apache/arrow-datafusion/issues/9139

   ### Is your feature request related to a problem or challenge?
   
   Currently there is no way to express a type signature over a function of 
`FixedSizeList<T; N>` where `N` is not constant. 
   
   For example, If I have a function that takes in a FixedSizeList of any 
length, it's currently impossible to express that through the typesignatures
   
   I'd have to enumerate every number within a range that I want to support. 
   ```rs
   let f64_inner = Arc::new(Field::new("item", DataType::Float64, false));
   let f64_fsl_1 = DataType::FixedSizeList(f64_inner.clone(), 1);
   let f64_fsl_2 = DataType::FixedSizeList(f64_inner.clone(), 2);
   let f64_fsl_3 = DataType::FixedSizeList(f64_inner.clone(), 3);
   // ...
   
   let sig = Signature::uniform(
       2,
       vec![
           f64_fsl_1, 
           f64_fsl_2, 
           f64_fsl_3,
           // ...
       ],
       Volatility::Immutable,
   );
   
   ```
   
   
   
   ### Describe the solution you'd like
   
   Idk exactly what the solution I would want would look like, but the 
ergonomics around `FixedSizeList` could definitely use some improvements. 
   
   ### Describe alternatives you've considered
   
   enumerating a wide range of potential fixed lengths, or allowing some way to 
use List here in the typesignature, but retain fixedsizelist as the actual 
type. 
   
   ### Additional context
   
   I'm trying to make some similarity exprs that take in a uniform 
fixedsizelistarray
   
   something like
   ```sql
   cosine_similarity([1.0], [2.0]);
   cosine_similarity([1.0, 2.0], [3.0, 4.0]);
   cosine_similarity([1.0, 2.0, 3.0], [4.0, 5.0, 6.0]);
   cosine_similarity(c1, c2);
   cosine_similarity([1.0], c2);
   ```
   
   the function requires that the values are of the same length, but can be 
applied on a fixedsizelist of any arbitrary length.
   


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