parkma99 opened a new issue, #6709:
URL: https://github.com/apache/arrow-datafusion/issues/6709
### Describe the bug
As #6693 #6694 reported,`array_length` only return 1 element, and
`array_position` not working as expected.
I test other `array functions`, finding some bugs.
`array_ndims` `array_prepend` `array_remove` only return 1 element,
`array_prepend` `array_remove` also not working as exected.
`array_dims` `array_position` `array_replace` got DataFusion error
### To Reproduce
In `array.slt` file, I add more tests for `array function`
```
statement ok
create table foo3 as values (['abc', 'bac']), (['ac']);
query I
select array_length(column1) from foo3;
----
2
query error DataFusion error: Arrow error: Invalid argument error: column
types must match schema types, expected UInt8 but found List\(Field \{ name:
"item", data_type: UInt8, nullable: true, dict_id: 0, dict_is_ordered: false,
metadata: \{\} \}\) at column index 0
select array_dims(column1) from foo3;
query error DataFusion error: Internal error: Array_fill is not implemented
for type 'Utf8'\.\. This was likely caused by a bug in DataFusion's code and we
would welcome that you file an bug report in our issue tracker
select array_fill('a', column1) from foo3;
query I
select array_ndims(column1) from foo3;
----
1
query error DataFusion error: Arrow error: Invalid argument error: column
types must match schema types, expected UInt8 but found Null at column index 0
select array_position(column1, 'a') from foo3;
query ?
select array_prepend('a', column1) from foo3;
----
[a, a, abc, bac, ac]
query ?
select array_remove(column1, 'a') from foo3;
----
[abc, bac, ac]
query error DataFusion error: SQL error: ParserError\("Expected end of
statement, found: \("\)
select select array_replace(column1,'a', 'a') from foo3;
```
### Expected behavior
_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]