diff --git a/distribution/proxy/src/main/release-docs/LICENSE b/distribution/proxy/src/main/release-docs/LICENSE index 43e9a15b987ce..1536b420fc9e0 100644 --- a/distribution/proxy/src/main/release-docs/LICENSE +++ b/distribution/proxy/src/main/release-docs/LICENSE @@ -222,8 +222,8 @@ The text of each license is the standard Apache 2.0 license. avatica-core 1.23.0: https://calcite.apache.org/avatica, Apache 2.0 avatica-metrics 1.23.0: https://calcite.apache.org/avatica, Apache 2.0 caffeine 2.9.3: https://github.com/ben-manes/caffeine, Apache 2.0 - calcite-core 1.35.0: https://calcite.apache.org, Apache 2.0 - calcite-linq4j 1.35.0: https://calcite.apache.org, Apache 2.0 + calcite-core 1.36.0: https://calcite.apache.org, Apache 2.0 + calcite-linq4j 1.36.0: https://calcite.apache.org, Apache 2.0 commons-codec 1.16.0: https://github.com/apache/commons-codec, Apache 2.0 commons-dbcp2 2.6.0: https://commons.apache.org/proper/commons-dbcp, Apache 2.0 commons-exec 1.3: https://github.com/apache/commons-exec, Apache 2.0 diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/CaseWhenExpressionConverter.java b/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/CaseWhenExpressionConverter.java index 6f7b36bfddef4..dfbb5ee60ae7b 100644 --- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/CaseWhenExpressionConverter.java +++ b/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/CaseWhenExpressionConverter.java @@ -30,6 +30,7 @@ import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.ExpressionSegment; import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter; +import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.Collection; import java.util.LinkedList; @@ -53,7 +54,7 @@ public static Optional convert(final CaseWhenExpression segment) { segment.getThenExprs().forEach(each -> ExpressionConverter.convert(each).ifPresent(thenExprs::add)); Optional elseExpr = ExpressionConverter.convert(segment.getElseExpr()); return Optional.of(new SqlCase(SqlParserPos.ZERO, null, new SqlNodeList(whenExprs, SqlParserPos.ZERO), new SqlNodeList(thenExprs, SqlParserPos.ZERO), - elseExpr.orElseGet(() -> SqlLiteral.createCharString("NULL", SqlParserPos.ZERO)))); + elseExpr.orElseGet(() -> SqlLiteral.createCharString("NULL", StandardCharsets.UTF_8.name(), SqlParserPos.ZERO)))); } private static Collection convertWhenExprs(final ExpressionSegment caseExpr, final Collection whenExprs) { diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/LiteralExpressionConverter.java b/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/LiteralExpressionConverter.java index 26a74e5904182..726ad19c6b1f1 100644 --- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/LiteralExpressionConverter.java +++ b/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/LiteralExpressionConverter.java @@ -28,6 +28,7 @@ import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.simple.LiteralExpressionSegment; import java.math.BigDecimal; +import java.nio.charset.StandardCharsets; import java.util.Collection; import java.util.HashSet; import java.util.Optional; @@ -75,7 +76,7 @@ public static Optional convert(final LiteralExpressionSegment segment) return Optional.of(SqlLiteral.createExactNumeric(literalValue, SqlParserPos.ZERO)); } if (segment.getLiterals() instanceof String) { - return Optional.of(SqlLiteral.createCharString(literalValue, SqlParserPos.ZERO)); + return Optional.of(SqlLiteral.createCharString(literalValue, StandardCharsets.UTF_8.name(), SqlParserPos.ZERO)); } return Optional.empty(); } diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/MatchExpressionConverter.java b/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/MatchExpressionConverter.java index 69ebb4d7a4911..f8b040194e42d 100644 --- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/MatchExpressionConverter.java +++ b/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/MatchExpressionConverter.java @@ -29,6 +29,7 @@ import org.apache.shardingsphere.sqlfederation.optimizer.converter.operator.common.SQLExtensionOperatorTable; import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; @@ -55,7 +56,7 @@ public static Optional convert(final MatchAgainstExpression segment) { names.add(segment.getColumnName().getIdentifier().getValue()); sqlNodes.add(new SqlIdentifier(names, SqlParserPos.ZERO)); ExpressionConverter.convert(segment.getExpr()).ifPresent(sqlNodes::add); - SqlNode searchModifier = SqlLiteral.createCharString(segment.getSearchModifier(), SqlParserPos.ZERO); + SqlNode searchModifier = SqlLiteral.createCharString(segment.getSearchModifier(), StandardCharsets.UTF_8.name(), SqlParserPos.ZERO); sqlNodes.add(searchModifier); return Optional.of(new SqlBasicCall(SQLExtensionOperatorTable.MATCH_AGAINST, sqlNodes, SqlParserPos.ZERO)); } diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/TrimFunctionConverter.java b/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/TrimFunctionConverter.java index 25acb57823100..6c8c385e76154 100644 --- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/TrimFunctionConverter.java +++ b/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/TrimFunctionConverter.java @@ -33,6 +33,7 @@ import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.FunctionSegment; import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter; +import java.nio.charset.StandardCharsets; import java.util.Collection; import java.util.LinkedList; import java.util.List; @@ -61,7 +62,7 @@ private static List getTrimFunctionParameters(final Collection result = new LinkedList<>(); if (1 == sqlSegments.size()) { result.add(Flag.BOTH.symbol(SqlParserPos.ZERO)); - result.add(SqlLiteral.createCharString(" ", SqlParserPos.ZERO)); + result.add(SqlLiteral.createCharString(" ", StandardCharsets.UTF_8.name(), SqlParserPos.ZERO)); } if (2 == sqlSegments.size()) { result.add(Flag.BOTH.symbol(SqlParserPos.ZERO)); diff --git a/kernel/sql-federation/optimizer/src/test/resources/cases/federation-query-sql-cases.xml b/kernel/sql-federation/optimizer/src/test/resources/cases/federation-query-sql-cases.xml index fbfc970006cba..4314d52b31018 100644 --- a/kernel/sql-federation/optimizer/src/test/resources/cases/federation-query-sql-cases.xml +++ b/kernel/sql-federation/optimizer/src/test/resources/cases/federation-query-sql-cases.xml @@ -58,7 +58,7 @@ - + @@ -74,7 +74,7 @@ - + @@ -190,7 +190,7 @@ - + @@ -426,15 +426,15 @@ - + - + - + diff --git a/pom.xml b/pom.xml index 4fccc1a4e8451..e96d7df92a28a 100644 --- a/pom.xml +++ b/pom.xml @@ -82,7 +82,7 @@ 2.9.0 2.4.10 2.4.9 - 9.3 + 9.6 4.0.10 2.3.31 1.14.8 @@ -90,8 +90,8 @@ 8.0.0 2.3.9 - 1.35.0 - 2.9.3 + 1.36.0 + 2.10.0 6.0.0 5.12.4.Final