Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6690

ROW_NUMBER should not be allowed in generation clause

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.10.2.0
    • Fix Version/s: 10.10.2.1, 10.11.1.1, 10.12.1.1
    • Component/s: SQL
    • Labels:
      None
    • Issue & fix info:
      Repro attached

      Description

      The generation clause is allowed to have a call to the ROW_NUMBER function. But it fails when a new row is inserted. It should be disallowed in CREATE TABLE and ALTER TABLE ADD COLUMN.

      ij> create table t (x int generated always as (row_number() over ()));
      0 rows inserted/updated/deleted
      ij> insert into t values default;
      ERROR XJ001: Java exception: 'ASSERT FAILED cannot get interface without operand: org.apache.derby.shared.common.sanity.AssertFailure'.
      

        Attachments

        1. derby-6690.diff
          3 kB
          Dag H. Wanvik

          Issue Links

            Activity

              People

              • Assignee:
                dagw Dag H. Wanvik
                Reporter:
                knutanders Knut Anders Hatlen
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: