Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-292

Improve windowed aggregate return types

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8
    • Component/s: None
    • Labels:

      Description

      Optiq currently makes all windowed aggregate functions nullable, but that is invalid. In many cases they will be `NOT NULL`.

      For example:

      • `RANK() OVER w` is not nullable;
      • `FIRST_VALUE(deptno) OVER w` is nullable if and only if `deptno` is nullable;
      • `SUM OVER w` is nullable iff x is nullable or w may be empty.

      ---------------- Imported from GitHub ----------------
      Url: https://github.com/julianhyde/optiq/issues/292
      Created by: julianhyde
      Labels:
      Created at: Tue May 27 21:09:38 CEST 2014
      State: open

        Activity

        Hide
        github-import GitHub Import added a comment -

        [Date: Sun Jun 15 22:14:30 CEST 2014, Author: vlsi]

        > `FIRST_VALUE(deptno) OVER w` is nullable if and only if `deptno` is nullable;

        and window is guaranteed to be non-empty. In case of empty window, `first_value` will be `null`

        Show
        github-import GitHub Import added a comment - [Date: Sun Jun 15 22:14:30 CEST 2014, Author: vlsi ] > `FIRST_VALUE(deptno) OVER w` is nullable if and only if `deptno` is nullable; and window is guaranteed to be non-empty. In case of empty window, `first_value` will be `null`
        Hide
        github-import GitHub Import added a comment -

        [Date: Tue Jun 17 02:55:17 CEST 2014, Author: julianhyde]

        @vlsi: Agreed.

        Show
        github-import GitHub Import added a comment - [Date: Tue Jun 17 02:55:17 CEST 2014, Author: julianhyde ] @vlsi: Agreed.
        Show
        julianhyde Julian Hyde added a comment - Fixed in https://github.com/julianhyde/optiq/commit/90d0d79ec253af65c0c06323f43a90a672e0e73f .
        Hide
        julianhyde Julian Hyde added a comment -

        Close issues resolved in 0.8 release (2014-06-27).

        Show
        julianhyde Julian Hyde added a comment - Close issues resolved in 0.8 release (2014-06-27).

          People

          • Assignee:
            Unassigned
            Reporter:
            github-import GitHub Import
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development