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

NPE in SELECT involving subselects and windows functions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.6.1.0, 10.6.2.1, 10.7.1.1, 10.8.1.2, 10.8.2.2, 10.9.1.0
    • 10.8.3.3, 10.9.2.2, 10.10.1.1
    • SQL
    • None
    • Normal
    • Repro attached
    • Regression, Seen in production

    Description

      A user reports and I have verified an NPE on the following SELECT:

      connect 'jdbc:derby:memory:db;create=true';

      create table blah ( a int );
      insert into blah values (1), (2), (3), (4), (5), (6), (7);

      SELECT rn, (SELECT rn FROM (SELECT row_number() over() rn FROM blah ) as T2
      where T2.rn = T1.rn+1) rn2
      FROM (SELECT row_number() over() rn from blah) as T1;

      Attachments

        1. derby-5954.diff
          0.6 kB
          Dag H. Wanvik
        2. derby-5954-with-test.stat
          0.2 kB
          Dag H. Wanvik
        3. derby-5954-with-test.diff
          2 kB
          Dag H. Wanvik
        4. derby-5954-with-test-2.diff
          2 kB
          Dag H. Wanvik
        5. derby-5954-with-test-2.stat
          0.2 kB
          Dag H. Wanvik

        Issue Links

          Activity

            People

              dagw Dag H. Wanvik
              rhillegas Richard N. Hillegas
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: