[teiid-issues] [JBoss JIRA] Resolved: (TEIID-1617) Incorrect rewrite of subquery

Steven Hawkins (JIRA) jira-events at lists.jboss.org
Tue May 31 21:05:00 EDT 2011


     [ https://issues.jboss.org/browse/TEIID-1617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steven Hawkins resolved TEIID-1617.
-----------------------------------

    Resolution: Done


The rewriter was considering a potential optimization to remove an unneeded distinct too early.  It's best to not perform the check at all and maintain correctness.

> Incorrect rewrite of subquery
> -----------------------------
>
>                 Key: TEIID-1617
>                 URL: https://issues.jboss.org/browse/TEIID-1617
>             Project: Teiid
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: 7.4
>            Reporter: Steven Hawkins
>            Assignee: Steven Hawkins
>            Priority: Critical
>             Fix For: 7.4.1
>
>
> when performing a semi-join against a query with a key preserved in the semi join criteria and a non-distinct subquery the planner will incorrectly created an unnested query that does not preserve the semi-join.  This can happen with either the explicit mj hint or with the query unnesting property set.
> e.g.
> select col2 from tbl where keyCol IN (select dupCol from tbl2)
> will become
> select col2 from tbl, tbl2 where keyCol = tbl2
> rather than
> select col2 from tbl, (select distinct dupCol from tbl2) x where keyCol = tbl2

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the teiid-issues mailing list