Skip to content

Fix columns with null values in windowing expressions#15131

Merged
rohangarg merged 11 commits into
apache:masterfrom
kgyrtkirk:windowing-fixes-turned-to-null
Oct 13, 2023
Merged

Fix columns with null values in windowing expressions#15131
rohangarg merged 11 commits into
apache:masterfrom
kgyrtkirk:windowing-fixes-turned-to-null

Conversation

@kgyrtkirk

Copy link
Copy Markdown
Member

In case windowed expressions - plain columns which contain null values show default values - even when NullHandling#sqlCompatible() is true

   SELECT
     l2,
     MIN(l2) OVER()
   FROM druid.numfoo
   WHERE l2 is null or l2 = -1111

returns

0,null

instead of the expected:

null,null

The issue was with ColumnAccessor#getObject implementations; for which the apidoc stated that when isNull returns true it should return null

@kgyrtkirk
kgyrtkirk marked this pull request as ready for review October 13, 2023 05:04

@rohangarg rohangarg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rohangarg
rohangarg merged commit 6d62c75 into apache:master Oct 13, 2023
ektravel pushed a commit to ektravel/druid that referenced this pull request Oct 16, 2023
@abhishekagarwal87 abhishekagarwal87 added this to the 28.0 milestone Oct 19, 2023
LakshSingla pushed a commit to LakshSingla/druid that referenced this pull request Oct 19, 2023
cryptoe pushed a commit that referenced this pull request Oct 19, 2023
)

* Fix columns with null values in windowing expressions (#15131)

* Trigger Build

---------

Co-authored-by: Zoltan Haindrich <[email protected]>
CaseyPan pushed a commit to CaseyPan/druid that referenced this pull request Nov 17, 2023
riovic918data pushed a commit to riovic918data/druid that referenced this pull request Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants