You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/05/29 07:23:15 UTC
[GitHub] [shardingsphere] cheese8 opened a new pull request, #18045: parse aggregationProjectionSegment with columnSegment
cheese8 opened a new pull request, #18045:
URL: https://github.com/apache/shardingsphere/pull/18045
For #17987.
Changes proposed in this pull request:
- parse aggregationProjectionSegment with columnSegment
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] cheese8 commented on pull request #18045: parse aggregationProjectionSegment with columnSegment
Posted by GitBox <gi...@apache.org>.
cheese8 commented on PR #18045:
URL: https://github.com/apache/shardingsphere/pull/18045#issuecomment-1140441623
> Hi @cheese8, can you describe the problem with parse in original issue?
Yes, while the **expr** is in table.column format, the parser did not support for now. This PR is plan to support this sutiation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] tuichenchuxin commented on a diff in pull request #18045: parse aggregationProjectionSegment with expressionSegment
Posted by GitBox <gi...@apache.org>.
tuichenchuxin commented on code in PR #18045:
URL: https://github.com/apache/shardingsphere/pull/18045#discussion_r885139882
##########
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLStatementSQLVisitor.java:
##########
@@ -504,10 +504,22 @@ public ASTNode visitBExpr(final BExprContext ctx) {
private ProjectionSegment createAggregationSegment(final FuncApplicationContext ctx, final String aggregationType) {
AggregationType type = AggregationType.valueOf(aggregationType.toUpperCase());
String innerExpression = ctx.start.getInputStream().getText(new Interval(ctx.LP_().getSymbol().getStartIndex(), ctx.stop.getStopIndex()));
- if (null == ctx.DISTINCT()) {
- return new AggregationProjectionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), type, innerExpression);
+ if (null != ctx.DISTINCT()) {
+ AggregationDistinctProjectionSegment distinctProjectionSegment = new AggregationDistinctProjectionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(),
+ type, innerExpression, getDistinctExpression(ctx));
+ distinctProjectionSegment.getParameters().addAll(getExpressions(ctx));
+ return distinctProjectionSegment;
}
- return new AggregationDistinctProjectionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), type, innerExpression, getDistinctExpression(ctx));
+ AggregationProjectionSegment projectionSegment = new AggregationProjectionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), type, innerExpression);
+ projectionSegment.getParameters().addAll(getExpressions(ctx));
+ return projectionSegment;
+ }
+
+ private Collection<ExpressionSegment> getExpressions(final FuncApplicationContext ctx) {
+ if (null == ctx.funcArgList()) {
+ return Collections.emptyList();
+ }
+ return Collections.singletonList((ExpressionSegment) visit(ctx.funcArgList()));
Review Comment:
argList could return multi expressionSegments. We should implement visitArgList method.
##########
shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dml/select-aggregate.xml:
##########
@@ -26,6 +26,15 @@
</projections>
</select>
+ <select sql-case-id="select_sum_column">
+ <from>
+ <simple-table name="t_order" start-index="48" stop-index="54" />
+ </from>
+ <projections start-index="7" stop-index="41">
+ <aggregation-projection type="SUM" inner-expression="(t_order.user_id)" alias="user_id_sum" start-index="7" stop-index="26" />
Review Comment:
Maybe we need to extract params and judge.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] tuichenchuxin commented on a diff in pull request #18045: parse aggregationProjectionSegment with columnSegment
Posted by GitBox <gi...@apache.org>.
tuichenchuxin commented on code in PR #18045:
URL: https://github.com/apache/shardingsphere/pull/18045#discussion_r884560626
##########
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/test/java/org/apache/shardingsphere/sql/parser/mysql/MySQLParameterizedTest.java:
##########
@@ -104,6 +104,20 @@ public final class MySQLParameterizedTest {
+ "\t`submission_date` DATE,\n"
+ "\tPRIMARY KEY (`runoob_id`)\n"
+ ") ENGINE = InnoDB DEFAULT CHARSET = utf8"});
+ testUnits.add(new String[]{"select_with_column", "select id, name, age, count(table1.id) as n, (select id, name, age, sex from table2 where id=2) as sid, yyyy from table1 where id=1",
Review Comment:
This test is for format. It's better add test in shardingsphere-parser-test moudle.
##########
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLStatementSQLVisitor.java:
##########
@@ -773,10 +774,30 @@ public final ASTNode visitAggregationFunction(final AggregationFunctionContext c
private ASTNode createAggregationSegment(final AggregationFunctionContext ctx, final String aggregationType) {
AggregationType type = AggregationType.valueOf(aggregationType.toUpperCase());
String innerExpression = ctx.start.getInputStream().getText(new Interval(ctx.LP_().getSymbol().getStartIndex(), ctx.stop.getStopIndex()));
- if (null == ctx.distinct()) {
- return new AggregationProjectionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), type, innerExpression);
- }
- return new AggregationDistinctProjectionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), type, innerExpression, getDistinctExpression(ctx));
+ if (null != ctx.distinct()) {
+ AggregationDistinctProjectionSegment distinctProjectionSegment = new AggregationDistinctProjectionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(),
+ type, innerExpression, getDistinctExpression(ctx));
+ getExpression(ctx).ifPresent(each -> distinctProjectionSegment.getParameters().add(each));
+ return distinctProjectionSegment;
+ }
+ AggregationProjectionSegment projectionSegment = new AggregationProjectionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), type, innerExpression);
+ getExpression(ctx).ifPresent(each -> projectionSegment.getParameters().add(each));
+ return projectionSegment;
+ }
+
+ private Optional<ExpressionSegment> getExpression(final AggregationFunctionContext ctx) {
+ if (null == ctx.expr(0)) {
Review Comment:
I think it's possible have multi expr. Should we visit and extract them too?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu merged pull request #18045: parse aggregationProjectionSegment with expressionSegment
Posted by GitBox <gi...@apache.org>.
strongduanmu merged PR #18045:
URL: https://github.com/apache/shardingsphere/pull/18045
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] tuichenchuxin commented on a diff in pull request #18045: parse aggregationProjectionSegment with columnSegment
Posted by GitBox <gi...@apache.org>.
tuichenchuxin commented on code in PR #18045:
URL: https://github.com/apache/shardingsphere/pull/18045#discussion_r884811428
##########
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLStatementSQLVisitor.java:
##########
@@ -773,10 +773,33 @@ public final ASTNode visitAggregationFunction(final AggregationFunctionContext c
private ASTNode createAggregationSegment(final AggregationFunctionContext ctx, final String aggregationType) {
AggregationType type = AggregationType.valueOf(aggregationType.toUpperCase());
String innerExpression = ctx.start.getInputStream().getText(new Interval(ctx.LP_().getSymbol().getStartIndex(), ctx.stop.getStopIndex()));
- if (null == ctx.distinct()) {
- return new AggregationProjectionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), type, innerExpression);
+ if (null != ctx.distinct()) {
+ AggregationDistinctProjectionSegment distinctProjectionSegment = new AggregationDistinctProjectionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(),
+ type, innerExpression, getDistinctExpression(ctx));
+ distinctProjectionSegment.getParameters().addAll(getExpressions(ctx));
+ return distinctProjectionSegment;
+ }
+ AggregationProjectionSegment projectionSegment = new AggregationProjectionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), type, innerExpression);
+ projectionSegment.getParameters().addAll(getExpressions(ctx));
+ return projectionSegment;
+ }
+
+ private Collection<ExpressionSegment> getExpressions(final AggregationFunctionContext ctx) {
+ if (null == ctx.expr()) {
+ return Collections.emptyList();
}
- return new AggregationDistinctProjectionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), type, innerExpression, getDistinctExpression(ctx));
+ Collection<ExpressionSegment> result = new LinkedList<>();
+ for (ExprContext each : ctx.expr()) {
+ ASTNode visitNode = visit(each);
+ if (visitNode instanceof ColumnSegment) {
Review Comment:
visit exprContext is always expressionSegment, So there is no need to cast to ColumnSegment or others.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] tuichenchuxin commented on a diff in pull request #18045: parse aggregationProjectionSegment with columnSegment
Posted by GitBox <gi...@apache.org>.
tuichenchuxin commented on code in PR #18045:
URL: https://github.com/apache/shardingsphere/pull/18045#discussion_r885132651
##########
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLStatementSQLVisitor.java:
##########
@@ -773,10 +773,33 @@ public final ASTNode visitAggregationFunction(final AggregationFunctionContext c
private ASTNode createAggregationSegment(final AggregationFunctionContext ctx, final String aggregationType) {
AggregationType type = AggregationType.valueOf(aggregationType.toUpperCase());
String innerExpression = ctx.start.getInputStream().getText(new Interval(ctx.LP_().getSymbol().getStartIndex(), ctx.stop.getStopIndex()));
- if (null == ctx.distinct()) {
- return new AggregationProjectionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), type, innerExpression);
+ if (null != ctx.distinct()) {
+ AggregationDistinctProjectionSegment distinctProjectionSegment = new AggregationDistinctProjectionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(),
+ type, innerExpression, getDistinctExpression(ctx));
+ distinctProjectionSegment.getParameters().addAll(getExpressions(ctx));
+ return distinctProjectionSegment;
+ }
+ AggregationProjectionSegment projectionSegment = new AggregationProjectionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), type, innerExpression);
+ projectionSegment.getParameters().addAll(getExpressions(ctx));
+ return projectionSegment;
+ }
+
+ private Collection<ExpressionSegment> getExpressions(final AggregationFunctionContext ctx) {
+ if (null == ctx.expr()) {
+ return Collections.emptyList();
}
- return new AggregationDistinctProjectionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), type, innerExpression, getDistinctExpression(ctx));
+ Collection<ExpressionSegment> result = new LinkedList<>();
+ for (ExprContext each : ctx.expr()) {
+ ASTNode visitNode = visit(each);
+ if (visitNode instanceof ColumnSegment) {
Review Comment:
There is no need to judge instance of. Can cast to expressionSegment directly, and add to list.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] tuichenchuxin commented on a diff in pull request #18045: parse aggregationProjectionSegment with columnSegment
Posted by GitBox <gi...@apache.org>.
tuichenchuxin commented on code in PR #18045:
URL: https://github.com/apache/shardingsphere/pull/18045#discussion_r884501273
##########
shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/dml/item/AggregationProjectionSegment.java:
##########
@@ -40,6 +40,9 @@ public class AggregationProjectionSegment implements ProjectionSegment, AliasAva
private final String innerExpression;
+ @Setter
+ private ExpressionSegment expression;
Review Comment:
maybe have multi expression.
```
private final Collection<ExpressionSegment> parameters = new LinkedList<>();
```
This maybe better.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] tuichenchuxin commented on pull request #18045: parse aggregationProjectionSegment with columnSegment
Posted by GitBox <gi...@apache.org>.
tuichenchuxin commented on PR #18045:
URL: https://github.com/apache/shardingsphere/pull/18045#issuecomment-1140662393
I think expr has contains columRef. Maybe we should found why this is not parsed to column.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] codecov-commenter commented on pull request #18045: parse aggregationProjectionSegment with columnSegment
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #18045:
URL: https://github.com/apache/shardingsphere/pull/18045#issuecomment-1140401319
# [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/18045?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#18045](https://codecov.io/gh/apache/shardingsphere/pull/18045?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e41fe49) into [master](https://codecov.io/gh/apache/shardingsphere/commit/eb89d466cea6e9feec030750899fde2a3c5e1f64?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (eb89d46) will **decrease** coverage by `0.00%`.
> The diff coverage is `88.88%`.
```diff
@@ Coverage Diff @@
## master #18045 +/- ##
============================================
- Coverage 58.93% 58.92% -0.01%
- Complexity 2146 2148 +2
============================================
Files 3654 3661 +7
Lines 54108 54149 +41
Branches 9192 9192
============================================
+ Hits 31890 31909 +19
- Misses 19514 19536 +22
Partials 2704 2704
```
| [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/18045?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...segment/dml/item/AggregationProjectionSegment.java](https://codecov.io/gh/apache/shardingsphere/pull/18045/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvY29tbW9uL3NlZ21lbnQvZG1sL2l0ZW0vQWdncmVnYXRpb25Qcm9qZWN0aW9uU2VnbWVudC5qYXZh) | `75.00% <0.00%> (-10.72%)` | :arrow_down: |
| [...sitor/statement/impl/MySQLStatementSQLVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/18045/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWRpYWxlY3Qvc2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci1teXNxbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9teXNxbC92aXNpdG9yL3N0YXRlbWVudC9pbXBsL015U1FMU3RhdGVtZW50U1FMVmlzaXRvci5qYXZh) | `88.09% <100.00%> (+0.07%)` | :arrow_up: |
| [...eline/core/metadata/node/PipelineMetaDataNode.java](https://codecov.io/gh/apache/shardingsphere/pull/18045/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUta2VybmVsL3NoYXJkaW5nc3BoZXJlLWRhdGEtcGlwZWxpbmUvc2hhcmRpbmdzcGhlcmUtZGF0YS1waXBlbGluZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9kYXRhL3BpcGVsaW5lL2NvcmUvbWV0YWRhdGEvbm9kZS9QaXBlbGluZU1ldGFEYXRhTm9kZS5qYXZh) | `66.66% <0.00%> (-8.34%)` | :arrow_down: |
| [...ompute/watcher/ComputeNodeStateChangedWatcher.java](https://codecov.io/gh/apache/shardingsphere/pull/18045/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLXR5cGUvc2hhcmRpbmdzcGhlcmUtY2x1c3Rlci1tb2RlL3NoYXJkaW5nc3BoZXJlLWNsdXN0ZXItbW9kZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9tb2RlL21hbmFnZXIvY2x1c3Rlci9jb29yZGluYXRvci9yZWdpc3RyeS9zdGF0dXMvY29tcHV0ZS93YXRjaGVyL0NvbXB1dGVOb2RlU3RhdGVDaGFuZ2VkV2F0Y2hlci5qYXZh) | `27.50% <0.00%> (-0.71%)` | :arrow_down: |
| [...pache/shardingsphere/encrypt/rule/EncryptRule.java](https://codecov.io/gh/apache/shardingsphere/pull/18045/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtZW5jcnlwdC9zaGFyZGluZ3NwaGVyZS1lbmNyeXB0LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2VuY3J5cHQvcnVsZS9FbmNyeXB0UnVsZS5qYXZh) | `73.33% <0.00%> (-0.36%)` | :arrow_down: |
| [...ache/shardingsphere/encrypt/rule/EncryptTable.java](https://codecov.io/gh/apache/shardingsphere/pull/18045/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtZW5jcnlwdC9zaGFyZGluZ3NwaGVyZS1lbmNyeXB0LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2VuY3J5cHQvcnVsZS9FbmNyeXB0VGFibGUuamF2YQ==) | `86.95% <0.00%> (ø)` | |
| [...l/parser/core/database/visitor/SQLVisitorRule.java](https://codecov.io/gh/apache/shardingsphere/pull/18045/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWVuZ2luZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9jb3JlL2RhdGFiYXNlL3Zpc2l0b3IvU1FMVmlzaXRvclJ1bGUuamF2YQ==) | `100.00% <0.00%> (ø)` | |
| [...tsql/ral/common/queryable/ShowInstanceHandler.java](https://codecov.io/gh/apache/shardingsphere/pull/18045/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9xdWVyeWFibGUvU2hvd0luc3RhbmNlSGFuZGxlci5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...sql/ral/common/updatable/LabelInstanceHandler.java](https://codecov.io/gh/apache/shardingsphere/pull/18045/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi91cGRhdGFibGUvTGFiZWxJbnN0YW5jZUhhbmRsZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...l/ral/common/updatable/UnlabelInstanceHandler.java](https://codecov.io/gh/apache/shardingsphere/pull/18045/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi91cGRhdGFibGUvVW5sYWJlbEluc3RhbmNlSGFuZGxlci5qYXZh) | `0.00% <0.00%> (ø)` | |
| ... and [14 more](https://codecov.io/gh/apache/shardingsphere/pull/18045/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/18045?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/18045?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [eb89d46...e41fe49](https://codecov.io/gh/apache/shardingsphere/pull/18045?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] tuichenchuxin commented on a diff in pull request #18045: parse aggregationProjectionSegment with expressionSegment
Posted by GitBox <gi...@apache.org>.
tuichenchuxin commented on code in PR #18045:
URL: https://github.com/apache/shardingsphere/pull/18045#discussion_r885219686
##########
shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dml/select-aggregate.xml:
##########
@@ -26,6 +26,21 @@
</projections>
</select>
+ <select sql-case-id="select_sum_column">
+ <from>
+ <simple-table name="t_order" start-index="48" stop-index="54" />
+ </from>
+ <projections start-index="7" stop-index="41">
+ <aggregation-projection type="SUM" inner-expression="(t_order.user_id)" alias="user_id_sum" start-index="7" stop-index="26">
+ <paramters>
+ <column name="user_id" start-index="17" stop-index="25">
+ <owner name="t_order" start-index="8" stop-index="16"/>
Review Comment:
This test need to add parameter in ExpectedAggregationProjection.java
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org