Skip to content

[multistage] Null Check Predicates Not Pushed Down #10381

@ankitsultana

Description

@ankitsultana

Repro:

explain plan for select count(*) from userAttributes_OFFLINE WHERE (deviceOS is null)

Execution Plan
LogicalAggregate(group=[{}], EXPR$0=[$SUM0($0)])
  LogicalExchange(distribution=[hash])
    LogicalAggregate(group=[{}], EXPR$0=[COUNT()])
      LogicalValues(tuples=[[]])
explain plan for select count(*) from userAttributes_OFFLINE WHERE (deviceOS is null or deviceOS IN ('macos'))

Execution Plan
LogicalAggregate(group=[{}], EXPR$0=[$SUM0($0)])
  LogicalExchange(distribution=[hash])
    LogicalAggregate(group=[{}], EXPR$0=[COUNT()])
      LogicalProject(deviceOS=[$5])
        LogicalFilter(condition=[=($5, 'macos')])
          LogicalTableScan(table=[[userAttributes_OFFLINE]])

cc: @walterddr : Is this because we don't create types with nullability in TypeFactory?

related to: #10148

Metadata

Metadata

Assignees

Labels

multi-stageRelated to the multi-stage query engine

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions