You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "nrc (via GitHub)" <gi...@apache.org> on 2024/08/20 09:10:46 UTC

[I] `strpos` (and `postion` and `instr`) throw a cast error when called with arguments of different types [datafusion]

nrc opened a new issue, #12071:
URL: https://github.com/apache/datafusion/issues/12071

   ### 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_


-- 
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: github-unsubscribe@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] `strpos` (and `postion` and `instr`) throw a cast error when called with arguments of different types [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #12071: `strpos` (and `postion` and `instr`) throw a cast error when called with arguments of different types
URL: https://github.com/apache/datafusion/issues/12071


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org