Skip to content

Commit 374169f

Browse files
committed
chen - address comment and merge grammar in parser
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
1 parent 5e4f26e commit 374169f

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

core/src/main/java/org/opensearch/sql/calcite/CalciteRelNodeVisitor.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2127,10 +2127,7 @@ private void buildExpandRelNode(
21272127
}
21282128
}
21292129

2130-
/**
2131-
* Creates an optimized sed call using native Calcite functions where possible. Falls back to
2132-
* custom REX_SED for complex cases.
2133-
*/
2130+
/** Creates an optimized sed call using native Calcite functions */
21342131
private RexNode createOptimizedSedCall(
21352132
RexNode fieldRex, String sedExpression, CalcitePlanContext context) {
21362133
if (sedExpression.startsWith("s/")) {

ppl/src/main/antlr/OpenSearchPPLParser.g4

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,7 @@ rexExpr
286286

287287
rexOption
288288
: MAX_MATCH EQUAL maxMatch=integerLiteral
289-
| MODE EQUAL EXTRACT
290-
| MODE EQUAL SED
289+
| MODE EQUAL (EXTRACT | SED)
291290
| OFFSET_FIELD EQUAL offsetField=qualifiedName
292291
;
293292
patternsMethod

0 commit comments

Comments
 (0)