You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/06/28 04:00:29 UTC

[GitHub] [calcite] docete commented on a change in pull request #1282: [CALCITE-3151] RexCall's Monotonicity is not considered in determinin…

docete commented on a change in pull request #1282: [CALCITE-3151] RexCall's Monotonicity is not considered in determinin…
URL: https://github.com/apache/calcite/pull/1282#discussion_r298445879
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/metadata/RelMdCollation.java
 ##########
 @@ -240,70 +241,19 @@ private RelMdCollation() {}
    * {@link org.apache.calcite.rel.core.Calc}'s collation. */
   public static List<RelCollation> calc(RelMetadataQuery mq, RelNode input,
       RexProgram program) {
-    return program.getCollations(mq.collations(input));
+    final List<RexNode> projects =
+        program
+            .getProjectList()
+            .stream()
+            .map((p) -> program.expandLocalRef(p))
+            .collect(Collectors.toList());
+    return enumrableCalc(mq, input, projects);
 
 Review comment:
   OK

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


With regards,
Apache Git Services