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

Add support for global 'g' flag on regexp_matches #10041

Closed
marregui opened this issue Jun 3, 2020 · 1 comment
Closed

Add support for global 'g' flag on regexp_matches #10041

marregui opened this issue Jun 3, 2020 · 1 comment
Assignees

Comments

@marregui
Copy link
Contributor

marregui commented Jun 3, 2020

This friendly guy ignores global setting when used in the context of scalar function regexp-matches.

Postgres:

select regexp_matches('#abc #def #ghi', '(#[^\s]*)', 'g');
 regexp_matches
----------------
 {#abc}
 {#def}
 {#ghi}
(3 rows)

CrateDB:

select regexp_matches('#abc #def #ghi', '(#[^\s]*)', 'g');
 ['#abc']
----------
 {"#abc"}
(1 row)

Use case:
https://community.crate.io/t/regexp-matches-with-global-flag-returns-wrong-data/232/2

@marregui marregui added the triage An issue that needs to be triaged by a maintainer label Jun 3, 2020
@seut
Copy link
Member

seut commented Jun 3, 2020

@seut seut changed the title regexp-matches ignores global 'g' flag Add support for global 'g' flag on regexp_matches Jun 3, 2020
@seut seut added feature: sql: scalars and removed triage An issue that needs to be triaged by a maintainer labels Jun 3, 2020
@marregui marregui self-assigned this Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants