[
https://issues.apache.org/jira/browse/CALCITE-4592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17335059#comment-17335059
]
Julian Hyde commented on CALCITE-4592:
--------------------------------------
[~amsharma],To make this more concrete, can you add to your description an
example of the SQL that you are trying to generate? (I see [~Chunwei Lei] has
asked you to add a test case for the PR, which is related, and also an
appropriate request.)
> RelToSqlConverter#visit(Join e) does not populate correlation context
> ---------------------------------------------------------------------
>
> Key: CALCITE-4592
> URL: https://issues.apache.org/jira/browse/CALCITE-4592
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.26.0
> Reporter: Amandeep Sharma
> Priority: Major
> Labels: pull-request-available
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Correlation context is populated for the followings:
> * Project
> * Filter
> * Calc
> * Correlate
> But it is not populated for _Join._ Because of it, using joiner's correlation
> id causes below exception
> {code:java}
> Caused by:
> java.lang.NullPointerException
> at
> org.apache.calcite.rel.rel2sql.SqlImplementor$Context.toSql(SqlImplementor.java:506)
> at
> org.apache.calcite.rel.rel2sql.SqlImplementor$Context.toSql(SqlImplementor.java:828)
> at
> org.apache.calcite.rel.rel2sql.SqlImplementor$Context.toSql(SqlImplementor.java:668)
> at
> org.apache.calcite.rel.rel2sql.SqlImplementor$Context.toSql(SqlImplementor.java:828)
> at
> org.apache.calcite.rel.rel2sql.SqlImplementor$Context.toSql(SqlImplementor.java:668)
> at
> org.apache.calcite.rel.rel2sql.RelToSqlConverter.visit(RelToSqlConverter.java:213)
> ... 65 more
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)