[
https://issues.apache.org/jira/browse/CALCITE-7825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
DongShengHe updated CALCITE-7825:
---------------------------------
Description:
This issue follows up on [vlsi's review
|https://github.com/apache/calcite/pull/5288#pullrequestreview-5313617214] and
[zzwqqq’s follow-up
comment|https://github.com/apache/calcite/pull/5288#issuecomment-5842156858] on
[PR 5288|https://github.com/apache/calcite/pull/5288].
RelMdTableReferences does not inspect RexSubQuery expressions in Project,
Filter, Join, or Calc. With expand=false, for example:
{code:java}
SELECT (SELECT MAX(sal) FROM emp) FROM dept
SELECT * FROM dept WHERE deptno IN (SELECT deptno FROM emp)
{code}
Both report only DEPT, omitting EMP.
RelMdTableReferences also has no Correlate handler. When a sub-query is
rewritten into a Correlate, getTableReferences returns null.
was:
This issue follows up on the review discussion in [PR
5288|https://github.com/apache/calcite/pull/5288]
RelMdTableReferences does not inspect RexSubQuery expressions in Project,
Filter, Join, or Calc. With expand=false, for example:
{code:java}
SELECT (SELECT MAX(sal) FROM emp) FROM dept
SELECT * FROM dept WHERE deptno IN (SELECT deptno FROM emp)
{code}
Both report only DEPT, omitting EMP.
RelMdTableReferences also has no Correlate handler. When a sub-query is
rewritten into a Correlate, getTableReferences returns null.
> RelMdTableReferences does not account for tables in RexSubQuery expressions
> or Correlate
> ----------------------------------------------------------------------------------------
>
> Key: CALCITE-7825
> URL: https://issues.apache.org/jira/browse/CALCITE-7825
> Project: Calcite
> Issue Type: Bug
> Reporter: DongShengHe
> Priority: Minor
>
> This issue follows up on [vlsi's review
> |https://github.com/apache/calcite/pull/5288#pullrequestreview-5313617214]
> and [zzwqqq’s follow-up
> comment|https://github.com/apache/calcite/pull/5288#issuecomment-5842156858]
> on [PR 5288|https://github.com/apache/calcite/pull/5288].
> RelMdTableReferences does not inspect RexSubQuery expressions in Project,
> Filter, Join, or Calc. With expand=false, for example:
> {code:java}
> SELECT (SELECT MAX(sal) FROM emp) FROM dept
> SELECT * FROM dept WHERE deptno IN (SELECT deptno FROM emp)
> {code}
> Both report only DEPT, omitting EMP.
> RelMdTableReferences also has no Correlate handler. When a sub-query is
> rewritten into a Correlate, getTableReferences returns null.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)