[ 
https://issues.apache.org/jira/browse/CALCITE-7929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mihai Budiu resolved CALCITE-7929.
----------------------------------
    Fix Version/s: 1.43.0
       Resolution: Fixed

Fixed in 
https://github.com/apache/calcite/commit/838ec33a020f9823b95a275fee959f4b6d04dcee
Thank you for the review [~zwh]

> RelDecorrelator replaces an uncorrelated EXISTS with TRUE when the query also 
> has a correlated sub-query
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-7929
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7929
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Mihai Budiu
>            Assignee: Mihai Budiu
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.43.0
>
>
> {code:java}
> CREATE TABLE s(x INT);
> CREATE TABLE t(y INT);
> CREATE VIEW V AS SELECT x,
>   EXISTS(SELECT 1 FROM t WHERE y > 5) AS e,         -- becomes the constant 
> TRUE
>   EXISTS(SELECT 1 FROM t WHERE t.y = s.x) AS ec     -- the correlated 
> subquery starts "Decorrelate"
> FROM s; {code}



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to