Skip to content

Commit 5abcc3d

Browse files
committed
fix the behavior when calcite enable but pushdown disabled
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
1 parent 387915b commit 5abcc3d

2 files changed

Lines changed: 3 additions & 40 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,10 @@ public RelNode visitRegex(Regex node, CalcitePlanContext context) {
196196

197197
private RexNode createRegexMatchRexNode(
198198
RexNode field, RexNode pattern, CalcitePlanContext context) {
199-
// Create a function call that will be specifically handled by our script engine
200-
// This bypasses the standard regex routing and ensures PCRE2 usage
199+
// Use the UDF version that has proper enumerable implementation support
200+
// This ensures PCRE2 usage for both pushdown and in-memory execution
201201
return context.rexBuilder.makeCall(
202-
org.opensearch.sql.calcite.rex.RegexMatchOperator.INSTANCE, field, pattern);
202+
org.opensearch.sql.expression.function.PPLBuiltinOperators.REGEX_MATCH, field, pattern);
203203
}
204204

205205
private boolean containsSubqueryExpression(Node expr) {

core/src/main/java/org/opensearch/sql/calcite/rex/RegexMatchOperator.java

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)