diff --git a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/SelectStatementBinder.java b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/SelectStatementBinder.java index 3f0cf8244b2a2..ef581e72d4b20 100644 --- a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/SelectStatementBinder.java +++ b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/SelectStatementBinder.java @@ -32,7 +32,6 @@ import org.apache.shardingsphere.infra.binder.engine.segment.predicate.HavingSegmentBinder; import org.apache.shardingsphere.infra.binder.engine.segment.predicate.WhereSegmentBinder; import org.apache.shardingsphere.infra.binder.engine.segment.projection.ProjectionsSegmentBinder; -import org.apache.shardingsphere.infra.binder.engine.segment.with.WithSegmentBinder; import org.apache.shardingsphere.infra.binder.engine.statement.SQLStatementBinder; import org.apache.shardingsphere.infra.binder.engine.statement.SQLStatementBinderContext; import org.apache.shardingsphere.infra.binder.engine.util.SubqueryTableBindUtils; diff --git a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/GeneralDQLE2EIT.java b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/GeneralDQLE2EIT.java index 3fb3f146b528c..9379586c32fe8 100644 --- a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/GeneralDQLE2EIT.java +++ b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/GeneralDQLE2EIT.java @@ -65,8 +65,7 @@ private void assertExecuteQuery(final AssertionTestParameter testParam, final E2 private void assertExecuteQueryWithXmlExpected(final AssertionTestParameter testParam, final E2ETestContext context) throws SQLException { // TODO Fix jdbc adapter and empty_storage_units proxy adapter - if ("jdbc".equals(testParam.getAdapter()) && !"empty_storage_units".equalsIgnoreCase(testParam.getScenario()) - || "proxy".equals(testParam.getAdapter()) && "empty_storage_units".equalsIgnoreCase(testParam.getScenario())) { + if (isNeedSkipExecuteQueryWithXmlExcepted(testParam)) { return; } if (SQLExecuteType.LITERAL == context.getSqlExecuteType()) { @@ -76,6 +75,11 @@ private void assertExecuteQueryWithXmlExpected(final AssertionTestParameter test } } + private boolean isNeedSkipExecuteQueryWithXmlExcepted(final AssertionTestParameter testParam) { + return "jdbc".equals(testParam.getAdapter()) && !"empty_storage_units".equalsIgnoreCase(testParam.getScenario()) + || "proxy".equals(testParam.getAdapter()) && "empty_storage_units".equalsIgnoreCase(testParam.getScenario()); + } + private void assertQueryForStatementWithXmlExpected(final E2ETestContext context) throws SQLException { try ( Connection connection = getEnvironmentEngine().getTargetDataSource().getConnection(); @@ -161,7 +165,7 @@ private void assertExecute(final AssertionTestParameter testParam, final E2ETest private void assertExecuteWithXmlExpected(final AssertionTestParameter testParam, final E2ETestContext context) throws SQLException { // TODO Fix jdbc adapter - if ("jdbc".equals(testParam.getAdapter())) { + if (isNeedSkipExecuteWithXmlExcepted(testParam)) { return; } if (SQLExecuteType.LITERAL == context.getSqlExecuteType()) { @@ -171,6 +175,10 @@ private void assertExecuteWithXmlExpected(final AssertionTestParameter testParam } } + private boolean isNeedSkipExecuteWithXmlExcepted(final AssertionTestParameter testParam) { + return "jdbc".equals(testParam.getAdapter()); + } + private void assertExecuteForStatementWithXmlExpected(final E2ETestContext context) throws SQLException { try ( Connection connection = getEnvironmentEngine().getTargetDataSource().getConnection();