Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-3815

Oracle translator - OFFSET function does not work

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Done
    • Affects Version/s: 8.7.2.6_2
    • Fix Version/s: 9.0, 8.12.5, 8.13.6
    • Component/s: None
    • Labels:
      None

      Description

      Oracle translator translates OFFSET function as:

      SELECT c_0 FROM (SELECT VIEW_FOR_LIMIT.*, ROWNUM ROWNUM_ FROM (***Query***) VIEW_FOR_LIMIT WHERE ROWNUM <= -2147483604) WHERE ROWNUM_ > 45
      

      This always returns an empty result because of ROWNUM <= -2147483604.

      Example:
      Query:

      SELECT INTKEY FROM bqt1.smalla ORDER BY INTKEY OFFSET 45 ROWS
      

      Source-specific command:

      SELECT c_0 FROM (SELECT VIEW_FOR_LIMIT.*, ROWNUM ROWNUM_ FROM (SELECT trunc(g_0."INTKEY") AS c_0 FROM "DV"."SMALLA" g_0 ORDER BY c_0) VIEW_FOR_LIMIT WHERE ROWNUM <= -2147483604) WHERE ROWNUM_ > 45
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                shawkins Steven Hawkins
                Reporter:
                jdurani Juraj Duráni
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: