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

ROW_NUMBER should not be allowed in generation clause

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.10.2.0
    • 10.10.2.1, 10.11.1.1, 10.12.1.1
    • SQL
    • None
    • 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

              dagw Dag H. Wanvik
              knutanders Knut Anders Hatlen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: