You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "goldmedal (via GitHub)" <gi...@apache.org> on 2024/09/28 15:08:41 UTC
[I] `REGEX_LIKE` and `REGEX_MATCH` don't support `LargeUtf8` type [datafusion]
goldmedal opened a new issue, #12664:
URL: https://github.com/apache/datafusion/issues/12664
### Describe the bug
While working on #12415, I found `REGEX_LIKE` and `REGEX_MATCH` don't support `LargeUtf8` type.
### To Reproduce
It can be reproduced by the following SQL
```
> select regexp_like(arrow_cast('abcdef', 'LargeUtf8'), 'bc');
Internal error: could not cast value to arrow_array::array::byte_array::GenericByteArray<arrow_array::types::GenericStringType<i64>>.
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
> select regexp_match(arrow_cast('abcdef', 'LargeUtf8'), 'bc');
Internal error: could not cast value to arrow_array::array::byte_array::GenericByteArray<arrow_array::types::GenericStringType<i64>>.
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
```
### Expected behavior
They should work well like `Utf8`
```
> select regexp_like(arrow_cast('abcdef', 'Utf8'), 'bc');
+-----------------------------------------------------------------+
| regexp_like(arrow_cast(Utf8("abcdef"),Utf8("Utf8")),Utf8("bc")) |
+-----------------------------------------------------------------+
| true |
+-----------------------------------------------------------------+
1 row(s) fetched.
Elapsed 0.010 seconds.
> select regexp_match(arrow_cast('abcdef', 'Utf8'), 'bc');
+------------------------------------------------------------------+
| regexp_match(arrow_cast(Utf8("abcdef"),Utf8("Utf8")),Utf8("bc")) |
+------------------------------------------------------------------+
| [bc] |
+------------------------------------------------------------------+
1 row(s) fetched.
Elapsed 0.016 seconds.
```
### 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