You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2025/06/04 09:55:54 UTC
(shardingsphere) branch master updated: Add rlike sql convert (#35584)
This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 0b6a6dab21d Add rlike sql convert (#35584)
0b6a6dab21d is described below
commit 0b6a6dab21d7e6bae4eeff9a51f9570731ca6aaf
Author: ZhangCheng <ch...@apache.org>
AuthorDate: Wed Jun 4 17:55:47 2025 +0800
Add rlike sql convert (#35584)
---
.../sql/ast/converter/operator/common/SQLExtensionOperatorTable.java | 2 ++
.../segment/expression/impl/BinaryOperationExpressionConverter.java | 1 +
2 files changed, 3 insertions(+)
diff --git a/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/operator/common/SQLExtensionOperatorTable.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/operator/common/SQLExtensionOperatorTable.java
index 49fb541e940..c68001f4301 100644
--- a/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/operator/common/SQLExtensionOperatorTable.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/operator/common/SQLExtensionOperatorTable.java
@@ -71,4 +71,6 @@ public final class SQLExtensionOperatorTable {
public static final SqlFunction INTERVAL_OPERATOR =
new SqlFunction("INTERVAL_OPERATOR", SqlKind.OTHER, ReturnTypes.BIGINT_NULLABLE, InferTypes.FIRST_KNOWN, OperandTypes.VARIADIC, SqlFunctionCategory.STRING);
+
+ public static final SqlBinaryOperator RLIKE = new SqlBinaryOperator("RLIKE", SqlKind.MATCH_RECOGNIZE, 30, true, ReturnTypes.INTEGER, InferTypes.VARCHAR_1024, OperandTypes.ANY_ANY);
}
diff --git a/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/BinaryOperationExpressionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/BinaryOperationExpressionConverter.java
index 69fffbc08f4..45884239475 100644
--- a/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/BinaryOperationExpressionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/BinaryOperationExpressionConverter.java
@@ -87,6 +87,7 @@ public final class BinaryOperationExpressionConverter {
register(SQLExtensionOperatorTable.SOUNDS_LIKE);
register(SQLExtensionOperatorTable.NULL_SAFE);
register(SQLExtensionOperatorTable.ASSIGNMENT);
+ register(SQLExtensionOperatorTable.RLIKE);
}
private static void register(final SqlOperator sqlOperator) {