Skip to content

Unable to correctly filter out rows with null values. #9717

Closed
@yiyuanliu

Description

What happens?

when using IS NOT NULL to filter non-null values, the output data still contains NULL.

.nullvalue NULL
create table tbl (data struct(str varchar)[]);
insert into tbl (data) values ([struct_pack(str := 'value')]), (null), (null), (null);
-- still contains NULL
select data[1].str as str from tbl where str is not null;
┌─────────┐
│   str   │
│ varchar │
├─────────┤
│ value   │
│ NULL    │
│ NULL    │
│ NULL    │
└─────────┘

To Reproduce

See above

OS:

ubuntu 2004

DuckDB Version:

v0.9.2

DuckDB Client:

cli

Full Name:

Yiyuan Liu

Affiliation:

High-Flyer AI

Have you tried this on the latest main branch?

I have tested with a main build

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • Yes, I have

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