[teiid-issues] [JBoss JIRA] Commented: (TEIID-1616) ORDER BY not ordering query results on Teradata query: SELECT DoubleNum AS E FROM VQT.U5 ORDER BY E

Ramesh Reddy (JIRA) jira-events at lists.jboss.org
Fri Jun 3 17:52:59 EDT 2011


    [ https://issues.jboss.org/browse/TEIID-1616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12606443#comment-12606443 ] 

Ramesh Reddy commented on TEIID-1616:
-------------------------------------

When the source query is formed like this

SELECT v_0.c_1 AS c_0 FROM (SELECT g_1.INTNUM AS c_0, cast(g_1.DOUBLENUM
AS double precision) AS c_1, 'SmallA' AS c_2 FROM smalla AS g_1 UNION
SELECT g_0.INTNUM AS c_0, cast(g_0.DOUBLENUM AS double precision) AS
c_1, 'SmallB' AS c_2 FROM smallb AS g_0) AS v_0 ORDER BY c_0

Since the alias on outer query uses same aliases as the inner query (with different data types) Teradata gets confused and does not sort it correctly. One option mentioned by Steve is to turn off the "in-line" view support, however that is one of critical capability that is sought after by a user. Is there any way Teradata translator can re-write the aliases with unique names?

> ORDER BY not ordering query results  on Teradata query:  SELECT DoubleNum AS E FROM VQT.U5 ORDER BY E 
> ------------------------------------------------------------------------------------------------------
>
>                 Key: TEIID-1616
>                 URL: https://issues.jboss.org/browse/TEIID-1616
>             Project: Teiid
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: 7.4
>            Reporter: Warren Gibson
>            Assignee: Steven Hawkins
>             Fix For: 7.4.1
>
>
> ORDER BY is not ordering the query results for the following Teradata query:  SELECT DoubleNum AS E FROM VQT.U5 ORDER BY E

--
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