You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2020/10/20 16:33:22 UTC

[GitHub] [ignite] gvvinblade opened a new pull request #8380: Calcite new version (1.26.0)

gvvinblade opened a new pull request #8380:
URL: https://github.com/apache/ignite/pull/8380


   Thank you for submitting the pull request to the Apache Ignite.
   
   In order to streamline the review of the contribution 
   we ask you to ensure the following steps have been taken:
   
   ### The Contribution Checklist
   - [ ] There is a single JIRA ticket related to the pull request. 
   - [ ] The web-link to the pull request is attached to the JIRA ticket.
   - [ ] The JIRA ticket has the _Patch Available_ state.
   - [ ] The pull request body describes changes that have been made. 
   The description explains _WHAT_ and _WHY_ was made instead of _HOW_.
   - [ ] The pull request title is treated as the final commit message. 
   The following pattern must be used: `IGNITE-XXXX Change summary` where `XXXX` - number of JIRA issue.
   - [ ] A reviewer has been mentioned through the JIRA comments 
   (see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers)) 
   - [ ] The pull request has been checked by the Teamcity Bot and 
   the `green visa` attached to the JIRA ticket (see [TC.Bot: Check PR](https://mtcga.gridgain.com/prs.html))
   
   ### Notes
   - [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute)
   - [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules)
   - [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines)
   - [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot)
   
   If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel.
   


----------------------------------------------------------------
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] [ignite] Amanda1232 commented on a change in pull request #8380: Calcite new version (1.26.0)

Posted by GitBox <gi...@apache.org>.
Amanda1232 commented on a change in pull request #8380:
URL: https://github.com/apache/ignite/pull/8380#discussion_r517156999



##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rule/logical/LogicalOrToUnionRule.java
##########
@@ -94,4 +92,26 @@ private RelNode createUnionAll(RelOptCluster cluster, RelNode input, RexNode op1
             .union(true)
             .build();
     }
+
+    /** */
+    @SuppressWarnings("ClassNameSameAsAncestorName")
+    public interface Config extends RelRule.Config {

Review comment:
       Our static analysis engine detects that your pull request includes a change that **class name shadows simple name of interface**. According to [best practice](https://spotbugs.readthedocs.io/en/stable/bugDescriptions.html#nm-class-names-shouldn-t-shadow-simple-name-of-implemented-interface-nm-same-simple-name-as-interface), it can be exceptionally confusing, creating many situations where you have to look at import statements to resolve references, and creating many opportunities to accidentally define methods that don't override the methods in their superclasses.




----------------------------------------------------------------
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] [ignite] gvvinblade closed pull request #8380: Calcite new version (1.26.0)

Posted by GitBox <gi...@apache.org>.
gvvinblade closed pull request #8380:
URL: https://github.com/apache/ignite/pull/8380


   


----------------------------------------------------------------
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] [ignite] Amanda1232 commented on a change in pull request #8380: Calcite new version (1.26.0)

Posted by GitBox <gi...@apache.org>.
Amanda1232 commented on a change in pull request #8380:
URL: https://github.com/apache/ignite/pull/8380#discussion_r517156789



##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rule/CorrelatedNestedLoopJoinRule.java
##########
@@ -125,6 +119,42 @@ public CorrelatedNestedLoopJoinConverterRule(int batchSize) {
         RelNode left = convert(rel.getLeft(), leftInTraits);
         right = convert(right, rightInTraits);
 
-        return new IgniteCorrelatedNestedLoopJoin(cluster, outTraits, left, right, rel.getCondition(), correlationIds, joinType);
+        call.transformTo(new IgniteCorrelatedNestedLoopJoin(cluster, outTraits, left, right, rel.getCondition(), correlationIds, joinType));
+    }
+
+    /** */
+    @SuppressWarnings("ClassNameSameAsAncestorName")
+    public interface Config extends RelRule.Config {

Review comment:
       Our static analysis engine detects that your pull request includes a change that **class name shadows simple name of interface**. According to [best practice](https://spotbugs.readthedocs.io/en/stable/bugDescriptions.html#nm-class-names-shouldn-t-shadow-simple-name-of-implemented-interface-nm-same-simple-name-as-interface), it can be exceptionally confusing, creating many situations where you have to look at import statements to resolve references, and creating many opportunities to accidentally define methods that don't override the methods in their superclasses.




----------------------------------------------------------------
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] [ignite] gvvinblade commented on a change in pull request #8380: Calcite new version (1.26.0)

Posted by GitBox <gi...@apache.org>.
gvvinblade commented on a change in pull request #8380:
URL: https://github.com/apache/ignite/pull/8380#discussion_r511111879



##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rule/logical/LogicalOrToUnionRule.java
##########
@@ -63,7 +61,7 @@ private LogicalOrToUnionRule(Class<LogicalFilter> clazz, String desc) {
 
         List<RexNode> operands = RelOptUtil.disjunctions(dnf);
 
-        if (operands.size() != 2)
+        if (operands.size() != 2 || RexUtil.find(SqlKind.IS_NULL).anyContain(operands))

Review comment:
       this fix isn't the best one, but we need a way to detect somehow a filter what is a result of previous rule call, otherwise we'll have infinity rule match queue. And I have no idea how we would write a specific test for it (a planer plans a query in finite number of steps, it means a condition works)




----------------------------------------------------------------
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] [ignite] zstan commented on a change in pull request #8380: Calcite new version (1.26.0)

Posted by GitBox <gi...@apache.org>.
zstan commented on a change in pull request #8380:
URL: https://github.com/apache/ignite/pull/8380#discussion_r510790611



##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/Inbox.java
##########
@@ -216,7 +216,7 @@ private void push() throws IgniteCheckedException {
     /** */
     private void pushOrdered() throws IgniteCheckedException {
          PriorityQueue<Pair<Row, Buffer>> heap =
-            new PriorityQueue<>(buffers.size(), Map.Entry.comparingByKey(comp));
+            new PriorityQueue<>(Math.max(buffers.size(), 1), Map.Entry.comparingByKey(comp));

Review comment:
       i understand why you refactor here: Math.max, but why do we need additional allocation here ? 
   if (buffers.isEmpty)
     PriorityQueue<Pair<Row, Buffer>> heap = null; and further F.isEmpty(heap) check would be match clear, isn`t it ?




----------------------------------------------------------------
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] [ignite] gvvinblade commented on a change in pull request #8380: Calcite new version (1.26.0)

Posted by GitBox <gi...@apache.org>.
gvvinblade commented on a change in pull request #8380:
URL: https://github.com/apache/ignite/pull/8380#discussion_r511106324



##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/Inbox.java
##########
@@ -216,7 +216,7 @@ private void push() throws IgniteCheckedException {
     /** */
     private void pushOrdered() throws IgniteCheckedException {
          PriorityQueue<Pair<Row, Buffer>> heap =
-            new PriorityQueue<>(buffers.size(), Map.Entry.comparingByKey(comp));
+            new PriorityQueue<>(Math.max(buffers.size(), 1), Map.Entry.comparingByKey(comp));

Review comment:
       possibly, I'll rewrite this piece of code, honestly it was just a rude fast fix




----------------------------------------------------------------
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] [ignite] zstan commented on a change in pull request #8380: Calcite new version (1.26.0)

Posted by GitBox <gi...@apache.org>.
zstan commented on a change in pull request #8380:
URL: https://github.com/apache/ignite/pull/8380#discussion_r510919160



##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rule/logical/LogicalOrToUnionRule.java
##########
@@ -63,7 +61,7 @@ private LogicalOrToUnionRule(Class<LogicalFilter> clazz, String desc) {
 
         List<RexNode> operands = RelOptUtil.disjunctions(dnf);
 
-        if (operands.size() != 2)
+        if (operands.size() != 2 || RexUtil.find(SqlKind.IS_NULL).anyContain(operands))

Review comment:
       i suppose we don`t have any test for it ?




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