Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Support the "re2j" regex library #20

Open
beckjake opened this issue Apr 3, 2020 · 0 comments
Open

Support the "re2j" regex library #20

beckjake opened this issue Apr 3, 2020 · 0 comments

Comments

@beckjake
Copy link
Contributor

beckjake commented Apr 3, 2020

If you edit /etc/config.properties you can set a regex-library flag to a value of JONI (the default) or RE2J. Setting it to RE2J and doing dbt run results in:

  Runtime Error
    PrestoUserError(type=USER_ERROR, name=INVALID_FUNCTION_ARGUMENT, message="error parsing regexp: invalid escape sequence: `\Z`", query_id=20200403_133843_00004_agst6)

There are some extremely vague docs here and the project github (I assume!) is here. The presto docs are a little incomplete, at best - they don't really make any effort to explain that some valid JONI patterns aren't allowed. The presto page gives this list of caveats. I believe the issue is with Matcher.requireEnd(), but regardless that's quite a list!

I think we should enable RE2J in our test image, because I think RE2J's regex pattern support is a strict subset of JONI's. Then we should fix the bugs, there's at least one!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant