[teiid-issues] [JBoss JIRA] (TEIID-2458) Sybase15 subquery using HAVING clause failing

Steven Hawkins (JIRA) jira-events at lists.jboss.org
Thu Apr 4 11:14:42 EDT 2013


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

Steven Hawkins updated TEIID-2458:
----------------------------------

    Workaround Description: Use an custom translator to set supportsOnlyCorrelatedSubqueries to true, which will disable a non-correlated subquery pushdown such as this.  However similar issues may still exist with other subqueries.
                Workaround: Workaround Exists

    
> Sybase15 subquery using HAVING clause failing
> ---------------------------------------------
>
>                 Key: TEIID-2458
>                 URL: https://issues.jboss.org/browse/TEIID-2458
>             Project: Teiid
>          Issue Type: Bug
>          Components: JDBC Connector
>    Affects Versions: 7.7
>            Reporter: Van Halbert
>            Assignee: Steven Hawkins
>
> Example query is failing:  SELECT INTKEY, STRINGKEY, FLOATNUM FROM BQT1.SMALLA GROUP BY INTKEY, STRINGKEY, FLOATNUM HAVING FLOATNUM = (SELECT FLOATNUM FROM BQT1.SMALLA WHERE STRINGKEY = 20)
> When this query is submitted through EDS using Squirrel or BQT as a client it returns:
> IntKey        StringKey
> 20              20                 0
> When the resulting source-specific query generated from EDS is submitted direct to Sybase15 the same results are returned.
> SELECT g_0.IntKey, g_0.StringKey, cast(g_0.FloatNum AS real) FROM SmallA g_0 WHERE cast(g_0.FloatNum AS real) = (SELECT cast(g_1.FloatNum AS real) FROM SmallA g_1 WHERE g_1.StringKey = '20') GROUP BY g_0.IntKey, g_0.StringKey, cast(g_0.FloatNum AS real)is submitted direct to Sybase15
> RESULTS
> IntKey        StringKey
> 20              20                 0
> However, when the GROUP BY is removed from the query it returns the expected results as shown below:
> IntKey	StringKey	
> 20	   20	    -4
> The supporting VDB can be provided if needed.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the teiid-issues mailing list