alamb opened a new issue, #19004:
URL: https://github.com/apache/datafusion/issues/19004

   ### Is your feature request related to a problem or challenge?
   
   After https://github.com/apache/datafusion/pull/18820 is merged, running 
this query:
   
   ```sql
   select array_slice(arrow_cast(make_array(1, 2, 3, 4, 5), 'ListView(Int64)'), 
0, 6),
          array_slice(arrow_cast(make_array('h', 'e', 'l', 'l', 'o'), 
'ListView(Utf8)'), 0, 5);
   ```
   
   Results in a very hard to interpret error message:
   
   > DataFusion error: Error during planning: Failed to coerce arguments to 
satisfy a call to 'array_slice' function: coercion from ListView(Int64), Int64, 
Int64 to the signature OneOf([ArraySignature(Array { arguments: [Array, Index, 
Index], array_coercion: Some(FixedSizedListToList) }), ArraySignature(Array { 
arguments: [Array, Index, Index, Index], array_coercion: 
Some(FixedSizedListToList) })]) failed No function matches the given name and 
argument types 'array_slice(ListView(Int64), Int64, Int64)'. You might need to 
add explicit type casts.
   
   As a user I would be pretty hard pressed to understand the actual problem is 
that array_slice doesn't support the `ListView` type
   
   
   ### Describe the solution you'd like
   
   I would like the error message to be more human readable
   
   Perhaps smoethinglike 
   
   > DataFusion error: Error during planning: Failed to coerce arguments to 
satisfy a call to 'array_slice' function: coercion from ListView(Int64), Int64, 
Int64 to the signature '(Array, Index, Index)' or '(Array Index, Index, Index).
   
   
   I am not really sure how to work in the information that "Array" in this 
context means ListArray, LargeListArray or FixedSizeListArray
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


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

Reply via email to