[
https://issues.apache.org/jira/browse/CALCITE-3503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16975940#comment-16975940
]
Stamatis Zampetakis commented on CALCITE-3503:
----------------------------------------------
Thanks [~xndai] and [~hyuan] for your quick reaction. I've seen in the PR that
there is some disagreement regarding the fix by [~danny0405] and [~rubenql].
Adding the nullability check skips some validation steps. I've checked the code
before and it seems that it was performing the validation even if the root was
null. There seems to be other ways to obtain a metadata query without
triggering the exception and without skipping validation of the state of the
planner when the root is null. In order not to spend more time on it, I suggest
to apply a fix in this direction.
> NPE at VolcanoPlanner#isValid when DEBUG is enabled
> ---------------------------------------------------
>
> Key: CALCITE-3503
> URL: https://issues.apache.org/jira/browse/CALCITE-3503
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.21.0
> Reporter: Stamatis Zampetakis
> Priority: Blocker
> Labels: pull-request-available
> Fix For: 1.22.0
>
> Time Spent: 2h 50m
> Remaining Estimate: 0h
>
> The stacktrace is the following:
> {noformat}
> java.lang.NullPointerException
> at
> org.apache.calcite.plan.volcano.VolcanoPlanner.isValid(VolcanoPlanner.java:880)
> at
> org.apache.calcite.plan.volcano.VolcanoPlanner.ensureRegistered(VolcanoPlanner.java:870)
> at
> org.apache.calcite.plan.volcano.VolcanoPlanner.ensureRegistered(VolcanoPlanner.java:92)
> at
> org.apache.calcite.rel.AbstractRelNode.onRegister(AbstractRelNode.java:321)
> at
> org.apache.calcite.plan.volcano.VolcanoPlanner.registerImpl(VolcanoPlanner.java:1701)
> at
> org.apache.calcite.plan.volcano.VolcanoPlanner.setRoot(VolcanoPlanner.java:298)
> at
> org.apache.calcite.tools.Programs.lambda$standard$3(Programs.java:269)
> {noformat}
> According to [~volodymyr] this is a regression caused by CALCITE-3487.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)