You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Physical planning is slow for wide struct columns because null struct scalars allocate every child #27557
Is your feature request related to a problem or challenge?
Planning builds an unbounded range for every column an expression refers to, through Interval::make_unbounded → ScalarValue::try_new_null. For a struct, this allocates a null child array for every field. Optimizer passes rebuild projections and filters many times, so the work repeats. In our workload, a query over three structs of about 5,000 fields each spends hundreds of milliseconds in physical planning on this.
#26879 reuses a column's range within one projection, but not across rebuilds.
Describe the solution you'd like
A null struct row never reads its children, so children of equal type can share one null array. The result is equal to what new_null_array builds, but takes a few allocations instead of one per field.
Describe alternatives you've considered
Caching null values across calls: this adds state and keeps the arrays alive.
Activity