Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-4163

Wrong SQL generated by org.apache.ignite.cache.store.jdbc.dialect.BasicJdbcDialect#loadCacheSelectRangeQuery

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7
    • 1.8
    • sql
    • None

    Description

      The SQL statement generated by org.apache.ignite.cache.store.jdbc.dialect.BasicJdbcDialect#loadCacheSelectRangeQuery looks like this:

      SELECT KEY_COLUMN_1,KEY_COLUMN_2 FROM (SELECT KEY_COLUMN_1,KEY_COLUMN_2, ROWNUM() AS rn FROM SOME_TABLE ORDER BY KEY_COLUMN_1,KEY_COLUMN_2) WHERE mod(rn, ?) = 0

      For Oracle this is incorrect, as Oracle does not have a ROWNUM() function. For the above query the following error is thrown: ORA-00923: FROM keyword not found where expected

      Regarding row numbering Oracle has:

      Please make the neccessary adjustments to either BasicJdbcDialect or OracleDialect so that a correct query is produced.

      Attachments

        Activity

          People

            kuaw26 Alexey Kuznetsov
            abotos Anghel Botos
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: