findepi commented on issue #11785:
URL: https://github.com/apache/datafusion/issues/11785#issuecomment-2644158363
This is still a problem. The error message requires the index to be Int64,
but it doesn't work even if it is Int64
```
query error
SELECT column1[arrow_cast(1, 'Int64')] FROM map_array_table_1
----
DataFusion error: Error during planning: Failed to coerce arguments to
satisfy a call to 'array_element' function: coercion from [Map(Field { name:
"entries", data_type: Struct([Field { name: "key", data_type: Int64, nullable:
false, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name:
"value", data_type: List(Field { name: "item", data_type: Int64, nullable:
true, dict_id: 0, dict_is_ordered: false, metadata: {} }), nullable: true,
dict_id: 0, dict_is_ordered: false, metadata: {} }]), nullable: false, dict_id:
0, dict_is_ordered: false, metadata: {} }, false), Int64] to the signature
ArraySignature(ArrayAndIndexes(1)) failed No function matches the given name
and argument types 'array_element(Map(Field { name: "entries", data_type:
Struct([Field { name: "key", data_type: Int64, nullable: false, dict_id: 0,
dict_is_ordered: false, metadata: {} }, Field { name: "value", data_type:
List(Field { name: "item", data_type: Int64, nullable: true, dict_id: 0,
dict_is_ordered:
false, metadata: {} }), nullable: true, dict_id: 0, dict_is_ordered: false,
metadata: {} }]), nullable: false, dict_id: 0, dict_is_ordered: false,
metadata: {} }, false), Int64)'. You might need to add explicit type casts.
Candidate functions:
array_element(array, index)
```
cc @jayzhan211
--
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]