diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/SQLStatementAssert.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/SQLStatementAssert.java index d81246c354d30064899099e87ad794de8db85f20..9477e765247a3e1998cd68b46fb36bd027b5f715 100644 --- a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/SQLStatementAssert.java +++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/SQLStatementAssert.java @@ -81,7 +81,7 @@ public final class SQLStatementAssert { private static void assertSelectStatement(final SQLStatementAssertMessage assertMessage, final SelectStatement actual, final ParserResult expected, final SQLCaseType sqlCaseType) { ProjectionAssert.assertIs(assertMessage, actual.getProjections(), expected.getProjections(), sqlCaseType); assertWhere(assertMessage, actual, expected, sqlCaseType); - assertGroupBy(assertMessage, actual, expected); + assertGroupBy(assertMessage, actual, expected, sqlCaseType); assertOrderBy(assertMessage, actual, expected); assertLimit(assertMessage, actual, expected, sqlCaseType); } @@ -95,10 +95,10 @@ public final class SQLStatementAssert { } } - private static void assertGroupBy(final SQLStatementAssertMessage assertMessage, final SelectStatement actual, final ParserResult expected) { - if (!expected.getGroupByColumns().isEmpty()) { + private static void assertGroupBy(final SQLStatementAssertMessage assertMessage, final SelectStatement actual, final ParserResult expected, final SQLCaseType sqlCaseType) { + if (null != expected.getGroupBy()) { assertTrue(assertMessage.getText("Actual group by segment should exist."), actual.getGroupBy().isPresent()); - GroupByAssert.assertIs(assertMessage, actual.getGroupBy().get().getGroupByItems(), expected.getGroupByColumns()); + GroupByAssert.assertIs(assertMessage, actual.getGroupBy().get(), expected.getGroupBy(), sqlCaseType); } else { assertFalse(assertMessage.getText("Actual group by segment should not exist."), actual.getGroupBy().isPresent()); } diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/groupby/GroupByAssert.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/groupby/GroupByAssert.java index c2aec86e16e54200d6dc98381594f77d1c1301cf..588e98152e1060abbffaf3ab9b3046c03de82817 100644 --- a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/groupby/GroupByAssert.java +++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/groupby/GroupByAssert.java @@ -20,15 +20,24 @@ package org.apache.shardingsphere.sql.parser.integrate.asserts.groupby; import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.apache.shardingsphere.sql.parser.integrate.asserts.SQLStatementAssertMessage; -import org.apache.shardingsphere.sql.parser.integrate.jaxb.impl.groupby.ExpectedGroupByColumn; +import org.apache.shardingsphere.sql.parser.integrate.jaxb.impl.groupby.ExpectedGroupBy; +import org.apache.shardingsphere.sql.parser.integrate.jaxb.impl.orderby.ExpectedColumnOrderByItem; +import org.apache.shardingsphere.sql.parser.integrate.jaxb.impl.orderby.ExpectedExpressionOrderByItem; +import org.apache.shardingsphere.sql.parser.integrate.jaxb.impl.orderby.ExpectedIndexOrderByItem; +import org.apache.shardingsphere.sql.parser.integrate.jaxb.impl.orderby.ExpectedOrderByItem; +import org.apache.shardingsphere.sql.parser.integrate.jaxb.impl.owner.ExpectedTableOwner; +import org.apache.shardingsphere.sql.parser.sql.segment.dml.order.GroupBySegment; import org.apache.shardingsphere.sql.parser.sql.segment.dml.order.item.ColumnOrderByItemSegment; +import org.apache.shardingsphere.sql.parser.sql.segment.dml.order.item.ExpressionOrderByItemSegment; +import org.apache.shardingsphere.sql.parser.sql.segment.dml.order.item.IndexOrderByItemSegment; import org.apache.shardingsphere.sql.parser.sql.segment.dml.order.item.OrderByItemSegment; - -import java.util.Collection; -import java.util.List; +import org.apache.shardingsphere.sql.parser.sql.segment.generic.TableSegment; +import org.apache.shardingsphere.test.sql.SQLCaseType; import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; /** * Group by assert. @@ -39,28 +48,77 @@ import static org.junit.Assert.assertThat; public final class GroupByAssert { /** - * Assert actual group by item segments is correct with expected group by columns. + * Assert actual group by segment is correct with expected group by. * * @param assertMessage assert message - * @param actual actual group by items - * @param expected expected group by items + * @param actual actual group by segment + * @param expected expected group by + * @param sqlCaseType SQL case type */ - public static void assertIs(final SQLStatementAssertMessage assertMessage, final Collection actual, final List expected) { - assertThat(assertMessage.getText("Group by items size error: "), actual.size(), is(expected.size())); + public static void assertIs(final SQLStatementAssertMessage assertMessage, final GroupBySegment actual, final ExpectedGroupBy expected, final SQLCaseType sqlCaseType) { + assertThat(assertMessage.getText("Group by items size assertion error: "), actual.getGroupByItems().size(), is(expected.getItemSize())); int count = 0; - for (OrderByItemSegment each : actual) { + for (OrderByItemSegment each : actual.getGroupByItems()) { if (each instanceof ColumnOrderByItemSegment) { - assertGroupByItem(assertMessage, (ColumnOrderByItemSegment) each, expected.get(count)); + assertOrderInfo(assertMessage, each, expected.getColumnItems().get(count)); + assertColumnGroupByItem(assertMessage, (ColumnOrderByItemSegment) each, expected.getColumnItems().get(count), sqlCaseType); + count++; + } + } + for (OrderByItemSegment each : actual.getGroupByItems()) { + if (each instanceof IndexOrderByItemSegment) { + assertOrderInfo(assertMessage, each, expected.getIndexItems().get(count)); + assertIndexGroupByItem(assertMessage, (IndexOrderByItemSegment) each, expected.getIndexItems().get(count), sqlCaseType); + count++; } - count++; } + for (OrderByItemSegment each : actual.getGroupByItems()) { + if (each instanceof ExpressionOrderByItemSegment) { + assertOrderInfo(assertMessage, each, expected.getExpressionItems().get(count)); + assertExpressionGroupByItem(assertMessage, (ExpressionOrderByItemSegment) each, expected.getExpressionItems().get(count), sqlCaseType); + count++; + } + } + // TODO assert start index and stop index +// SQLSegmentAssert.assertIs(assertMessage, actual, expected, sqlCaseType); } - private static void assertGroupByItem(final SQLStatementAssertMessage assertMessage, final ColumnOrderByItemSegment actual, final ExpectedGroupByColumn expected) { - assertThat(assertMessage.getText("Group by item owner assertion error: "), - actual.getColumn().getOwner().isPresent() ? actual.getColumn().getOwner().get().getTableName() : null, is(expected.getOwner())); - assertThat(assertMessage.getText("Group by item name assertion error: "), actual.getColumn().getName(), is(expected.getName())); + private static void assertOrderInfo(final SQLStatementAssertMessage assertMessage, final OrderByItemSegment actual, final ExpectedOrderByItem expected) { assertThat(assertMessage.getText("Group by item order direction assertion error: "), actual.getOrderDirection().name(), is(expected.getOrderDirection())); - // TODO assert nullOrderDirection + } + + private static void assertColumnGroupByItem(final SQLStatementAssertMessage assertMessage, + final ColumnOrderByItemSegment actual, final ExpectedColumnOrderByItem expected, final SQLCaseType sqlCaseType) { + assertThat(assertMessage.getText("Group by item column name assertion error: "), actual.getColumn().getName(), is(expected.getName())); + if (null != expected.getOwner()) { + assertTrue(assertMessage.getText("Actual owner should exist."), actual.getColumn().getOwner().isPresent()); + assertOwner(assertMessage, actual.getColumn().getOwner().get(), expected.getOwner(), sqlCaseType); + } else { + assertFalse(assertMessage.getText("Actual owner should not exist."), actual.getColumn().getOwner().isPresent()); + } + // TODO assert start index and stop index + // SQLSegmentAssert.assertIs(assertMessage, actual, expected, sqlCaseType); + } + + private static void assertOwner(final SQLStatementAssertMessage assertMessage, final TableSegment actual, final ExpectedTableOwner expected, final SQLCaseType sqlCaseType) { + assertThat(assertMessage.getText("Group by column owner name assertion error: "), actual.getTableName(), is(expected.getName())); + assertThat(assertMessage.getText("Group by column owner name start delimiter assertion error: "), actual.getTableQuoteCharacter().getStartDelimiter(), is(expected.getStartDelimiter())); + assertThat(assertMessage.getText("Group by column owner name end delimiter assertion error: "), actual.getTableQuoteCharacter().getEndDelimiter(), is(expected.getEndDelimiter())); + // TODO assert start index and stop index + // SQLSegmentAssert.assertIs(assertMessage, actual, expected, sqlCaseType); + } + + private static void assertIndexGroupByItem(final SQLStatementAssertMessage assertMessage, + final IndexOrderByItemSegment actual, final ExpectedIndexOrderByItem expected, final SQLCaseType sqlCaseType) { + assertThat(assertMessage.getText("Group by item index assertion error: "), actual.getColumnIndex(), is(expected.getIndex())); + // TODO assert start index and stop index + // SQLSegmentAssert.assertIs(assertMessage, actual, expected, sqlCaseType); + } + + private static void assertExpressionGroupByItem(final SQLStatementAssertMessage assertMessage, + final ExpressionOrderByItemSegment actual, final ExpectedExpressionOrderByItem expected, final SQLCaseType sqlCaseType) { + assertThat(assertMessage.getText("Group by item expression assertion error: "), actual.getExpression(), is(expected.getExpression())); + // TODO assert start index and stop index + // SQLSegmentAssert.assertIs(assertMessage, actual, expected, sqlCaseType); } } diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/impl/groupby/ExpectedGroupBy.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/impl/groupby/ExpectedGroupBy.java new file mode 100644 index 0000000000000000000000000000000000000000..cc55aa0f9749e5138d322e89a78ef59875c93a16 --- /dev/null +++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/impl/groupby/ExpectedGroupBy.java @@ -0,0 +1,57 @@ +/* + * 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.sql.parser.integrate.jaxb.impl.groupby; + +import lombok.Getter; +import lombok.Setter; +import org.apache.shardingsphere.sql.parser.integrate.jaxb.generic.AbstractExpectedSQLSegment; +import org.apache.shardingsphere.sql.parser.integrate.jaxb.impl.orderby.ExpectedColumnOrderByItem; +import org.apache.shardingsphere.sql.parser.integrate.jaxb.impl.orderby.ExpectedExpressionOrderByItem; +import org.apache.shardingsphere.sql.parser.integrate.jaxb.impl.orderby.ExpectedIndexOrderByItem; + +import javax.xml.bind.annotation.XmlElement; +import java.util.LinkedList; +import java.util.List; + +/** + * Expected group by. + * + * @author zhangliang + */ +@Getter +@Setter +public final class ExpectedGroupBy extends AbstractExpectedSQLSegment { + + @XmlElement(name = "column-item") + private List columnItems = new LinkedList<>(); + + @XmlElement(name = "index-item") + private List indexItems = new LinkedList<>(); + + @XmlElement(name = "expression-item") + private List expressionItems = new LinkedList<>(); + + /** + * Get item size. + * + * @return item size + */ + public int getItemSize() { + return columnItems.size() + indexItems.size() + expressionItems.size(); + } +} diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/impl/orderby/ExpectedColumnOrderByItem.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/impl/orderby/ExpectedColumnOrderByItem.java new file mode 100644 index 0000000000000000000000000000000000000000..088376858f9f43f31535feb04237d28d233e8358 --- /dev/null +++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/impl/orderby/ExpectedColumnOrderByItem.java @@ -0,0 +1,41 @@ +/* + * 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.sql.parser.integrate.jaxb.impl.orderby; + +import lombok.Getter; +import lombok.Setter; +import org.apache.shardingsphere.sql.parser.integrate.jaxb.impl.owner.ExpectedTableOwner; + +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; + +/** + * Expected column order by item. + * + * @author zhangliang + */ +@Getter +@Setter +public final class ExpectedColumnOrderByItem extends ExpectedOrderByItem { + + @XmlAttribute + private String name; + + @XmlElement + private ExpectedTableOwner owner; +} diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/impl/orderby/ExpectedExpressionOrderByItem.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/impl/orderby/ExpectedExpressionOrderByItem.java new file mode 100644 index 0000000000000000000000000000000000000000..901e73861e5015255bafcf0e4e8834f4647bb55a --- /dev/null +++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/impl/orderby/ExpectedExpressionOrderByItem.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.sql.parser.integrate.jaxb.impl.orderby; + +import lombok.Getter; +import lombok.Setter; + +import javax.xml.bind.annotation.XmlAttribute; + +/** + * Expected expression order by item. + * + * @author zhangliang + */ +@Getter +@Setter +public final class ExpectedExpressionOrderByItem extends ExpectedOrderByItem { + + @XmlAttribute + private String expression; +} diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/impl/orderby/ExpectedIndexOrderByItem.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/impl/orderby/ExpectedIndexOrderByItem.java new file mode 100644 index 0000000000000000000000000000000000000000..6af0fa886109cc590df9cd4662878cc1a24bdb20 --- /dev/null +++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/impl/orderby/ExpectedIndexOrderByItem.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.sql.parser.integrate.jaxb.impl.orderby; + +import lombok.Getter; +import lombok.Setter; + +import javax.xml.bind.annotation.XmlAttribute; + +/** + * Expected index order by item. + * + * @author zhangliang + */ +@Getter +@Setter +public final class ExpectedIndexOrderByItem extends ExpectedOrderByItem { + + @XmlAttribute + private int index; +} diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/impl/groupby/ExpectedGroupByColumn.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/impl/orderby/ExpectedOrderByItem.java similarity index 76% rename from shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/impl/groupby/ExpectedGroupByColumn.java rename to shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/impl/orderby/ExpectedOrderByItem.java index a66ef1997741faff1408c0eb9f49368c4c3f0f75..308538d56f16b0f61b811a5a5055918796be811c 100644 --- a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/impl/groupby/ExpectedGroupByColumn.java +++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/impl/orderby/ExpectedOrderByItem.java @@ -15,26 +15,23 @@ * limitations under the License. */ -package org.apache.shardingsphere.sql.parser.integrate.jaxb.impl.groupby; +package org.apache.shardingsphere.sql.parser.integrate.jaxb.impl.orderby; import lombok.Getter; import lombok.Setter; +import org.apache.shardingsphere.sql.parser.integrate.jaxb.generic.AbstractExpectedDelimiterSQLSegment; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; +/** + * Expected order by item. + * + * @author zhangliang + */ @Getter @Setter -@XmlAccessorType(XmlAccessType.FIELD) -public final class ExpectedGroupByColumn { - - @XmlAttribute - private String owner; - - @XmlAttribute - private String name; +public abstract class ExpectedOrderByItem extends AbstractExpectedDelimiterSQLSegment { @XmlAttribute(name = "order-direction") - private String orderDirection; + private String orderDirection = "ASC"; } diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/root/ParserResult.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/root/ParserResult.java index 090dc55191b9b8b77e2c8d238caf53e530eeaa7d..68ae9bbbae92bc4186a5d9e6e3e38446a8f948d3 100644 --- a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/root/ParserResult.java +++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/root/ParserResult.java @@ -20,7 +20,7 @@ package org.apache.shardingsphere.sql.parser.integrate.jaxb.root; import com.google.common.base.Splitter; import lombok.Getter; import lombok.Setter; -import org.apache.shardingsphere.sql.parser.integrate.jaxb.impl.groupby.ExpectedGroupByColumn; +import org.apache.shardingsphere.sql.parser.integrate.jaxb.impl.groupby.ExpectedGroupBy; import org.apache.shardingsphere.sql.parser.integrate.jaxb.impl.insert.ExpectedInsertColumnsAndValues; import org.apache.shardingsphere.sql.parser.integrate.jaxb.impl.orderby.ExpectedOrderByColumn; import org.apache.shardingsphere.sql.parser.integrate.jaxb.impl.pagination.ExpectedPaginationValue; @@ -67,14 +67,13 @@ public final class ParserResult { @XmlElement private ExpectedTokens tokens = new ExpectedTokens(); + @XmlElement(name = "group-by") + private ExpectedGroupBy groupBy; + @XmlElementWrapper(name = "order-by-columns") @XmlElement(name = "order-by-column") private List orderByColumns = new LinkedList<>(); - @XmlElementWrapper(name = "group-by-columns") - @XmlElement(name = "group-by-column") - private List groupByColumns = new LinkedList<>(); - @XmlElement private ExpectedPaginationValue offset; diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dml/select.xml b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dml/select.xml index 3f0688efba23a09a95fe649ee40018a1de61fe0a..f546bb550f00208f942b4c551f2a557c5e20a80b 100644 --- a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dml/select.xml +++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dml/select.xml @@ -1132,9 +1132,9 @@ - - - + + + @@ -1148,9 +1148,9 @@ - - - + + + diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dml/select_group_by.xml b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dml/select_group_by.xml index 91d6639875feb172b6dad91edd5dce8e1641f252..4112cd808ff494254a6ae9c88db9e1bf60245517 100644 --- a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dml/select_group_by.xml +++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dml/select_group_by.xml @@ -25,9 +25,9 @@ - - - + + + @@ -41,9 +41,9 @@ - - - + + + @@ -57,9 +57,9 @@ - - - + + + @@ -73,9 +73,9 @@ - - - + + + @@ -89,9 +89,9 @@ - - - + + + @@ -105,9 +105,9 @@ - - - + + + @@ -147,9 +147,11 @@ - - - + + + + + @@ -159,9 +161,9 @@ - - - + + + @@ -176,9 +178,9 @@ - - - + + + @@ -194,9 +196,11 @@ - - - + + + + + @@ -223,9 +227,9 @@ - - - + + + @@ -236,9 +240,9 @@ - - - + + + @@ -249,9 +253,9 @@ - - - + + + diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dml/select_pagination_group_by_order_by.xml b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dml/select_pagination_group_by_order_by.xml index 635d971d82ae180d270177696079bb5583f3d41a..4b7cf5e4dc28a3ba49546d31a7355672292b346b 100644 --- a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dml/select_pagination_group_by_order_by.xml +++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dml/select_pagination_group_by_order_by.xml @@ -53,9 +53,11 @@ - - - + + + + + @@ -99,9 +101,11 @@ - - - + + + + + @@ -146,9 +150,11 @@ - - - + + + + + @@ -193,9 +199,11 @@ - - - + + + + + @@ -240,9 +248,11 @@ - - - + + + + + @@ -287,9 +297,11 @@ - - - + + + + + @@ -328,9 +340,11 @@ - - - + + + + + @@ -369,9 +383,11 @@ - - - + + + + +