diff --git a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/ddl/CreateTableStatementBinder.java b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/ddl/CreateTableStatementBinder.java index 99960f4fb5409..3885e86ad3367 100644 --- a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/ddl/CreateTableStatementBinder.java +++ b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/ddl/CreateTableStatementBinder.java @@ -53,7 +53,9 @@ private static CreateTableStatement copy(final CreateTableStatement sqlStatement result.getColumns().addAll(sqlStatement.getColumns()); sqlStatement.getLikeTable().ifPresent(result::setLikeTable); sqlStatement.getCreateTableOption().ifPresent(result::setCreateTableOption); + result.addParameterMarkerSegments(sqlStatement.getParameterMarkerSegments()); result.getCommentSegments().addAll(sqlStatement.getCommentSegments()); + result.getVariableNames().addAll(sqlStatement.getVariableNames()); return result; } } diff --git a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/ddl/CursorStatementBinder.java b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/ddl/CursorStatementBinder.java index 6ec851a9620e2..7f5a68f36de63 100644 --- a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/ddl/CursorStatementBinder.java +++ b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/ddl/CursorStatementBinder.java @@ -41,6 +41,7 @@ private static CursorStatement copy(final CursorStatement sqlStatement) { result.setCursorName(sqlStatement.getCursorName()); result.addParameterMarkerSegments(sqlStatement.getParameterMarkerSegments()); result.getCommentSegments().addAll(sqlStatement.getCommentSegments()); + result.getVariableNames().addAll(sqlStatement.getVariableNames()); return result; } } diff --git a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/DeleteStatementBinder.java b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/DeleteStatementBinder.java index 30ad9a5519971..c1c2a3e0b7252 100644 --- a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/DeleteStatementBinder.java +++ b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/DeleteStatementBinder.java @@ -23,7 +23,9 @@ import lombok.SneakyThrows; import org.apache.shardingsphere.infra.binder.engine.segment.from.TableSegmentBinder; import org.apache.shardingsphere.infra.binder.engine.segment.from.context.TableSegmentBinderContext; +import org.apache.shardingsphere.infra.binder.engine.segment.order.OrderBySegmentBinder; import org.apache.shardingsphere.infra.binder.engine.segment.predicate.WhereSegmentBinder; +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.sql.parser.statement.core.statement.dml.DeleteStatement; @@ -37,20 +39,22 @@ public final class DeleteStatementBinder implements SQLStatementBinder tableBinderContexts = LinkedHashMultimap.create(); + sqlStatement.getWithSegment().ifPresent(optional -> result.setWithSegment(WithSegmentBinder.bind(optional, binderContext, binderContext.getExternalTableBinderContexts()))); result.setTable(TableSegmentBinder.bind(sqlStatement.getTable(), binderContext, tableBinderContexts, LinkedHashMultimap.create())); sqlStatement.getWhere().ifPresent(optional -> result.setWhere(WhereSegmentBinder.bind(optional, binderContext, tableBinderContexts, LinkedHashMultimap.create()))); + sqlStatement.getOrderBy().ifPresent(optional -> result.setOrderBy( + OrderBySegmentBinder.bind(optional, binderContext, LinkedHashMultimap.create(), tableBinderContexts, LinkedHashMultimap.create()))); return result; } @SneakyThrows(ReflectiveOperationException.class) private DeleteStatement copy(final DeleteStatement sqlStatement) { DeleteStatement result = sqlStatement.getClass().getDeclaredConstructor().newInstance(); - sqlStatement.getOrderBy().ifPresent(result::setOrderBy); sqlStatement.getLimit().ifPresent(result::setLimit); - sqlStatement.getWithSegment().ifPresent(result::setWithSegment); sqlStatement.getOutputSegment().ifPresent(result::setOutputSegment); result.addParameterMarkerSegments(sqlStatement.getParameterMarkerSegments()); result.getCommentSegments().addAll(sqlStatement.getCommentSegments()); + result.getVariableNames().addAll(sqlStatement.getVariableNames()); return result; } } diff --git a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/InsertStatementBinder.java b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/InsertStatementBinder.java index 5d2ac4a1780a5..f3dd10f268f32 100644 --- a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/InsertStatementBinder.java +++ b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/InsertStatementBinder.java @@ -25,6 +25,7 @@ import org.apache.shardingsphere.infra.binder.engine.segment.expression.type.SubquerySegmentBinder; import org.apache.shardingsphere.infra.binder.engine.segment.from.context.TableSegmentBinderContext; import org.apache.shardingsphere.infra.binder.engine.segment.from.type.SimpleTableSegmentBinder; +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.sql.parser.statement.core.segment.dml.column.ColumnSegment; @@ -44,6 +45,7 @@ public final class InsertStatementBinder implements SQLStatementBinder tableBinderContexts = LinkedHashMultimap.create(); + sqlStatement.getWithSegment().ifPresent(optional -> result.setWithSegment(WithSegmentBinder.bind(optional, binderContext, binderContext.getExternalTableBinderContexts()))); sqlStatement.getTable().ifPresent(optional -> result.setTable(SimpleTableSegmentBinder.bind(optional, binderContext, tableBinderContexts))); if (sqlStatement.getInsertColumns().isPresent() && !sqlStatement.getInsertColumns().get().getColumns().isEmpty()) { result.setInsertColumns(InsertColumnsSegmentBinder.bind(sqlStatement.getInsertColumns().get(), binderContext, tableBinderContexts)); @@ -61,7 +63,6 @@ private InsertStatement copy(final InsertStatement sqlStatement) { result.getValues().addAll(sqlStatement.getValues()); sqlStatement.getSetAssignment().ifPresent(result::setSetAssignment); sqlStatement.getOnDuplicateKeyColumns().ifPresent(result::setOnDuplicateKeyColumns); - sqlStatement.getWithSegment().ifPresent(result::setWithSegment); sqlStatement.getOutputSegment().ifPresent(result::setOutputSegment); sqlStatement.getMultiTableInsertType().ifPresent(result::setMultiTableInsertType); sqlStatement.getMultiTableInsertIntoSegment().ifPresent(result::setMultiTableInsertIntoSegment); @@ -69,6 +70,7 @@ private InsertStatement copy(final InsertStatement sqlStatement) { sqlStatement.getReturningSegment().ifPresent(result::setReturningSegment); result.addParameterMarkerSegments(sqlStatement.getParameterMarkerSegments()); result.getCommentSegments().addAll(sqlStatement.getCommentSegments()); + result.getVariableNames().addAll(sqlStatement.getVariableNames()); return result; } diff --git a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/UpdateStatementBinder.java b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/UpdateStatementBinder.java index ba4744cc5db3a..8c753e4c83e68 100644 --- a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/UpdateStatementBinder.java +++ b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/UpdateStatementBinder.java @@ -24,6 +24,7 @@ import org.apache.shardingsphere.infra.binder.engine.segment.assign.AssignmentSegmentBinder; import org.apache.shardingsphere.infra.binder.engine.segment.from.TableSegmentBinder; import org.apache.shardingsphere.infra.binder.engine.segment.from.context.TableSegmentBinderContext; +import org.apache.shardingsphere.infra.binder.engine.segment.order.OrderBySegmentBinder; import org.apache.shardingsphere.infra.binder.engine.segment.predicate.WhereSegmentBinder; import org.apache.shardingsphere.infra.binder.engine.segment.with.WithSegmentBinder; import org.apache.shardingsphere.infra.binder.engine.statement.SQLStatementBinder; @@ -44,16 +45,18 @@ public UpdateStatement bind(final UpdateStatement sqlStatement, final SQLStateme sqlStatement.getFrom().ifPresent(optional -> result.setFrom(TableSegmentBinder.bind(optional, binderContext, tableBinderContexts, LinkedHashMultimap.create()))); sqlStatement.getAssignmentSegment().ifPresent(optional -> result.setSetAssignment(AssignmentSegmentBinder.bind(optional, binderContext, tableBinderContexts, LinkedHashMultimap.create()))); sqlStatement.getWhere().ifPresent(optional -> result.setWhere(WhereSegmentBinder.bind(optional, binderContext, tableBinderContexts, LinkedHashMultimap.create()))); + sqlStatement.getOrderBy().ifPresent(optional -> result.setOrderBy( + OrderBySegmentBinder.bind(optional, binderContext, LinkedHashMultimap.create(), tableBinderContexts, LinkedHashMultimap.create()))); return result; } @SneakyThrows(ReflectiveOperationException.class) private UpdateStatement copy(final UpdateStatement sqlStatement) { UpdateStatement result = sqlStatement.getClass().getDeclaredConstructor().newInstance(); - sqlStatement.getOrderBy().ifPresent(result::setOrderBy); sqlStatement.getLimit().ifPresent(result::setLimit); result.addParameterMarkerSegments(sqlStatement.getParameterMarkerSegments()); result.getCommentSegments().addAll(sqlStatement.getCommentSegments()); + result.getVariableNames().addAll(sqlStatement.getVariableNames()); return result; } } diff --git a/test/it/binder/src/test/resources/cases/ddl/create-index.xml b/test/it/binder/src/test/resources/cases/ddl/create-index.xml index ae7c22542bbce..602979099b988 100644 --- a/test/it/binder/src/test/resources/cases/ddl/create-index.xml +++ b/test/it/binder/src/test/resources/cases/ddl/create-index.xml @@ -33,7 +33,7 @@ - + diff --git a/test/it/binder/src/test/resources/cases/dml/insert.xml b/test/it/binder/src/test/resources/cases/dml/insert.xml new file mode 100644 index 0000000000000..7ab41a31e2711 --- /dev/null +++ b/test/it/binder/src/test/resources/cases/dml/insert.xml @@ -0,0 +1,188 @@ + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
diff --git a/test/it/binder/src/test/resources/sqls/dml/insert.xml b/test/it/binder/src/test/resources/sqls/dml/insert.xml new file mode 100644 index 0000000000000..1f206df697672 --- /dev/null +++ b/test/it/binder/src/test/resources/sqls/dml/insert.xml @@ -0,0 +1,22 @@ + + + + + + + diff --git a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/column/ColumnAssert.java b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/column/ColumnAssert.java index 1c3a24bf432ee..c12cf29338f98 100644 --- a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/column/ColumnAssert.java +++ b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/column/ColumnAssert.java @@ -22,16 +22,17 @@ import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.column.ColumnSegment; import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.SQLCaseAssertContext; import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.segment.SQLSegmentAssert; -import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.segment.owner.OwnerAssert; +import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.segment.bound.ColumnBoundAssert; import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.segment.identifier.IdentifierValueAssert; +import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.segment.owner.OwnerAssert; import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.column.ExpectedColumn; import java.util.Collection; import java.util.List; import static org.hamcrest.CoreMatchers.is; -import static org.junit.jupiter.api.Assertions.assertFalse; import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; /** @@ -49,6 +50,7 @@ public final class ColumnAssert { */ public static void assertIs(final SQLCaseAssertContext assertContext, final ColumnSegment actual, final ExpectedColumn expected) { IdentifierValueAssert.assertIs(assertContext, actual.getIdentifier(), expected, "Column"); + ColumnBoundAssert.assertIs(assertContext, actual.getColumnBoundInfo(), expected.getColumnBound()); if (null == expected.getOwner()) { assertFalse(actual.getOwner().isPresent(), assertContext.getText("Actual owner should not exist.")); } else { diff --git a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/insert/DerivedInsertColumnsAssert.java b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/insert/DerivedInsertColumnsAssert.java new file mode 100644 index 0000000000000..f3dd4be47ef3b --- /dev/null +++ b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/insert/DerivedInsertColumnsAssert.java @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.shardingsphere.test.it.sql.parser.internal.asserts.segment.insert; + +import lombok.AccessLevel; +import lombok.NoArgsConstructor; +import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.column.ColumnSegment; +import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.SQLCaseAssertContext; +import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.segment.column.ColumnAssert; +import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.insert.ExpectedDerivedInsertColumns; + +import java.util.Collection; + +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.MatcherAssert.assertThat; + +/** + * Derived insert column assert. + */ +@NoArgsConstructor(access = AccessLevel.PRIVATE) +public final class DerivedInsertColumnsAssert { + + /** + * Assert actual derived insert columns is correct with expected derived insert columns. + * + * @param assertContext assert context + * @param actual actual derived insert columns + * @param expected expected derived insert columns + */ + public static void assertIs(final SQLCaseAssertContext assertContext, final Collection actual, final ExpectedDerivedInsertColumns expected) { + assertThat(assertContext.getText("Derived insert column size assertion error: "), actual.size(), is(expected.getColumns().size())); + int count = 0; + for (ColumnSegment each : actual) { + ColumnAssert.assertIs(assertContext, each, expected.getColumns().get(count)); + count++; + } + } +} diff --git a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dml/impl/InsertStatementAssert.java b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dml/impl/InsertStatementAssert.java index 1a8f8e02d41f1..e58a5303d0d73 100644 --- a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dml/impl/InsertStatementAssert.java +++ b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dml/impl/InsertStatementAssert.java @@ -34,6 +34,7 @@ import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.SQLCaseAssertContext; import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.segment.expression.ExpressionAssert; import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.segment.hint.WithTableHintClauseAssert; +import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.segment.insert.DerivedInsertColumnsAssert; import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.segment.insert.InsertColumnsClauseAssert; import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.segment.insert.InsertExecClauseAssert; import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.segment.insert.InsertValuesClauseAssert; @@ -71,6 +72,7 @@ public final class InsertStatementAssert { public static void assertIs(final SQLCaseAssertContext assertContext, final InsertStatement actual, final InsertStatementTestCase expected) { assertTable(assertContext, actual, expected); assertInsertColumnsClause(assertContext, actual, expected); + assertDerivedInsertColumns(assertContext, actual, expected); assertInsertValuesClause(assertContext, actual, expected); assertSetClause(assertContext, actual, expected); assertInsertSelectClause(assertContext, actual, expected); @@ -104,6 +106,15 @@ private static void assertInsertColumnsClause(final SQLCaseAssertContext assertC } } + private static void assertDerivedInsertColumns(final SQLCaseAssertContext assertContext, final InsertStatement actual, final InsertStatementTestCase expected) { + if (null == expected.getDerivedInsertColumns()) { + assertTrue(actual.getDerivedInsertColumns().isEmpty(), assertContext.getText("Actual derived insert columns should not exist.")); + } else { + assertFalse(actual.getDerivedInsertColumns().isEmpty(), assertContext.getText("Actual derived insert columns should exist.")); + DerivedInsertColumnsAssert.assertIs(assertContext, actual.getDerivedInsertColumns(), expected.getDerivedInsertColumns()); + } + } + private static void assertInsertValuesClause(final SQLCaseAssertContext assertContext, final InsertStatement actual, final InsertStatementTestCase expected) { if (null == expected.getInsertValuesClause()) { assertTrue(actual.getValues().isEmpty(), assertContext.getText("Actual insert values segment should not exist.")); diff --git a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/segment/impl/insert/ExpectedDerivedInsertColumns.java b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/segment/impl/insert/ExpectedDerivedInsertColumns.java new file mode 100644 index 0000000000000..68e60019c33df --- /dev/null +++ b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/segment/impl/insert/ExpectedDerivedInsertColumns.java @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.insert; + +import lombok.Getter; +import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.AbstractExpectedSQLSegment; +import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.column.ExpectedColumn; + +import javax.xml.bind.annotation.XmlElement; +import java.util.LinkedList; +import java.util.List; + +/** + * Expected derived insert columns. + */ +@Getter +public final class ExpectedDerivedInsertColumns extends AbstractExpectedSQLSegment { + + @XmlElement(name = "column") + private final List columns = new LinkedList<>(); +} diff --git a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/dml/InsertStatementTestCase.java b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/dml/InsertStatementTestCase.java index 6ea8b5df0c2b9..4abfeaec8e1af 100644 --- a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/dml/InsertStatementTestCase.java +++ b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/dml/InsertStatementTestCase.java @@ -23,12 +23,13 @@ import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.exec.ExpectedExecClause; import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.function.ExpectedFunction; import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.hint.ExpectedWithTableHintClause; +import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.insert.ExpectedDerivedInsertColumns; import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.insert.ExpectedInsertColumnsClause; import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.insert.ExpectedInsertValuesClause; +import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.insert.ExpectedMultiTableConditionalIntoClause; +import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.insert.ExpectedMultiTableInsertIntoClause; import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.insert.ExpectedMultiTableInsertType; import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.insert.ExpectedOnDuplicateKeyColumns; -import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.insert.ExpectedMultiTableInsertIntoClause; -import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.insert.ExpectedMultiTableConditionalIntoClause; import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.insert.ExpectedReturningClause; import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.output.ExpectedOutputClause; import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.set.ExpectedSetClause; @@ -51,6 +52,9 @@ public final class InsertStatementTestCase extends SQLParserTestCase { @XmlElement(name = "columns") private ExpectedInsertColumnsClause insertColumnsClause; + @XmlElement(name = "derived-columns") + private ExpectedDerivedInsertColumns derivedInsertColumns; + @XmlElement(name = "values") private ExpectedInsertValuesClause insertValuesClause;