yanlin-Lynn 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_r324566573
##########
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:
Make sure that the program is valid.
As my understanding, empty project list and null condition cannot come
together.
----------------------------------------------------------------
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