You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on enabling StringView by default in #12092 I found another feature gap that occurs in the ClickBench benchmarks
ClickBench hits_partitioned has a column that resolves to Binary (BinaryView after #12092) that is then treated as a String (compared to a string, etc).
In order for this to work, DataFusion needs to know it is ok to cast to String. It knows how to do this for Binary --> Utf8 but not BinaryView --> Utf8View, etc. Without this running ClickBench on hits_partitioned does not work.
A small example is like
> create table foo asvalues (arrow_cast('one', 'BinaryView'), arrow_cast('two', 'BinaryView'));
0 row(s) fetched.
Elapsed 0.006 seconds.
>select column1 like'o%'from foo;
type_coercion
caused by
Error during planning: There isn't a common type to coerce BinaryView and Utf8 in LIKE expression
Describe the solution you'd like
Add coercion rules for BinaryView --> Utf8/Utf8View
Is your feature request related to a problem or challenge?
Part of #11752
While working on enabling StringView by default in #12092 I found another feature gap that occurs in the ClickBench benchmarks
ClickBench
hits_partitioned
has a column that resolves toBinary
(BinaryView
after #12092) that is then treated as a String (compared to a string, etc).In order for this to work, DataFusion needs to know it is ok to cast to String. It knows how to do this for
Binary
-->Utf8
but notBinaryView
-->Utf8View
, etc. Without this running ClickBench onhits_partitioned
does not work.A small example is like
Describe the solution you'd like
Describe alternatives you've considered
Fix the relevant code here:
datafusion/datafusion/expr-common/src/type_coercion/binary.rs
Lines 1037 to 1045 in a08f923
(you can see what I had to do on #12092)
Add a test in sqllogictest
Perhaps in this file:
datafusion/datafusion/sqllogictest/test_files/binary.slt
Lines 228 to 233 in a08f923
Additional context
No response
The text was updated successfully, but these errors were encountered: