Skip to content

Windowed min aggregates null-s as 0 #15370

@kgyrtkirk

Description

@kgyrtkirk
  SELECT *,MILLIS_TO_TIMESTAMP(subQry.w_min) > '1920-05-19'
    FROM
    ( SELECT l2,l1,MIN(l1) OVER W as w_min
      FROM numfoo where l1 is null or dim1 = 'nonexistent'
          WINDOW W AS ( PARTITION BY l1 ORDER BY l1 ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW )
    ) subQry
  WHERE MILLIS_TO_TIMESTAMP(subQry.w_min) > '1920-05-14'

resultset

  - [null,null,0,true]
  - [null,null,0,true]

which means that the min of 2 rows with null values were evaluated to 0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions