jayzhan211 opened a new issue, #13195:
URL: https://github.com/apache/datafusion/issues/13195
### Is your feature request related to a problem or challenge?
Bit length for example doesn't support utf8view yet.
```
query error
select bit_length(arrow_cast('a', 'Utf8View'));
----
DataFusion error: Optimizer rule 'optimize_projections' failed
caused by
optimize_projections
caused by
Internal error: Failed due to a difference in schemas, original schema:
DFSchema { inner: Schema { fields: [Field { name:
"bit_length(arrow_cast(Utf8(\"a\"),Utf8(\"Utf8View\")))", data_type: Int32,
nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }], metadata:
{} }, field_qualifiers: [None], functional_dependencies: FunctionalDependencies
{ deps: [] } }, new schema: DFSchema { inner: Schema { fields: [Field { name:
"bit_length(arrow_cast(Utf8(\"a\"),Utf8(\"Utf8View\")))", data_type: Int64,
nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }], metadata:
{} }, field_qualifiers: [None], functional_dependencies: FunctionalDependencies
{ deps: [] } }.
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
statement ok
create table test_source as values
('Andrew', 'X'),
('Xiangpeng', 'Xiangpeng'),
('Raphael', 'R'),
(NULL, 'R');
# Table with the different combination of column types
statement ok
create table test as
SELECT
arrow_cast(column1, 'Utf8View') as column1_utf8view
FROM test_source;
query error DataFusion error: Arrow error: Compute error: bit_length not
supported for Utf8View
select bit_length(column1_utf8view) from test;
```
### Describe the solution you'd like
I hope we can support utf8view for all the string functions
### 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]