]
Larry O'Leary commented on TEIID-756:
-------------------------------------
Seems that the query does produce the expected results. My guess is that my original test
source was not cooperating at the time.
Oracle Connector is not producing the correct queries when using a
LIMIT clause
-------------------------------------------------------------------------------
Key: TEIID-756
URL:
https://jira.jboss.org/jira/browse/TEIID-756
Project: Teiid
Issue Type: Bug
Components: JDBC Connector
Affects Versions: 6.0.0, 6.1.0, 6.2.0
Reporter: Larry O'Leary
Assignee: Steven Hawkins
When using a LIMIT clause in a query, the Oracle Connector rewrites it to something that
Oracle will understand. The problem is that the rewritten version of the query is not
returning the expected results.
For example:
SELECT INTKEY FROM BQT1.MEDIUMA LIMIT 50, 100
Should return 50 rows starting at row 100 but instead returns 0 rows when executed via
the Oracle Connector. Currently the above query is rewritten as:
SELECT * FROM (SELECT VIEW_FOR_LIMIT.*, ROWNUM ROWNUM_ FROM (SELECT MediumA.IntKey FROM
MediumA) VIEW_FOR_LIMIT WHERE ROWNUM <= 150) WHERE ROWNUM_ > 50
Further more, the rewritten version of the query is also projecting a column named
ROWNUM_ which would be invalid based on our query processing.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: