jinxing64 commented on a change in pull request #1454: [CALCITE-3348]
AssertionError while determining distribution of Calc
URL: https://github.com/apache/calcite/pull/1454#discussion_r324520374
##########
File path:
core/src/main/java/org/apache/calcite/rel/metadata/RelMdDistribution.java
##########
@@ -141,10 +141,17 @@ public static RelDistribution limit(RelMetadataQuery mq,
RelNode input) {
* {@link org.apache.calcite.rel.core.Calc}'s distribution. */
public static RelDistribution calc(RelMetadataQuery mq, RelNode input,
RexProgram program) {
- throw new AssertionError(); // TODO:
+ assert program.getCondition() != null ||
!program.getProjectList().isEmpty();
Review comment:
What's the assertion for ?
It seems common case that program.getCondition is null when there's no
filtering condition.
----------------------------------------------------------------
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