You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Stamatis Zampetakis (Jira)" <ji...@apache.org> on 2019/11/14 07:05:00 UTC
[jira] [Commented] (CALCITE-3503) NPE at VolcanoPlanner#isValid
when DEBUG is enabled
[ https://issues.apache.org/jira/browse/CALCITE-3503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16973963#comment-16973963 ]
Stamatis Zampetakis commented on CALCITE-3503:
----------------------------------------------
Below is the analysis of [~vlsi] from the discussion in CALCITE-2018.
Explanation: VolcanoPlanner.setRoot is called. That is "root" is still null
setRoot(VolcanoPlanner.java:298) is
{code:java}
this.root = registerImpl(rel, null);
{code}
...
then, at the end of ensureRegistered there's
{code:java}
if (LOGGER.isDebugEnabled()) {
assert isValid(Litmus.THROW); // this gets executed before this.root was ever executed
}
{code}
then it fails with NPE since planner.root is still {{null.}}
> 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
> Fix For: 1.22.0
>
>
> 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)