[
https://issues.apache.org/jira/browse/CALCITE-2023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224465#comment-16224465
]
Julian Hyde commented on CALCITE-2023:
--------------------------------------
You probably shouldn't have AS calls inside your RexNode expressions. AS is for
aliases, i.e. resolution by name, which is used by SqlNode but not by RexNode.
(Some RelBuilder methods accept RexNode with AS but they should strip them out.)
> Add SqlKind.AS to policy map of org.apache.calcite.plan.Strong due to NPE
> when apply FilterJoinRule
> ----------------------------------------------------------------------------------------------------
>
> Key: CALCITE-2023
> URL: https://issues.apache.org/jira/browse/CALCITE-2023
> Project: Calcite
> Issue Type: Bug
> Components: core
> Reporter: lincoln.lee
> Assignee: Julian Hyde
> Priority: Minor
>
> Encounter a NPE when apply FilterJoinRule in a [use
> case|https://issues.apache.org/jira/browse/FLINK-7942] written in flink table
> api.
> A simple way to fix this is to change the calcite class
> {code}org.apache.calcite.plan.Strong{code} add an additional entry to the
> EnumMap in createPolicyMap method: {code}map.put(SqlKind.AS,
> Policy.AS_IS);{code}
> But I'm not sure if it is the right way, or there's other root cause?
> @julianhyde could you offer some advice?
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)