crate / crate/crate

Treat `~` operator in a regex pattern in `RegexpMatchOperator`

Open
#17,482 0 comments 0 reactions 0 assignees View on GitHub
feature: sql: scalars
Dominant language
Java
Stars
4.4k
Forks
616
Avg merge
14h 49m
Merged PRs (30d)
206

Description

Lucene 10 deprecated the COMPLEMENT flag, see:
https://github.com/apache/lucene/pull/13732

With: https://github.com/apache/lucene/pull/13739 bwc was added
and the flag was renamed from COMPLEMENT to DEPRECATED_COMPLEMENT,
but the support will be dropped in future Lucene 11. Additionally,
the RegExp.ALL flags no longer contain the DEPRECATED_COMPLEMENT.

With: https://github.com/crate/crate/pull/17472 we fixed this issue to make
the `~` work as before (Lucene 9), but with Lucene 11 the flag and functionality will be removed.

So, we'd probably need to forbid (first deprecate) the usage of `~` for lucene regexp, as complement will work only
for character classes and not expressions.

More info:
When the `~` wraps a whole pattern then we could treat it like in: https://github.com/crate/crate/pull/17436 but when it's inside a pattern
and applied to an sub-expression, this approach won't work.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.