Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strpos (and postion and instr) throw a cast error when called with arguments of different types #12071

Closed
nrc opened this issue Aug 20, 2024 · 0 comments · Fixed by #12072
Closed
Labels
bug Something isn't working

Comments

@nrc
Copy link
Contributor

nrc commented Aug 20, 2024

Describe the bug

strpos accepts two arguments either of which may be Utf8 or LargeUtf8. 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 of some_col is LargeUtf8. Results in error: 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant