diff --git a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/checker/sql/EncryptSupportedSQLCheckersBuilder.java b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/checker/sql/EncryptSupportedSQLCheckersBuilder.java index 7a661c2e92633..fce03c66f1094 100644 --- a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/checker/sql/EncryptSupportedSQLCheckersBuilder.java +++ b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/checker/sql/EncryptSupportedSQLCheckersBuilder.java @@ -17,10 +17,10 @@ package org.apache.shardingsphere.encrypt.checker.sql; -import org.apache.shardingsphere.encrypt.checker.sql.projection.EncryptInsertSelectProjectionSupportedChecker; -import org.apache.shardingsphere.encrypt.checker.sql.projection.EncryptSelectProjectionSupportedChecker; import org.apache.shardingsphere.encrypt.checker.sql.orderby.EncryptOrderByItemSupportedChecker; import org.apache.shardingsphere.encrypt.checker.sql.predicate.EncryptPredicateColumnSupportedChecker; +import org.apache.shardingsphere.encrypt.checker.sql.projection.EncryptInsertSelectProjectionSupportedChecker; +import org.apache.shardingsphere.encrypt.checker.sql.projection.EncryptSelectProjectionSupportedChecker; import org.apache.shardingsphere.encrypt.constant.EncryptOrder; import org.apache.shardingsphere.encrypt.rule.EncryptRule; import org.apache.shardingsphere.infra.checker.SupportedSQLChecker; diff --git a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/SimpleTableSegmentBinder.java b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/SimpleTableSegmentBinder.java index eb57d97f82824..d471cb8cf0105 100644 --- a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/SimpleTableSegmentBinder.java +++ b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/SimpleTableSegmentBinder.java @@ -24,6 +24,7 @@ import org.apache.shardingsphere.infra.binder.engine.segment.from.context.TableSegmentBinderContext; import org.apache.shardingsphere.infra.binder.engine.segment.from.context.type.SimpleTableSegmentBinderContext; import org.apache.shardingsphere.infra.binder.engine.statement.SQLStatementBinderContext; +import org.apache.shardingsphere.infra.binder.engine.util.SubqueryTableBindUtils; import org.apache.shardingsphere.infra.database.core.metadata.database.DialectDatabaseMetaData; import org.apache.shardingsphere.infra.database.core.metadata.database.enums.QuoteCharacter; import org.apache.shardingsphere.infra.database.core.type.DatabaseType; @@ -150,6 +151,12 @@ private static SimpleTableSegmentBinderContext createSimpleTableBinderContext(fi if (binderContext.getSqlStatement() instanceof CreateTableStatement) { return new SimpleTableSegmentBinderContext(createProjectionSegments((CreateTableStatement) binderContext.getSqlStatement(), databaseName, schemaName, tableName)); } + CaseInsensitiveString caseInsensitiveTableName = new CaseInsensitiveString(tableName.getValue()); + if (binderContext.getExternalTableBinderContexts().containsKey(caseInsensitiveTableName)) { + TableSegmentBinderContext tableSegmentBinderContext = binderContext.getExternalTableBinderContexts().get(caseInsensitiveTableName).iterator().next(); + return new SimpleTableSegmentBinderContext( + SubqueryTableBindUtils.createSubqueryProjections(tableSegmentBinderContext.getProjectionSegments(), tableName, binderContext.getSqlStatement().getDatabaseType())); + } return new SimpleTableSegmentBinderContext(Collections.emptyList()); } diff --git a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/with/CommonTableExpressionSegmentBinder.java b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/with/CommonTableExpressionSegmentBinder.java new file mode 100644 index 0000000000000..136c33e7fbdcc --- /dev/null +++ b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/with/CommonTableExpressionSegmentBinder.java @@ -0,0 +1,62 @@ +/* + * 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.infra.binder.engine.segment.with; + +import com.cedarsoftware.util.CaseInsensitiveMap.CaseInsensitiveString; +import com.google.common.collect.LinkedHashMultimap; +import lombok.AccessLevel; +import lombok.NoArgsConstructor; +import org.apache.shardingsphere.infra.binder.engine.segment.from.context.type.SimpleTableSegmentBinderContext; +import org.apache.shardingsphere.infra.binder.engine.segment.from.type.SubqueryTableSegmentBinder; +import org.apache.shardingsphere.infra.binder.engine.statement.SQLStatementBinderContext; +import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.complex.CommonTableExpressionSegment; +import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.item.ColumnProjectionSegment; +import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.table.SubqueryTableSegment; + +import java.util.stream.Collectors; + +/** + * Common table expression segment binder. + */ +@NoArgsConstructor(access = AccessLevel.PRIVATE) +public final class CommonTableExpressionSegmentBinder { + + /** + * Bind common table expression segment. + * + * @param segment common table expression segment + * @param binderContext SQL statement binder context + * @param recursive recursive + * @return bound common table expression segment + */ + public static CommonTableExpressionSegment bind(final CommonTableExpressionSegment segment, final SQLStatementBinderContext binderContext, final boolean recursive) { + if (recursive && segment.getAliasName().isPresent()) { + binderContext.getExternalTableBinderContexts().put(new CaseInsensitiveString(segment.getAliasName().get()), + new SimpleTableSegmentBinderContext(segment.getColumns().stream().map(ColumnProjectionSegment::new).collect(Collectors.toList()))); + } + SubqueryTableSegment subqueryTableSegment = new SubqueryTableSegment(segment.getStartIndex(), segment.getStopIndex(), segment.getSubquery()); + subqueryTableSegment.setAlias(segment.getAliasSegment()); + SubqueryTableSegment boundSubquerySegment = + SubqueryTableSegmentBinder.bind(subqueryTableSegment, binderContext, LinkedHashMultimap.create(), binderContext.getExternalTableBinderContexts()); + CommonTableExpressionSegment result = new CommonTableExpressionSegment( + segment.getStartIndex(), segment.getStopIndex(), boundSubquerySegment.getAliasSegment().orElse(null), boundSubquerySegment.getSubquery()); + // TODO bind with columns + result.getColumns().addAll(segment.getColumns()); + return result; + } +} diff --git a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/with/WithSegmentBinder.java b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/with/WithSegmentBinder.java new file mode 100644 index 0000000000000..ca4af9da753b7 --- /dev/null +++ b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/with/WithSegmentBinder.java @@ -0,0 +1,125 @@ +/* + * 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.infra.binder.engine.segment.with; + +import com.cedarsoftware.util.CaseInsensitiveMap; +import com.cedarsoftware.util.CaseInsensitiveMap.CaseInsensitiveString; +import com.google.common.base.Strings; +import com.google.common.collect.Multimap; +import lombok.AccessLevel; +import lombok.NoArgsConstructor; +import org.apache.shardingsphere.infra.binder.engine.segment.from.context.TableSegmentBinderContext; +import org.apache.shardingsphere.infra.binder.engine.segment.from.context.type.SimpleTableSegmentBinderContext; +import org.apache.shardingsphere.infra.binder.engine.statement.SQLStatementBinderContext; +import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.column.ColumnSegment; +import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.complex.CommonTableExpressionSegment; +import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.item.ColumnProjectionSegment; +import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.item.ProjectionSegment; +import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.item.ShorthandProjectionSegment; +import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.WithSegment; +import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.bound.ColumnSegmentBoundInfo; +import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.bound.TableSegmentBoundInfo; +import org.apache.shardingsphere.sql.parser.statement.core.value.identifier.IdentifierValue; + +import java.util.Collection; +import java.util.LinkedList; +import java.util.Map; +import java.util.Optional; + +/** + * With segment binder. + */ +@NoArgsConstructor(access = AccessLevel.PRIVATE) +public final class WithSegmentBinder { + + /** + * Bind with segment. + * + * @param segment with segment + * @param binderContext SQL statement binder context + * @param externalTableBinderContexts external table binder contexts + * @return bound with segment + */ + public static WithSegment bind(final WithSegment segment, final SQLStatementBinderContext binderContext, + final Multimap externalTableBinderContexts) { + Collection boundCommonTableExpressions = new LinkedList<>(); + for (CommonTableExpressionSegment each : segment.getCommonTableExpressions()) { + CommonTableExpressionSegment boundCommonTableExpression = CommonTableExpressionSegmentBinder.bind(each, binderContext, segment.isRecursive()); + boundCommonTableExpressions.add(boundCommonTableExpression); + if (segment.isRecursive() && each.getAliasName().isPresent()) { + externalTableBinderContexts.removeAll(new CaseInsensitiveString(each.getAliasName().get())); + } + bindWithColumns(each.getColumns(), boundCommonTableExpression); + each.getAliasName().ifPresent(optional -> externalTableBinderContexts.put(new CaseInsensitiveString(optional), createWithTableBinderContext(boundCommonTableExpression))); + } + return new WithSegment(segment.getStartIndex(), segment.getStopIndex(), boundCommonTableExpressions); + } + + private static SimpleTableSegmentBinderContext createWithTableBinderContext(final CommonTableExpressionSegment commonTableExpressionSegment) { + return new SimpleTableSegmentBinderContext(commonTableExpressionSegment.getSubquery().getSelect().getProjections().getProjections()); + } + + private static void bindWithColumns(final Collection columns, final CommonTableExpressionSegment boundCommonTableExpression) { + if (columns.isEmpty()) { + return; + } + Map columnProjections = extractWithSubqueryColumnProjections(boundCommonTableExpression); + columns.forEach(each -> { + ColumnProjectionSegment projectionSegment = columnProjections.get(each.getIdentifier().getValue()); + if (null != projectionSegment) { + each.setColumnBoundInfo(createColumnSegmentBoundInfo(each, projectionSegment.getColumn())); + } + }); + } + + private static Map extractWithSubqueryColumnProjections(final CommonTableExpressionSegment boundCommonTableExpression) { + Map result = new CaseInsensitiveMap<>(); + Collection projections = boundCommonTableExpression.getSubquery().getSelect().getProjections().getProjections(); + projections.forEach(each -> extractWithSubqueryColumnProjections(each, result)); + return result; + } + + private static void extractWithSubqueryColumnProjections(final ProjectionSegment projectionSegment, final Map result) { + if (projectionSegment instanceof ColumnProjectionSegment) { + result.put(getColumnName((ColumnProjectionSegment) projectionSegment), (ColumnProjectionSegment) projectionSegment); + } + if (projectionSegment instanceof ShorthandProjectionSegment) { + ((ShorthandProjectionSegment) projectionSegment).getActualProjectionSegments().forEach(eachProjection -> { + if (eachProjection instanceof ColumnProjectionSegment) { + result.put(getColumnName((ColumnProjectionSegment) eachProjection), (ColumnProjectionSegment) eachProjection); + } + }); + } + } + + private static String getColumnName(final ColumnProjectionSegment columnProjection) { + return columnProjection.getAliasName().orElse(columnProjection.getColumn().getIdentifier().getValue()); + } + + private static ColumnSegmentBoundInfo createColumnSegmentBoundInfo(final ColumnSegment segment, final ColumnSegment inputColumnSegment) { + IdentifierValue originalDatabase = null == inputColumnSegment ? null : inputColumnSegment.getColumnBoundInfo().getOriginalDatabase(); + IdentifierValue originalSchema = null == inputColumnSegment ? null : inputColumnSegment.getColumnBoundInfo().getOriginalSchema(); + IdentifierValue segmentOriginalTable = segment.getColumnBoundInfo().getOriginalTable(); + IdentifierValue originalTable = Strings.isNullOrEmpty(segmentOriginalTable.getValue()) + ? Optional.ofNullable(inputColumnSegment).map(optional -> optional.getColumnBoundInfo().getOriginalTable()).orElse(segmentOriginalTable) + : segmentOriginalTable; + IdentifierValue segmentOriginalColumn = segment.getColumnBoundInfo().getOriginalColumn(); + IdentifierValue originalColumn = Optional.ofNullable(inputColumnSegment).map(optional -> optional.getColumnBoundInfo().getOriginalColumn()).orElse(segmentOriginalColumn); + return new ColumnSegmentBoundInfo(new TableSegmentBoundInfo(originalDatabase, originalSchema), originalTable, originalColumn); + } +} 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 521d949a899f9..3f0cf8244b2a2 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,6 +32,7 @@ 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; @@ -59,6 +60,7 @@ public SelectStatementBinder() { public SelectStatement bind(final SelectStatement sqlStatement, final SQLStatementBinderContext binderContext) { SelectStatement result = copy(sqlStatement); Multimap tableBinderContexts = LinkedHashMultimap.create(); + sqlStatement.getWithSegment().ifPresent(optional -> result.setWithSegment(WithSegmentBinder.bind(optional, binderContext, binderContext.getExternalTableBinderContexts()))); Optional boundTableSegment = sqlStatement.getFrom().map(optional -> TableSegmentBinder.bind(optional, binderContext, tableBinderContexts, outerTableBinderContexts)); boundTableSegment.ifPresent(result::setFrom); result.setProjections(ProjectionsSegmentBinder.bind(sqlStatement.getProjections(), binderContext, boundTableSegment.orElse(null), tableBinderContexts, outerTableBinderContexts)); @@ -71,7 +73,6 @@ public SelectStatement bind(final SelectStatement sqlStatement, final SQLStateme sqlStatement.getOrderBy().ifPresent(optional -> result.setOrderBy( OrderBySegmentBinder.bind(optional, binderContext, currentTableBinderContexts, tableBinderContexts, outerTableBinderContexts))); sqlStatement.getHaving().ifPresent(optional -> result.setHaving(HavingSegmentBinder.bind(optional, binderContext, currentTableBinderContexts, outerTableBinderContexts))); - // TODO support other segment bind in select statement return result; } @@ -90,7 +91,6 @@ private SelectStatement copy(final SelectStatement sqlStatement) { sqlStatement.getWindow().ifPresent(result::setWindow); sqlStatement.getModelSegment().ifPresent(result::setModelSegment); sqlStatement.getSubqueryType().ifPresent(result::setSubqueryType); - sqlStatement.getWithSegment().ifPresent(result::setWithSegment); result.addParameterMarkerSegments(sqlStatement.getParameterMarkerSegments()); result.getCommentSegments().addAll(sqlStatement.getCommentSegments()); result.getVariableNames().addAll(sqlStatement.getVariableNames()); 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 1de69236fdd96..ba4744cc5db3a 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 @@ -25,6 +25,7 @@ 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.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.UpdateStatement; @@ -38,6 +39,7 @@ public final class UpdateStatementBinder 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.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()))); @@ -50,7 +52,6 @@ private UpdateStatement copy(final UpdateStatement sqlStatement) { UpdateStatement result = sqlStatement.getClass().getDeclaredConstructor().newInstance(); sqlStatement.getOrderBy().ifPresent(result::setOrderBy); sqlStatement.getLimit().ifPresent(result::setLimit); - sqlStatement.getWithSegment().ifPresent(result::setWithSegment); result.addParameterMarkerSegments(sqlStatement.getParameterMarkerSegments()); result.getCommentSegments().addAll(sqlStatement.getCommentSegments()); return result; diff --git a/test/it/binder/src/test/resources/cases/dml/select.xml b/test/it/binder/src/test/resources/cases/dml/select.xml index 7f03799f5f7c1..8caabdcb4d972 100644 --- a/test/it/binder/src/test/resources/cases/dml/select.xml +++ b/test/it/binder/src/test/resources/cases/dml/select.xml @@ -87,4 +87,210 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/it/binder/src/test/resources/sqls/dml/select.xml b/test/it/binder/src/test/resources/sqls/dml/select.xml index aa09790e7ad17..cca532f1c5f25 100644 --- a/test/it/binder/src/test/resources/sqls/dml/select.xml +++ b/test/it/binder/src/test/resources/sqls/dml/select.xml @@ -18,4 +18,6 @@ + + diff --git a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/orderby/OrderByItemAssert.java b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/orderby/OrderByItemAssert.java index af1be821b57f7..6a6df5f5aabdc 100644 --- a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/orderby/OrderByItemAssert.java +++ b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/orderby/OrderByItemAssert.java @@ -25,6 +25,7 @@ import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.order.item.OrderByItemSegment; 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.bound.ColumnBoundAssert; import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.segment.expression.ExpressionAssert; 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; @@ -106,6 +107,7 @@ private static void assertOrderInfo(final SQLCaseAssertContext assertContext, fi private static void assertColumnOrderByItem(final SQLCaseAssertContext assertContext, final ColumnOrderByItemSegment actual, final ExpectedColumnOrderByItem expected, final String type) { IdentifierValueAssert.assertIs(assertContext, actual.getColumn().getIdentifier(), expected, String.format("%s item", type)); + ColumnBoundAssert.assertIs(assertContext, actual.getColumn().getColumnBoundInfo(), expected.getColumnBound()); if (null == expected.getOwner()) { assertFalse(actual.getColumn().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/cases/parser/jaxb/segment/impl/orderby/item/impl/ExpectedColumnOrderByItem.java b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/segment/impl/orderby/item/impl/ExpectedColumnOrderByItem.java index f150058e9f46e..f000d2b5234f5 100644 --- a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/segment/impl/orderby/item/impl/ExpectedColumnOrderByItem.java +++ b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/segment/impl/orderby/item/impl/ExpectedColumnOrderByItem.java @@ -20,6 +20,7 @@ import lombok.Getter; import lombok.Setter; import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.ExpectedIdentifierSQLSegment; +import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.bound.ExpectedColumnBoundInfo; import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.orderby.item.ExpectedOrderByItem; import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.table.ExpectedOwner; @@ -38,4 +39,7 @@ public final class ExpectedColumnOrderByItem extends ExpectedOrderByItem impleme @XmlElement private ExpectedOwner owner; + + @XmlElement(name = "column-bound") + private ExpectedColumnBoundInfo columnBound; }