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 2020/09/18 03:54:25 UTC

[GitHub] [shardingsphere] jingshanglu opened a new pull request #7505: Fix code format for #7353

jingshanglu opened a new pull request #7505:
URL: https://github.com/apache/shardingsphere/pull/7505


   
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero merged pull request #7505: Fix code format for #7353

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


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] coveralls commented on pull request #7505: Fix code format for #7353

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


   ## Pull Request Test Coverage Report for [Build 14883](https://coveralls.io/builds/33556793)
   
   * **189** of **218**   **(86.7%)**  changed or added relevant lines in **14** files are covered.
   * **1** unchanged line in **1** file lost coverage.
   * Overall coverage decreased (**-0.05%**) to **35.032%**
   
   ---
   
   |  Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
   | :-----|--------------|--------|---: |
   | [shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-route/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/WhereClauseShardingConditionEngine.java](https://coveralls.io/builds/33556793/source?filename=shardingsphere-features%2Fshardingsphere-sharding%2Fshardingsphere-sharding-route%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsharding%2Froute%2Fengine%2Fcondition%2Fengine%2FWhereClauseShardingConditionEngine.java#L112) | 9 | 10 | 90.0%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-binder/src/main/java/org/apache/shardingsphere/sql/parser/binder/segment/select/pagination/engine/RowNumberPaginationContextEngine.java](https://coveralls.io/builds/33556793/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-binder%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fbinder%2Fsegment%2Fselect%2Fpagination%2Fengine%2FRowNumberPaginationContextEngine.java#L106) | 14 | 15 | 93.33%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-binder/src/main/java/org/apache/shardingsphere/sql/parser/binder/segment/select/pagination/engine/TopPaginationContextEngine.java](https://coveralls.io/builds/33556793/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-binder%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fbinder%2Fsegment%2Fselect%2Fpagination%2Fengine%2FTopPaginationContextEngine.java#L84) | 13 | 14 | 92.86%
   | [shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-common/src/main/java/org/apache/shardingsphere/shadow/condition/ShadowConditionEngine.java](https://coveralls.io/builds/33556793/source?filename=shardingsphere-features%2Fshardingsphere-shadow%2Fshardingsphere-shadow-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshadow%2Fcondition%2FShadowConditionEngine.java#L64) | 0 | 2 | 0.0%
   | [shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-rewrite/src/main/java/org/apache/shardingsphere/shadow/rewrite/token/generator/impl/ShadowPredicateColumnTokenGenerator.java](https://coveralls.io/builds/33556793/source?filename=shardingsphere-features%2Fshardingsphere-shadow%2Fshardingsphere-shadow-rewrite%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshadow%2Frewrite%2Ftoken%2Fgenerator%2Fimpl%2FShadowPredicateColumnTokenGenerator.java#L56) | 0 | 2 | 0.0%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/OracleVisitor.java](https://coveralls.io/builds/33556793/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-dialect%2Fshardingsphere-sql-parser-oracle%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Foracle%2Fvisitor%2FOracleVisitor.java#L278) | 31 | 33 | 93.94%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/PostgreSQLVisitor.java](https://coveralls.io/builds/33556793/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-dialect%2Fshardingsphere-sql-parser-postgresql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fpostgresql%2Fvisitor%2FPostgreSQLVisitor.java#L306) | 22 | 24 | 91.67%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sql92/src/main/java/org/apache/shardingsphere/sql/parser/sql92/visitor/SQL92Visitor.java](https://coveralls.io/builds/33556793/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-dialect%2Fshardingsphere-sql-parser-sql92%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql92%2Fvisitor%2FSQL92Visitor.java#L271) | 31 | 33 | 93.94%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/java/org/apache/shardingsphere/sql/parser/sqlserver/visitor/SQLServerVisitor.java](https://coveralls.io/builds/33556793/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-dialect%2Fshardingsphere-sql-parser-sqlserver%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsqlserver%2Fvisitor%2FSQLServerVisitor.java#L285) | 31 | 33 | 93.94%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/MySQLVisitor.java](https://coveralls.io/builds/33556793/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-dialect%2Fshardingsphere-sql-parser-mysql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fmysql%2Fvisitor%2FMySQLVisitor.java#L261) | 32 | 38 | 84.21%
   <!-- | **Total:** | **189** | **218** | **86.7%** | -->
   
   |  Files with Coverage Reduction | New Missed Lines | % |
   | :-----|--------------|--: |
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/MySQLVisitor.java](https://coveralls.io/builds/33556793/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-dialect%2Fshardingsphere-sql-parser-mysql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fmysql%2Fvisitor%2FMySQLVisitor.java#L267) | 1 | 81.02% |
   <!-- | **Total:** | **1** |  | -->
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/33556793/badge)](https://coveralls.io/builds/33556793) |
   | :-- | --: |
   | Change from base [Build 14876](https://coveralls.io/builds/33552634): |  -0.05% |
   | Covered Lines: | 36473 |
   | Relevant Lines: | 104113 |
   
   ---
   ##### 💛  - [Coveralls](https://coveralls.io)
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on a change in pull request #7505: Fix code format for #7353

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



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/PostgreSQLVisitor.java
##########
@@ -183,25 +183,29 @@ public ASTNode visitAExpr(final AExprContext ctx) {
             return createInSegment(ctx);
         }
         if (null != ctx.comparisonOperator()) {
-            BinaryOperationExpression result = new BinaryOperationExpression();
-            result.setStartIndex(ctx.start.getStartIndex());
-            result.setStopIndex(ctx.stop.getStopIndex());
-            result.setLeft((ExpressionSegment) visit(ctx.aExpr(0)));
-            result.setRight((ExpressionSegment) visit(ctx.aExpr(1)));
-            result.setOperator(ctx.comparisonOperator().getText());
+//            BinaryOperationExpression result = new BinaryOperationExpression();
+//            result.setStartIndex(ctx.start.getStartIndex());
+//            result.setStopIndex(ctx.stop.getStopIndex());
+            ExpressionSegment left = (ExpressionSegment) visit(ctx.aExpr(0));
+            ExpressionSegment right = (ExpressionSegment) visit(ctx.aExpr(1));
+            String operator = ctx.comparisonOperator().getText();
             String text = ctx.start.getInputStream().getText(new Interval(ctx.start.getStartIndex(), ctx.stop.getStopIndex()));
-            result.setText(text);
+//            result.setText(text);
+            BinaryOperationExpression result = new BinaryOperationExpression(ctx.start.getStartIndex(), ctx.stop.getStopIndex(), left, right, operator, text);
+    
             return result;
         }
         if (null != ctx.logicalOperator()) {
-            BinaryOperationExpression result = new BinaryOperationExpression();
-            result.setStartIndex(ctx.start.getStartIndex());
-            result.setStopIndex(ctx.stop.getStopIndex());
-            result.setLeft((ExpressionSegment) visit(ctx.aExpr(0)));
-            result.setRight((ExpressionSegment) visit(ctx.aExpr(1)));
-            result.setOperator(ctx.logicalOperator().getText());
+//            BinaryOperationExpression result = new BinaryOperationExpression();
+//            result.setStartIndex(ctx.start.getStartIndex());
+//            result.setStopIndex(ctx.stop.getStopIndex());
+            ExpressionSegment left = (ExpressionSegment) visit(ctx.aExpr(0));
+            ExpressionSegment right = (ExpressionSegment) visit(ctx.aExpr(1));
+            String operator = ctx.logicalOperator().getText();
             String text = ctx.start.getInputStream().getText(new Interval(ctx.start.getStartIndex(), ctx.stop.getStopIndex()));
-            result.setText(text);
+//            result.setText(text);

Review comment:
       Please remove it if unneeded.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org