alamb opened a new issue, #5479:
URL: https://github.com/apache/arrow-datafusion/issues/5479
**Describe the bug**
`regexp_match` appears to return an empty list rather than the part of the
string matched.
**To Reproduce**
Using datafusion-cli
```sql
❯ create table foo as values ('foo'), ('bar'), ('foobar');
0 rows in set. Query took 0.000 seconds.
❯ select * from foo;
+---------+
| column1 |
+---------+
| foo |
| bar |
| foobar |
+---------+
❯ select regexp_match(column1, 'foo') from foo;
+--------------------------------------+
| regexpmatch(foo.column1,Utf8("foo")) |
+--------------------------------------+
| [] |. <-- note this is empty, not 'foo'!
| |
| [] |. <-- this too!
+--------------------------------------+
3 rows in set. Query took 0.001 seconds.
```
**Expected behavior**
I expect the result to be two lists of `foo`, like postgres:
```sql
postgres=# create table foo as values ('foo'), ('bar'), ('foobar');
SELECT 3
postgres=# select * from foo;
column1
---------
foo
bar
foobar
(3 rows)
postgres=# select regexp_match(column1, 'foo') from foo;
regexp_match
--------------
{foo}
{foo}
(3 rows)
```
**Additional context**
Found by @sanderson on https://github.com/influxdata/docs-v2/pull/4774
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]