[
https://issues.jboss.org/browse/TEIID-3123?page=com.atlassian.jira.plugin...
]
Steven Hawkins commented on TEIID-3123:
---------------------------------------
Actually this is more of a SQL Server limitation as the same sql works fine when processed
in Teiid, Oracle, etc. With rank/dense_rank we can replace the whole window function with
constant, but that won't work for row_number, so we'll at least need additional
SQL Server translator logic.
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)