Is your feature request related to a problem or challenge?
Whether dictionary-encoding a column helps depends not just on its cardinality but on how heavily it's aggregated in the query. There's no existing signal that combines both.
Describe the solution you'd like
Derive metadata that combines NDV with an estimate of aggregation "heaviness" for a given query plan. Heavy aggregation + low NDV = more room for error/benefit if we decide to cast to dictionary arrays early; this signal should be usable by the optimizer.
Describe alternatives you've considered
No response
Additional context
sub-issue of : #22891
part of epic : #24111
Is your feature request related to a problem or challenge?
Whether dictionary-encoding a column helps depends not just on its cardinality but on how heavily it's aggregated in the query. There's no existing signal that combines both.
Describe the solution you'd like
Derive metadata that combines NDV with an estimate of aggregation "heaviness" for a given query plan. Heavy aggregation + low NDV = more room for error/benefit if we decide to cast to dictionary arrays early; this signal should be usable by the optimizer.
Describe alternatives you've considered
No response
Additional context
sub-issue of : #22891
part of epic : #24111