[teiid-issues] [JBoss JIRA] (TEIID-5932) HAVING in combination with LEFT JOIN of two XMLTABLE sub-queries returns an incorrect result
Steven Hawkins (Jira)
issues at jboss.org
Mon Apr 13 22:21:51 EDT 2020
[ https://issues.redhat.com/browse/TEIID-5932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steven Hawkins updated TEIID-5932:
----------------------------------
Original Estimate: 4 hours
Remaining Estimate: 4 hours
Story Points: 0.5
Sprint: DV Sprint 62
> HAVING in combination with LEFT JOIN of two XMLTABLE sub-queries returns an incorrect result
> --------------------------------------------------------------------------------------------
>
> Key: TEIID-5932
> URL: https://issues.redhat.com/browse/TEIID-5932
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 13.1
> Reporter: Dmitrii Pogorelov
> Assignee: Steven Hawkins
> Priority: Blocker
> Fix For: 14.0, 13.0.3, 13.1.1
>
> Original Estimate: 4 hours
> Remaining Estimate: 4 hours
>
> HAVING in combination with LEFT JOIN of two XMLTABLE sub-queries returns an incorrect result if one of XMLTABLE sub-queries has INNER, LEFT or CROSS JOIN instead of a lateral one and amount of rows in the source is equal or more than 1024. For example, the query:
> {code:sql}
> SELECT
> xt.event_id
> FROM test_dwh_pg.test_having AS d
> --here
> INNER JOIN XMLTABLE(
> '/root'
> PASSING JSONTOXML('root', d.str)
> COLUMNS
> event_id string PATH 'eventid'
> ) xt
> ON TRUE
> LEFT JOIN XMLTABLE(
> '/anything'
> PASSING JSONTOXML('anything', d.str)
> COLUMNS
> some_col string PATH 'anything'
> ) xt2
> ON xt.event_id = 'xxx'
> GROUP BY event_id
> HAVING COUNT(*) > 1 ;;
> {code}
> will return a result but it should return no results as there are no duplicates in test data.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the teiid-issues
mailing list