strpos
(and postion
and instr
) throw a cast error when called with arguments of different types
#12071
Labels
bug
Something isn't working
Describe the bug
strpos
accepts two arguments either of which may beUtf8
orLargeUtf8
. However, if the argument types don't match, then the function throws a cast error.To Reproduce
E.g., run
SELECT position('foo' in some_col) from table;
where the column type ofsome_col
isLargeUtf8
. Results inerror: could not cast value to arrow_array::array::byte_array::GenericByteArray<arrow_array::types::GenericStringType<i32>> ...
.Expected behavior
There should be no error.
Additional context
No response
The text was updated successfully, but these errors were encountered: