rubenada 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_r298148448
##########
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:
Wouldn't it be easier to leave the project method unchanged, and here just
return:
`return project(mq, input, projects);`
?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services