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/12/04 15:09:07 UTC

[GitHub] [ignite] zstan opened a new pull request #8544: IGNITE-13817

zstan opened a new pull request #8544:
URL: https://github.com/apache/ignite/pull/8544


   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] dspavlov closed pull request #8544: IGNITE-13817

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


   


-- 
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@ignite.apache.org

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



[GitHub] [ignite] zstan commented on a change in pull request #8544: IGNITE-13817

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



##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rel/AbstractIgniteNestedLoopJoin.java
##########
@@ -391,11 +322,17 @@ else if (joinType == RIGHT || joinType == JoinRelType.FULL) {
         if (Double.isInfinite(rightRowCount))
             rowCount = rightRowCount;
 
+        if (!Double.isInfinite(leftRowCount) && !Double.isInfinite(rightRowCount) && leftRowCount > rightRowCount)
+            rowCount = RelMdUtil.addEpsilon(rowCount);
+
         RelDistribution.Type type = distribution().getType();
 
-        if (type == BROADCAST_DISTRIBUTED || type == SINGLETON)
+        if (type == SINGLETON)
             rowCount = RelMdUtil.addEpsilon(rowCount);
 
+        if (type == BROADCAST_DISTRIBUTED)
+            rowCount = RelMdUtil.addEpsilon(RelMdUtil.addEpsilon(rowCount));

Review comment:
       looks hack`y for me and not intuitive ...




----------------------------------------------------------------
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] korlov42 commented on a change in pull request #8544: IGNITE-13817

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



##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rel/AbstractIgniteNestedLoopJoin.java
##########
@@ -307,55 +285,18 @@ else if (joinType == RIGHT || joinType == JoinRelType.FULL) {
                     ? distribution.function()
                     : DistributionFunction.hash();
 
-                IgniteDistribution outDistr; // TODO distribution multitrait support

Review comment:
       I don't think so. Different distribution options should be created on derive




----------------------------------------------------------------
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] dspavlov commented on pull request #8544: IGNITE-13817

Posted by GitBox <gi...@apache.org>.
dspavlov commented on pull request #8544:
URL: https://github.com/apache/ignite/pull/8544#issuecomment-894335903


   This PR is associated with a resolved ticket. Closing the PR, please reopen it if you still need 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.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

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



[GitHub] [ignite] korlov42 commented on a change in pull request #8544: IGNITE-13817

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



##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rel/IgniteTableScan.java
##########
@@ -44,7 +44,12 @@
      */
     public IgniteTableScan(RelInput input) {
         super(changeTraits(input, IgniteConvention.INSTANCE));
-        sourceId = ((Number)input.get("sourceId")).longValue();
+
+        Object srcIdObj = input.get("sourceId");
+        if (srcIdObj != null)
+            sourceId = ((Number)srcIdObj).longValue();
+        else
+            sourceId = -1;

Review comment:
       A sourceId is serialised if it is not equal to -1 (see `IgniteTableScan#explainTerms0()`). So when deserialising we could get NPE here, if the node was serialised with `sourceId=-1`. It's just a matter of time




----------------------------------------------------------------
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 #8544: IGNITE-13817

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



##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rel/IgniteTableScan.java
##########
@@ -44,7 +44,12 @@
      */
     public IgniteTableScan(RelInput input) {
         super(changeTraits(input, IgniteConvention.INSTANCE));
-        sourceId = ((Number)input.get("sourceId")).longValue();
+
+        Object srcIdObj = input.get("sourceId");
+        if (srcIdObj != null)
+            sourceId = ((Number)srcIdObj).longValue();
+        else
+            sourceId = -1;

Review comment:
       i put _assert false_ here and no tests are failed, have no ideas what is it code for, can u explain or return old functionality ?




----------------------------------------------------------------
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 #8544: IGNITE-13817

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



##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rel/AbstractIgniteNestedLoopJoin.java
##########
@@ -307,55 +285,18 @@ else if (joinType == RIGHT || joinType == JoinRelType.FULL) {
                     ? distribution.function()
                     : DistributionFunction.hash();
 
-                IgniteDistribution outDistr; // TODO distribution multitrait support

Review comment:
       may be this comment informative and we will forgot smth? 




----------------------------------------------------------------
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] korlov42 commented on a change in pull request #8544: IGNITE-13817

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



##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rel/AbstractIgniteNestedLoopJoin.java
##########
@@ -391,11 +322,17 @@ else if (joinType == RIGHT || joinType == JoinRelType.FULL) {
         if (Double.isInfinite(rightRowCount))
             rowCount = rightRowCount;
 
+        if (!Double.isInfinite(leftRowCount) && !Double.isInfinite(rightRowCount) && leftRowCount > rightRowCount)
+            rowCount = RelMdUtil.addEpsilon(rowCount);
+
         RelDistribution.Type type = distribution().getType();
 
-        if (type == BROADCAST_DISTRIBUTED || type == SINGLETON)
+        if (type == SINGLETON)
             rowCount = RelMdUtil.addEpsilon(rowCount);
 
+        if (type == BROADCAST_DISTRIBUTED)
+            rowCount = RelMdUtil.addEpsilon(RelMdUtil.addEpsilon(rowCount));

Review comment:
       broadcast distribution should be more expensive since it duplicates the row for every node




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