]
Steven Hawkins resolved TEIID-5783.
-----------------------------------
Fix Version/s: 12.2.2
12.3
12.1.2
Resolution: Done
Thanks for raising this. I've added a check for null dependent expressions in the
staged grouping symbols - they cannot be pushed to the inner side of an outer join as
further null values may be introduced by the join.
OUTER JOIN yields wrong results when used with GROUP BY, CASE and
COUNT DISTINCT
--------------------------------------------------------------------------------
Key: TEIID-5783
URL:
https://issues.jboss.org/browse/TEIID-5783
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 12.0
Environment: teiid-12.0.0 on WildFly Full 14.0.1.Final (WildFly Core
6.0.2.Final)
Reporter: Dmitrii Pogorelov
Assignee: Steven Hawkins
Priority: Blocker
Fix For: 12.2.2, 12.3, 12.1.2
Attachments: test1.csv, test2.csv
Some queries that involve an OUTER JOIN between objects from different data sources, a
GROUP BY with a CASE statement and a COUNT DISTINCT yield inconsistent results on a SELECT
expression which is identical to the GROUP BY expression with CASE.
* Reproduced in combination of <File> LEFT JOIN <MySQL> and <File> LEFT
JOIN <MS SQL> and the same for the other OUTER JOIN variants.
* screenshot for the different queries are attached
* sample data for reproduction is attached
The same problem happens with LEFT OUTER JOIN, RIGHT OUTER JOIN and FULL OUTER JOIN.