>From Rithwik Koul <[email protected]>:

Attention is currently required from: Rithwik Koul.

Hello Anon. E. Moose #1000171, Jenkins,

I'd like you to reexamine a change. Please visit

    https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21227?usp=email

to look at the new patch set (#10).

The following approvals got outdated and were removed:
Contrib-2 by Anon. E. Moose #1000171, Integration-Tests+1 by Jenkins, 
Verified+1 by Jenkins


Change subject: [NO TICKET][RT] Surface ASX1113 for invalid regex patterns - 
user model changes: no - storage format changes: no - interface changes: no
......................................................................

[NO TICKET][RT] Surface ASX1113 for invalid regex patterns
- user model changes: no
- storage format changes: no
- interface changes: no

Details : Wrap Pattern.compile in RegExpMatcher.build with try/catch for
PatternSyntaxException; rethrow as RuntimeDataException with the existing
INVALID_REGEX_PATTERN(1113) error code. Previously, invalid regex patterns
in regex_matches / regex_replace / regex_split / regex_position /
regex_contains / regex_like (and their flag/offset variants) plus the
SQL LIKE operator surfaced as generic "Internal error" (code 25000) with
a leaked Java stack trace. The error code already existed in
ErrorCode.INVALID_REGEX_PATTERN and was used in ExternalDataUtils.java
for the same purpose; this patch wires up the runtime evaluator path to
the same convention.

Tests : Add runtime negative test 'regexp_invalid_pattern_negative' under
queries_sqlpp/string/ with four .sqlpp cases exercising distinct
PatternSyntaxException triggers across REGEXP_CONTAINS, REGEXP_LIKE,
REGEXP_REPLACE, and REGEXP_MATCHES: unclosed character class '[',
unclosed group '(abc', dangling quantifier '*xyz', and illegal range
'[z-a]'. Each registered in sqlpp_queries.xml with an <expected-error>
asserting 'ASX1113: Invalid pattern <pattern>' is surfaced rather than
the previous generic ASX25000.

Also: set jdk.xml.{totalEntitySizeLimit, maxGeneralEntitySizeLimit,
maxParameterEntitySizeLimit, entityExpansionLimit}=0 in a static block
on SqlppExecutionTest so the testsuite_sqlpp.xml -> sqlpp_queries.xml
entity expansion (~800KB) is not rejected on JDK 22+ where the JAXP
defaults were lowered to 100,000. Without this, SqlppExecutionTest
fails to initialize on temurin-22 and later.

Ext-ref: NO TICKET
Change-Id: I09b5a2c5fd6fc2e845e88a702f0a4cca00d427da
---
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/runtime/SqlppExecutionTest.java
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_invalid_pattern_negative/regexp_invalid_pattern_negative.1.query.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_invalid_pattern_negative/regexp_invalid_pattern_negative.2.query.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_invalid_pattern_negative/regexp_invalid_pattern_negative.3.query.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_invalid_pattern_negative/regexp_invalid_pattern_negative.4.query.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml
M 
asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/utils/RegExpMatcher.java
7 files changed, 118 insertions(+), 1 deletion(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/27/21227/10
--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21227?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: asterixdb
Gerrit-Branch: lumina
Gerrit-Change-Id: I09b5a2c5fd6fc2e845e88a702f0a4cca00d427da
Gerrit-Change-Number: 21227
Gerrit-PatchSet: 10
Gerrit-Owner: Rithwik Koul <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Attention: Rithwik Koul <[email protected]>

Reply via email to