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 2021/10/27 03:55:37 UTC

[GitHub] [shardingsphere] tuichenchuxin opened a new pull request #13304: Support mysql regular function visit

tuichenchuxin opened a new pull request #13304:
URL: https://github.com/apache/shardingsphere/pull/13304


   Fixes #12973
   
   Changes proposed in this pull request:
   - support regular function visit
   - modify test case
   


-- 
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 #13304: Support mysql regular function visit

Posted by GitBox <gi...@apache.org>.
strongduanmu merged pull request #13304:
URL: https://github.com/apache/shardingsphere/pull/13304


   


-- 
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 #13304: Support mysql regular function visit

Posted by GitBox <gi...@apache.org>.
tuichenchuxin commented on pull request #13304:
URL: https://github.com/apache/shardingsphere/pull/13304#issuecomment-955238552


   > @tuichenchuxin Some integration tests throw exceptions, please check if there are any problems.
   
   it's ok now, it failed before, because of the poor internet.


-- 
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 commented on a change in pull request #13304: Support mysql regular function visit

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on a change in pull request #13304:
URL: https://github.com/apache/shardingsphere/pull/13304#discussion_r739090512



##########
File path: 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
##########
@@ -836,10 +864,12 @@ public final ASTNode visitMatchExpression(final MatchExpressionContext ctx) {
     }
     
     // TODO :FIXME, sql case id: insert_with_str_to_date
