This is an automated email from the ASF dual-hosted git repository.
terrymanu 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 f1cb20ba4e9 Mark remaining MySQL functions unsupported in SQL
Federation (#39910)
f1cb20ba4e9 is described below
commit f1cb20ba4e95e1c87aea2e163658b92c102b907d
Author: Liang Zhang <[email protected]>
AuthorDate: Mon Sep 21 09:59:54 2026 +0800
Mark remaining MySQL functions unsupported in SQL Federation (#39910)
---
.../mysql/MySQLSQLFederationFunctionRegister.java | 50 +++++++++++++++++++++-
.../MySQLSQLFederationFunctionRegisterTest.java | 50 +++++++++++++++++++++-
2 files changed, 98 insertions(+), 2 deletions(-)
diff --git
a/kernel/sql-federation/dialect/mysql/src/main/java/org/apache/shardingsphere/sqlfederation/mysql/MySQLSQLFederationFunctionRegister.java
b/kernel/sql-federation/dialect/mysql/src/main/java/org/apache/shardingsphere/sqlfederation/mysql/MySQLSQLFederationFunctionRegister.java
index 1417adbaede..0b344afabd3 100644
---
a/kernel/sql-federation/dialect/mysql/src/main/java/org/apache/shardingsphere/sqlfederation/mysql/MySQLSQLFederationFunctionRegister.java
+++
b/kernel/sql-federation/dialect/mysql/src/main/java/org/apache/shardingsphere/sqlfederation/mysql/MySQLSQLFederationFunctionRegister.java
@@ -40,7 +40,55 @@ public final class MySQLSQLFederationFunctionRegister
implements DialectSQLFeder
@Override
public Collection<String> getUnsupportedFunctionNames() {
- return Arrays.asList("LENGTH", "BIT_LENGTH", "LOCATE", "DATABASE");
+ return Arrays.asList(
+ "AES_DECRYPT",
+ "AES_ENCRYPT",
+ "BENCHMARK",
+ "BIN",
+ "BIT_LENGTH",
+ "CEILING",
+ "CHAR",
+ "CHARSET",
+ "COERCIBILITY",
+ "CONV",
+ "CRC32",
+ "DATABASE",
+ "ELT",
+ "EXPORT_SET",
+ "FIELD",
+ "FIND_IN_SET",
+ "FORMAT",
+ "FROM_UNIXTIME",
+ "HEX",
+ "INSERT",
+ "LCASE",
+ "LEAST",
+ "LENGTH",
+ "LOAD_FILE",
+ "LOCATE",
+ "LOG",
+ "LOG2",
+ "LPAD",
+ "LTRIM",
+ "MAKE_SET",
+ "MID",
+ "OCT",
+ "OCTET_LENGTH",
+ "ORD",
+ "POW",
+ "QUOTE",
+ "REGEXP_INSTR",
+ "REGEXP_LIKE",
+ "REGEXP_SUBSTR",
+ "RPAD",
+ "RTRIM",
+ "SHA",
+ "SUBSTRING",
+ "SUBSTRING_INDEX",
+ "TIMEDIFF",
+ "UCASE",
+ "UNHEX",
+ "WEIGHT_STRING");
}
@Override
diff --git
a/kernel/sql-federation/dialect/mysql/src/test/java/org/apache/shardingsphere/sqlfederation/mysql/MySQLSQLFederationFunctionRegisterTest.java
b/kernel/sql-federation/dialect/mysql/src/test/java/org/apache/shardingsphere/sqlfederation/mysql/MySQLSQLFederationFunctionRegisterTest.java
index 4d1c342f6d4..b01e2dea654 100644
---
a/kernel/sql-federation/dialect/mysql/src/test/java/org/apache/shardingsphere/sqlfederation/mysql/MySQLSQLFederationFunctionRegisterTest.java
+++
b/kernel/sql-federation/dialect/mysql/src/test/java/org/apache/shardingsphere/sqlfederation/mysql/MySQLSQLFederationFunctionRegisterTest.java
@@ -60,6 +60,54 @@ class MySQLSQLFederationFunctionRegisterTest {
@Test
void assertGetUnsupportedFunctionNames() {
- assertThat(register.getUnsupportedFunctionNames(),
containsInAnyOrder("LENGTH", "BIT_LENGTH", "LOCATE", "DATABASE"));
+ assertThat(register.getUnsupportedFunctionNames(), containsInAnyOrder(
+ "AES_DECRYPT",
+ "AES_ENCRYPT",
+ "BENCHMARK",
+ "BIN",
+ "BIT_LENGTH",
+ "CEILING",
+ "CHAR",
+ "CHARSET",
+ "COERCIBILITY",
+ "CONV",
+ "CRC32",
+ "DATABASE",
+ "ELT",
+ "EXPORT_SET",
+ "FIELD",
+ "FIND_IN_SET",
+ "FORMAT",
+ "FROM_UNIXTIME",
+ "HEX",
+ "INSERT",
+ "LCASE",
+ "LEAST",
+ "LENGTH",
+ "LOAD_FILE",
+ "LOCATE",
+ "LOG",
+ "LOG2",
+ "LPAD",
+ "LTRIM",
+ "MAKE_SET",
+ "MID",
+ "OCT",
+ "OCTET_LENGTH",
+ "ORD",
+ "POW",
+ "QUOTE",
+ "REGEXP_INSTR",
+ "REGEXP_LIKE",
+ "REGEXP_SUBSTR",
+ "RPAD",
+ "RTRIM",
+ "SHA",
+ "SUBSTRING",
+ "SUBSTRING_INDEX",
+ "TIMEDIFF",
+ "UCASE",
+ "UNHEX",
+ "WEIGHT_STRING"));
}
}