[teiid-issues] [JBoss JIRA] (TEIID-3123) Exception when using dense_rank() in Teiid Development

Steven Hawkins (JIRA) issues at jboss.org
Thu Sep 11 15:50:19 EDT 2014


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

Steven Hawkins commented on TEIID-3123:
---------------------------------------

Rule raise null is projecting nulls upwards into the plan without ensuring that the plan is correct.  We should be able to just use a different order by key instead.

> Exception when using dense_rank() in Teiid Development
> ------------------------------------------------------
>
>                 Key: TEIID-3123
>                 URL: https://issues.jboss.org/browse/TEIID-3123
>             Project: Teiid
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: 8.8
>            Reporter: Joseph CHIDIAC
>            Assignee: Steven Hawkins
>             Fix For: 8.8, 8.9, 9.x
>
>
> SELECT DISTINCT
>        subQueryTable.jiraissue_ASSIGNEE AS jiraissue_ASSIGNEE,
>         dense_rank() over(order by subQueryTable.jiraissue_ID DESC) as CalculatedField1
>   FROM  jiraissue
>        LEFT OUTER JOIN
>           (SELECT jiraissue_sub.ASSIGNEE AS jiraissue_ASSIGNEE,
>                   COUNT(IFNULL(jiraissue_sub.ID, -2147483648))
>                      AS jiraissue_ID
>              FROM jiraissue jiraissue_sub
>             WHERE ((jiraissue_sub.RESOLUTIONDATE BETWEEN NULL
>                                                      AND PARSETIMESTAMP(
>                                                             '2014-09-10 18:46:28',
>                                                             'yyyy-MM-dd HH:mm:ss')))
>            GROUP BY jiraissue_sub.ASSIGNEE) subQueryTable
>        ON jiraissue.ASSIGNEE =
>              subQueryTable.jiraissue_ASSIGNEE
>  
> The query sent to the JDBC :
>                          SELECT DISTINCT DENSE_RANK() OVER (ORDER BY NULL DESC) FROM "JIRADB"."dbo"."jiraissue" g_0
>  
> and i got  this error :
>  
> java.sql.SQLException: Windowed functions do not support constants as ORDER BY clause expressions.



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)


More information about the teiid-issues mailing list