[teiid-issues] [JBoss JIRA] (TEIID-5550) DISTINCT pushed down incorrectly in some cases

Marc Shirley (Jira) issues at jboss.org
Wed Nov 21 15:41:00 EST 2018


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

Marc Shirley updated TEIID-5550:
--------------------------------
    Description: 
DISTINCT is pushing down to the wrong side of a JOIN (applies towards a different column than the user query).  Adding an ORDER BY or GROUP BY to the query results in the query engine performing the dupremoval rather than pushing it down to a source.   Should either not push the distinct down when performing federated join or push distinct down to the source that is relevant to the end user query.

Example:
SELECT DISTINCT nameValue FROM table1
Returns multiple rows as DISTINCT is pushed down (and to the source unrelated to nameValue)

SELECT DISTINCT nameValue FROM table1 GROUP BY nameValue 
SELECT DISTINCT nameValue FROM table1 ORDER BY nameValue
Returns expected results of 1 row in test

  was:
DISTINCT is pushing down to the wrong side of a JOIN (applies towards a different column than the user query).  Adding an ORDER BY or GROUP BY to the query results in the query engine performing the dupremoval rather than pushing it down to a source.   Should either not push it down when performing federated join or push down to the source relevant to the end user query.

Example:
SELECT DISTINCT nameValue FROM table1
Returns multiple rows as DISTINCT is pushed down (and to the source unrelated to nameValue)

SELECT DISTINCT nameValue FROM table1 GROUP BY nameValue 
SELECT DISTINCT nameValue FROM table1 ORDER BY nameValue
Returns expected results of 1 row in test



> DISTINCT pushed down incorrectly in some cases
> ----------------------------------------------
>
>                 Key: TEIID-5550
>                 URL: https://issues.jboss.org/browse/TEIID-5550
>             Project: Teiid
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: 8.12.15.6_4
>         Environment: JDV 6.4.5
>            Reporter: Marc Shirley
>            Assignee: Steven Hawkins
>            Priority: Major
>
> DISTINCT is pushing down to the wrong side of a JOIN (applies towards a different column than the user query).  Adding an ORDER BY or GROUP BY to the query results in the query engine performing the dupremoval rather than pushing it down to a source.   Should either not push the distinct down when performing federated join or push distinct down to the source that is relevant to the end user query.
> Example:
> SELECT DISTINCT nameValue FROM table1
> Returns multiple rows as DISTINCT is pushed down (and to the source unrelated to nameValue)
> SELECT DISTINCT nameValue FROM table1 GROUP BY nameValue 
> SELECT DISTINCT nameValue FROM table1 ORDER BY nameValue
> Returns expected results of 1 row in test



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the teiid-issues mailing list