-    private void calculateParameterCount(final Collection<ExprContext> exprContexts) {
+    private Collection<ExpressionSegment> calculateParameterCount(final Collection<ExprContext> exprContexts) {

Review comment:
       @tuichenchuxin Why add return type for `calculateParameterCount` method?

##########
File path: 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
##########
@@ -1272,6 +1302,12 @@ private ASTNode createProjection(final ProjectionContext ctx, final AliasSegment
             ((ExpressionProjectionSegment) projection).setAlias(alias);
             return projection;
         }
+        if (projection instanceof FunctionSegment) {
+            FunctionSegment functionSegment = (FunctionSegment) projection;
+            ExpressionProjectionSegment expr = new ExpressionProjectionSegment(functionSegment.getStartIndex(), functionSegment.getStopIndex(), functionSegment.getText(), functionSegment);
+            expr.setAlias(alias);
+            return expr;

Review comment:
       @tuichenchuxin Change this param to result may be better.

##########
File path: 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
##########
@@ -807,9 +810,34 @@ public final ASTNode visitWeightStringFunction(final WeightStringFunctionContext
     @Override
     public final ASTNode visitRegularFunction(final RegularFunctionContext ctx) {
         if (null != ctx.completeRegularFunction()) {
-            calculateParameterCount(ctx.completeRegularFunction().expr());
+            return visit(ctx.completeRegularFunction());
         }
-        return new ExpressionProjectionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), getOriginalText(ctx));
+        return visit(ctx.shorthandRegularFunction());

Review comment:
       @tuichenchuxin Can we move `ExpressionProjectionSegment` logic to here?

##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/dml/expr/FunctionSegment.java
##########
@@ -0,0 +1,44 @@
+/*
+ * 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.sql.common.segment.dml.expr;
+
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.complex.ComplexExpressionSegment;
+
+import java.util.Collection;
+import java.util.LinkedList;
+
+/**
+ * Function segment.
+ */
+@RequiredArgsConstructor
+@Getter
+public final class FunctionSegment implements ComplexExpressionSegment {
+    
+    private final int startIndex;
+    
+    private final int stopIndex;
+    
+    private final String methodName;
+    
+    private final Collection<ExpressionSegment> parameters = new LinkedList<>();
+    
+    private final String text;
+    

Review comment:
       Please remove this blank line here.




-- 
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 #13304: Support mysql regular function visit

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #13304:
URL: https://github.com/apache/shardingsphere/pull/13304#issuecomment-952587047


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/13304?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 [#13304](https://codecov.io/gh/apache/shardingsphere/pull/13304?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (75fa95e) into [master](https://codecov.io/gh/apache/shardingsphere/commit/9f32e2d1e63626bb9af18354e99eb1ad9b774740?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9f32e2d) will **decrease** coverage by `0.09%`.
   > The diff coverage is `51.35%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/13304/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/shardingsphere/pull/13304?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #13304      +/-   ##
   ============================================
   - Coverage     62.96%   62.87%   -0.10%     
   + Complexity     1406     1404       -2     
   ============================================
     Files          2571     2567       -4     
     Lines         38475    38448      -27     
     Branches       6605     6618      +13     
   ============================================
   - Hits          24226    24173      -53     
   - Misses        12345    12377      +32     
   + Partials       1904     1898       -6     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/13304?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...r/sql/common/segment/dml/expr/FunctionSegment.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvY29tbW9uL3NlZ21lbnQvZG1sL2V4cHIvRnVuY3Rpb25TZWdtZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...d/asserts/segment/expression/ExpressionAssert.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtdGVzdC9zaGFyZGluZ3NwaGVyZS1wYXJzZXItdGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdGVzdC9zcWwvcGFyc2VyL3BhcmFtZXRlcml6ZWQvYXNzZXJ0cy9zZWdtZW50L2V4cHJlc3Npb24vRXhwcmVzc2lvbkFzc2VydC5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...d/asserts/segment/projection/ProjectionAssert.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtdGVzdC9zaGFyZGluZ3NwaGVyZS1wYXJzZXItdGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdGVzdC9zcWwvcGFyc2VyL3BhcmFtZXRlcml6ZWQvYXNzZXJ0cy9zZWdtZW50L3Byb2plY3Rpb24vUHJvamVjdGlvbkFzc2VydC5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...s/domain/segment/impl/expr/ExpectedExpression.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtdGVzdC9zaGFyZGluZ3NwaGVyZS1wYXJzZXItdGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdGVzdC9zcWwvcGFyc2VyL3BhcmFtZXRlcml6ZWQvamF4Yi9jYXNlcy9kb21haW4vc2VnbWVudC9pbXBsL2V4cHIvRXhwZWN0ZWRFeHByZXNzaW9uLmphdmE=) | `100.00% <ø> (ø)` | |
   | [...n/segment/impl/projection/ExpectedProjections.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtdGVzdC9zaGFyZGluZ3NwaGVyZS1wYXJzZXItdGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdGVzdC9zcWwvcGFyc2VyL3BhcmFtZXRlcml6ZWQvamF4Yi9jYXNlcy9kb21haW4vc2VnbWVudC9pbXBsL3Byb2plY3Rpb24vRXhwZWN0ZWRQcm9qZWN0aW9ucy5qYXZh) | `40.90% <33.33%> (+0.90%)` | :arrow_up: |
   | [...sitor/statement/impl/MySQLStatementSQLVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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) | `80.22% <84.21%> (-0.04%)` | :arrow_down: |
   | [...segment/impl/function/ExpectedFunctionSegment.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtdGVzdC9zaGFyZGluZ3NwaGVyZS1wYXJzZXItdGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdGVzdC9zcWwvcGFyc2VyL3BhcmFtZXRlcml6ZWQvamF4Yi9jYXNlcy9kb21haW4vc2VnbWVudC9pbXBsL2Z1bmN0aW9uL0V4cGVjdGVkRnVuY3Rpb25TZWdtZW50LmphdmE=) | `100.00% <100.00%> (ø)` | |
   | [...rce/ShardingSphereJDBCDataSourceConfiguration.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9jb25maWcvZGF0YXNvdXJjZS9TaGFyZGluZ1NwaGVyZUpEQkNEYXRhU291cmNlQ29uZmlndXJhdGlvbi5qYXZh) | `65.00% <0.00%> (-35.00%)` | :arrow_down: |
   | [...ter/coordinator/registry/cache/node/CacheNode.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLXR5cGUvc2hhcmRpbmdzcGhlcmUtY2x1c3Rlci1tb2RlL3NoYXJkaW5nc3BoZXJlLWNsdXN0ZXItbW9kZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9tb2RlL21hbmFnZXIvY2x1c3Rlci9jb29yZGluYXRvci9yZWdpc3RyeS9jYWNoZS9ub2RlL0NhY2hlTm9kZS5qYXZh) | `66.66% <0.00%> (-8.34%)` | :arrow_down: |
   | [...ing/route/engine/condition/ShardingConditions.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmcvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmctY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc2hhcmRpbmcvcm91dGUvZW5naW5lL2NvbmRpdGlvbi9TaGFyZGluZ0NvbmRpdGlvbnMuamF2YQ==) | `57.14% <0.00%> (-7.80%)` | :arrow_down: |
   | ... and [36 more](https://codecov.io/gh/apache/shardingsphere/pull/13304/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/13304?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/13304?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 [9f32e2d...75fa95e](https://codecov.io/gh/apache/shardingsphere/pull/13304?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] codecov-commenter edited a comment on pull request #13304: Support mysql regular function visit

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #13304:
URL: https://github.com/apache/shardingsphere/pull/13304#issuecomment-952587047


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/13304?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 [#13304](https://codecov.io/gh/apache/shardingsphere/pull/13304?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8f5c1ea) into [master](https://codecov.io/gh/apache/shardingsphere/commit/67b15e295a5f55bc816a3e336ba10a899e67165f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (67b15e2) will **increase** coverage by `0.44%`.
   > The diff coverage is `38.23%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/13304/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/shardingsphere/pull/13304?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #13304      +/-   ##
   ============================================
   + Coverage     62.92%   63.36%   +0.44%     
   - Complexity     1408     1476      +68     
   ============================================
     Files          2567     2664      +97     
     Lines         38417    39717    +1300     
     Branches       6607     6829     +222     
   ============================================
   + Hits          24173    25168     +995     
   - Misses        12356    12612     +256     
   - Partials       1888     1937      +49     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/13304?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...d/asserts/segment/expression/ExpressionAssert.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtdGVzdC9zaGFyZGluZ3NwaGVyZS1wYXJzZXItdGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdGVzdC9zcWwvcGFyc2VyL3BhcmFtZXRlcml6ZWQvYXNzZXJ0cy9zZWdtZW50L2V4cHJlc3Npb24vRXhwcmVzc2lvbkFzc2VydC5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...s/domain/segment/impl/expr/ExpectedExpression.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtdGVzdC9zaGFyZGluZ3NwaGVyZS1wYXJzZXItdGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdGVzdC9zcWwvcGFyc2VyL3BhcmFtZXRlcml6ZWQvamF4Yi9jYXNlcy9kb21haW4vc2VnbWVudC9pbXBsL2V4cHIvRXhwZWN0ZWRFeHByZXNzaW9uLmphdmE=) | `100.00% <ø> (ø)` | |
   | [...sitor/statement/impl/MySQLStatementSQLVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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) | `80.11% <57.89%> (-0.72%)` | :arrow_down: |
   | [...segment/impl/function/ExpectedFunctionSegment.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtdGVzdC9zaGFyZGluZ3NwaGVyZS1wYXJzZXItdGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdGVzdC9zcWwvcGFyc2VyL3BhcmFtZXRlcml6ZWQvamF4Yi9jYXNlcy9kb21haW4vc2VnbWVudC9pbXBsL2Z1bmN0aW9uL0V4cGVjdGVkRnVuY3Rpb25TZWdtZW50LmphdmE=) | `100.00% <100.00%> (ø)` | |
   | [...d/text/distsql/ral/common/hint/HintSourceType.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L0hpbnRTb3VyY2VUeXBlLmphdmE=) | `0.00% <0.00%> (-42.86%)` | :arrow_down: |
   | [...ropShardingBroadcastTableRulesStatementAssert.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtdGVzdC9zaGFyZGluZ3NwaGVyZS1wYXJzZXItdGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdGVzdC9zcWwvcGFyc2VyL3BhcmFtZXRlcml6ZWQvYXNzZXJ0cy9zdGF0ZW1lbnQvZGlzdHNxbC9yZGwvZHJvcC9pbXBsL0Ryb3BTaGFyZGluZ0Jyb2FkY2FzdFRhYmxlUnVsZXNTdGF0ZW1lbnRBc3NlcnQuamF2YQ==) | `60.00% <0.00%> (-40.00%)` | :arrow_down: |
   | [...alect/handler/ddl/CreateTableStatementHandler.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvZGlhbGVjdC9oYW5kbGVyL2RkbC9DcmVhdGVUYWJsZVN0YXRlbWVudEhhbmRsZXIuamF2YQ==) | `71.42% <0.00%> (-28.58%)` | :arrow_down: |
   | [...dialect/handler/ddl/DropTableStatementHandler.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvZGlhbGVjdC9oYW5kbGVyL2RkbC9Ecm9wVGFibGVTdGF0ZW1lbnRIYW5kbGVyLmphdmE=) | `77.77% <0.00%> (-22.23%)` | :arrow_down: |
   | [.../infra/rule/builder/schema/SchemaRulesBuilder.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9ydWxlL2J1aWxkZXIvc2NoZW1hL1NjaGVtYVJ1bGVzQnVpbGRlci5qYXZh) | `65.71% <0.00%> (-19.48%)` | :arrow_down: |
   | [...distsql/rdl/rule/RuleDefinitionBackendHandler.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmRsL3J1bGUvUnVsZURlZmluaXRpb25CYWNrZW5kSGFuZGxlci5qYXZh) | `64.81% <0.00%> (-17.69%)` | :arrow_down: |
   | ... and [187 more](https://codecov.io/gh/apache/shardingsphere/pull/13304/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/13304?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/13304?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 [67b15e2...8f5c1ea](https://codecov.io/gh/apache/shardingsphere/pull/13304?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] codecov-commenter edited a comment on pull request #13304: Support mysql regular function visit

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #13304:
URL: https://github.com/apache/shardingsphere/pull/13304#issuecomment-952587047


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/13304?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 [#13304](https://codecov.io/gh/apache/shardingsphere/pull/13304?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f6b7f7b) into [master](https://codecov.io/gh/apache/shardingsphere/commit/3dde384738beac3a31a695b892d5d23b9aa95f39?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3dde384) will **decrease** coverage by `0.00%`.
   > The diff coverage is `48.93%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/13304/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/shardingsphere/pull/13304?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #13304      +/-   ##
   ============================================
   - Coverage     62.89%   62.88%   -0.01%     
   - Complexity     1410     1411       +1     
   ============================================
     Files          2565     2568       +3     
     Lines         38422    38460      +38     
     Branches       6611     6617       +6     
   ============================================
   + Hits          24164    24185      +21     
   - Misses        12360    12379      +19     
   + Partials       1898     1896       -2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/13304?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ent/select/projection/impl/FunctionProjection.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtYmluZGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9iaW5kZXIvc2VnbWVudC9zZWxlY3QvcHJvamVjdGlvbi9pbXBsL0Z1bmN0aW9uUHJvamVjdGlvbi5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...r/sql/common/segment/dml/expr/FunctionSegment.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvY29tbW9uL3NlZ21lbnQvZG1sL2V4cHIvRnVuY3Rpb25TZWdtZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...d/asserts/segment/expression/ExpressionAssert.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtdGVzdC9zaGFyZGluZ3NwaGVyZS1wYXJzZXItdGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdGVzdC9zcWwvcGFyc2VyL3BhcmFtZXRlcml6ZWQvYXNzZXJ0cy9zZWdtZW50L2V4cHJlc3Npb24vRXhwcmVzc2lvbkFzc2VydC5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...d/asserts/segment/projection/ProjectionAssert.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtdGVzdC9zaGFyZGluZ3NwaGVyZS1wYXJzZXItdGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdGVzdC9zcWwvcGFyc2VyL3BhcmFtZXRlcml6ZWQvYXNzZXJ0cy9zZWdtZW50L3Byb2plY3Rpb24vUHJvamVjdGlvbkFzc2VydC5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...s/domain/segment/impl/expr/ExpectedExpression.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtdGVzdC9zaGFyZGluZ3NwaGVyZS1wYXJzZXItdGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdGVzdC9zcWwvcGFyc2VyL3BhcmFtZXRlcml6ZWQvamF4Yi9jYXNlcy9kb21haW4vc2VnbWVudC9pbXBsL2V4cHIvRXhwZWN0ZWRFeHByZXNzaW9uLmphdmE=) | `100.00% <ø> (ø)` | |
   | [...n/segment/impl/projection/ExpectedProjections.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtdGVzdC9zaGFyZGluZ3NwaGVyZS1wYXJzZXItdGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdGVzdC9zcWwvcGFyc2VyL3BhcmFtZXRlcml6ZWQvamF4Yi9jYXNlcy9kb21haW4vc2VnbWVudC9pbXBsL3Byb2plY3Rpb24vRXhwZWN0ZWRQcm9qZWN0aW9ucy5qYXZh) | `40.90% <33.33%> (+0.90%)` | :arrow_up: |
   | [...sitor/statement/impl/MySQLStatementSQLVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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) | `80.28% <85.00%> (+0.02%)` | :arrow_up: |
   | [...ent/select/projection/engine/ProjectionEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtYmluZGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9iaW5kZXIvc2VnbWVudC9zZWxlY3QvcHJvamVjdGlvbi9lbmdpbmUvUHJvamVjdGlvbkVuZ2luZS5qYXZh) | `86.66% <100.00%> (+0.45%)` | :arrow_up: |
   | [...segment/impl/function/ExpectedFunctionSegment.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtdGVzdC9zaGFyZGluZ3NwaGVyZS1wYXJzZXItdGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdGVzdC9zcWwvcGFyc2VyL3BhcmFtZXRlcml6ZWQvamF4Yi9jYXNlcy9kb21haW4vc2VnbWVudC9pbXBsL2Z1bmN0aW9uL0V4cGVjdGVkRnVuY3Rpb25TZWdtZW50LmphdmE=) | `100.00% <100.00%> (ø)` | |
   | [...miner/algorithm/NoteShadowAlgorithmDeterminer.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhZG93L3NoYXJkaW5nc3BoZXJlLXNoYWRvdy1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9zaGFkb3cvcm91dGUvZW5naW5lL2RldGVybWluZXIvYWxnb3JpdGhtL05vdGVTaGFkb3dBbGdvcml0aG1EZXRlcm1pbmVyLmphdmE=) | `60.00% <0.00%> (-3.64%)` | :arrow_down: |
   | ... and [5 more](https://codecov.io/gh/apache/shardingsphere/pull/13304/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/13304?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/13304?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 [3dde384...f6b7f7b](https://codecov.io/gh/apache/shardingsphere/pull/13304?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] strongduanmu commented on a change in pull request #13304: Support mysql regular function visit

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on a change in pull request #13304:
URL: https://github.com/apache/shardingsphere/pull/13304#discussion_r739152009



##########
File path: shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dml/select.xml
##########
@@ -2564,7 +2576,15 @@
             <simple-table name="t_order" start-index="45" stop-index="51" />
         </from>
         <projections start-index="7" stop-index="38">
-            <expression-projection text="INTERVAL(status,1,5)" alias="func_status" start-index="7" stop-index="38" />
+            <expression-projection text="INTERVAL(status,1,5)" alias="func_status" start-index="7" stop-index="38">
+                <expr>
+                    <function function-name="INTERVAL" alias="func_status" start-index="7" stop-index="26" text="INTERVAL(status,1,5)" >
+                        <column name="status" start-index="16" stop-index="21" />

Review comment:
       @tuichenchuxin Why is it not the parameters type here?




-- 
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 commented on a change in pull request #13304: Support mysql regular function visit

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on a change in pull request #13304:
URL: https://github.com/apache/shardingsphere/pull/13304#discussion_r737968844



##########
File path: shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/projection/impl/FunctionProjection.java
##########
@@ -0,0 +1,50 @@
+/*
+ * 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.segment.select.projection.impl;
+
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+import lombok.ToString;
+import org.apache.shardingsphere.infra.binder.segment.select.projection.Projection;
+
+import java.util.Optional;
+
+/**
+ * Function projection.
+ */
+@RequiredArgsConstructor
+@Getter
+@EqualsAndHashCode
+@ToString
+public final class FunctionProjection implements Projection {

Review comment:
       @tuichenchuxin If we move FunctionSegment to ExpressionProjectionSegment, this class can be removed.

##########
File path: shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/expression/ExpressionAssert.java
##########
@@ -276,6 +278,26 @@ public static void assertBetweenExpression(final SQLCaseAssertContext assertCont
             SQLSegmentAssert.assertIs(assertContext, actual, expected);
         }
     }
+    
+    /**
+     * Assert function.

Review comment:
       Please add a blank line after java doc description.

##########
File path: shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/projection/engine/ProjectionEngine.java
##########
@@ -83,6 +85,9 @@
         if (projectionSegment instanceof ExpressionProjectionSegment) {
             return Optional.of(createProjection((ExpressionProjectionSegment) projectionSegment));
         }
+        if (projectionSegment instanceof FunctionSegment) {
+            return Optional.of(createProjection((FunctionSegment) projectionSegment));

Review comment:
       @tuichenchuxin Can we merge FunctionSegment to ExpressionProjectionSegment?




-- 
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 closed pull request #13304: Support mysql regular function visit

Posted by GitBox <gi...@apache.org>.
tuichenchuxin closed pull request #13304:
URL: https://github.com/apache/shardingsphere/pull/13304


   


-- 
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 edited a comment on pull request #13304: Support mysql regular function visit

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #13304:
URL: https://github.com/apache/shardingsphere/pull/13304#issuecomment-952587047


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/13304?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 [#13304](https://codecov.io/gh/apache/shardingsphere/pull/13304?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8f5c1ea) into [master](https://codecov.io/gh/apache/shardingsphere/commit/67b15e295a5f55bc816a3e336ba10a899e67165f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (67b15e2) will **increase** coverage by `0.47%`.
   > The diff coverage is `38.23%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/13304/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/shardingsphere/pull/13304?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #13304      +/-   ##
   ============================================
   + Coverage     62.92%   63.39%   +0.47%     
   - Complexity     1408     1477      +69     
   ============================================
     Files          2567     2664      +97     
     Lines         38417    39765    +1348     
     Branches       6607     6840     +233     
   ============================================
   + Hits          24173    25210    +1037     
   - Misses        12356    12616     +260     
   - Partials       1888     1939      +51     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/13304?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...d/asserts/segment/expression/ExpressionAssert.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtdGVzdC9zaGFyZGluZ3NwaGVyZS1wYXJzZXItdGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdGVzdC9zcWwvcGFyc2VyL3BhcmFtZXRlcml6ZWQvYXNzZXJ0cy9zZWdtZW50L2V4cHJlc3Npb24vRXhwcmVzc2lvbkFzc2VydC5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...s/domain/segment/impl/expr/ExpectedExpression.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtdGVzdC9zaGFyZGluZ3NwaGVyZS1wYXJzZXItdGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdGVzdC9zcWwvcGFyc2VyL3BhcmFtZXRlcml6ZWQvamF4Yi9jYXNlcy9kb21haW4vc2VnbWVudC9pbXBsL2V4cHIvRXhwZWN0ZWRFeHByZXNzaW9uLmphdmE=) | `100.00% <ø> (ø)` | |
   | [...sitor/statement/impl/MySQLStatementSQLVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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) | `80.11% <57.89%> (-0.72%)` | :arrow_down: |
   | [...segment/impl/function/ExpectedFunctionSegment.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtdGVzdC9zaGFyZGluZ3NwaGVyZS1wYXJzZXItdGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdGVzdC9zcWwvcGFyc2VyL3BhcmFtZXRlcml6ZWQvamF4Yi9jYXNlcy9kb21haW4vc2VnbWVudC9pbXBsL2Z1bmN0aW9uL0V4cGVjdGVkRnVuY3Rpb25TZWdtZW50LmphdmE=) | `100.00% <100.00%> (ø)` | |
   | [...d/text/distsql/ral/common/hint/HintSourceType.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L0hpbnRTb3VyY2VUeXBlLmphdmE=) | `0.00% <0.00%> (-42.86%)` | :arrow_down: |
   | [...ropShardingBroadcastTableRulesStatementAssert.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtdGVzdC9zaGFyZGluZ3NwaGVyZS1wYXJzZXItdGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdGVzdC9zcWwvcGFyc2VyL3BhcmFtZXRlcml6ZWQvYXNzZXJ0cy9zdGF0ZW1lbnQvZGlzdHNxbC9yZGwvZHJvcC9pbXBsL0Ryb3BTaGFyZGluZ0Jyb2FkY2FzdFRhYmxlUnVsZXNTdGF0ZW1lbnRBc3NlcnQuamF2YQ==) | `60.00% <0.00%> (-40.00%)` | :arrow_down: |
   | [...alect/handler/ddl/CreateTableStatementHandler.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvZGlhbGVjdC9oYW5kbGVyL2RkbC9DcmVhdGVUYWJsZVN0YXRlbWVudEhhbmRsZXIuamF2YQ==) | `71.42% <0.00%> (-28.58%)` | :arrow_down: |
   | [...dialect/handler/ddl/DropTableStatementHandler.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvZGlhbGVjdC9oYW5kbGVyL2RkbC9Ecm9wVGFibGVTdGF0ZW1lbnRIYW5kbGVyLmphdmE=) | `77.77% <0.00%> (-22.23%)` | :arrow_down: |
   | [.../infra/rule/builder/schema/SchemaRulesBuilder.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9ydWxlL2J1aWxkZXIvc2NoZW1hL1NjaGVtYVJ1bGVzQnVpbGRlci5qYXZh) | `65.71% <0.00%> (-19.48%)` | :arrow_down: |
   | [...distsql/rdl/rule/RuleDefinitionBackendHandler.java](https://codecov.io/gh/apache/shardingsphere/pull/13304/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmRsL3J1bGUvUnVsZURlZmluaXRpb25CYWNrZW5kSGFuZGxlci5qYXZh) | `64.81% <0.00%> (-17.69%)` | :arrow_down: |
   | ... and [189 more](https://codecov.io/gh/apache/shardingsphere/pull/13304/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/13304?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/13304?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 [67b15e2...8f5c1ea](https://codecov.io/gh/apache/shardingsphere/pull/13304?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