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 2021/05/12 06:48:02 UTC

[GitHub] [ignite] alex-plekhanov commented on a change in pull request #9085: IGNITE-14542 Table functions, system_range() function

alex-plekhanov commented on a change in pull request #9085:
URL: https://github.com/apache/ignite/pull/9085#discussion_r630768380



##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/trait/CorrelationTrait.java
##########
@@ -92,7 +92,12 @@ public boolean correlated() {
         if (trait == this || this == UNCORRELATED)
             return true;
 
-        return equals(trait);
+        if (!(trait instanceof CorrelationTrait))
+            return false;
+
+        CorrelationTrait other = (CorrelationTrait) trait;
+
+        return other.correlated() && other.correlationIds().containsAll(correlationIds());

Review comment:
       > After this change fromTrait correlated by cor1 will satisfy to toTrait correlated by (cor1,cor2), but this doesn't seem legit.
   
   But what's wrong with this statement? I think it's correct. Correlated trait, as far as I understand, means `depends on variable`, so if some node depends on `cor1` and we have a requirement with a dependency for `cor1` and `cor2`, then this node satisfies this requirement (no extra dependency needed). Currently, there are no tests for this case, but I think it can be reproduced with 2 nested `exists` subqueries. 




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