This commit optimizes queries on native histograms when we only need to get the histogram count or sum value.
The approach uses an optimizer which can set a flag in the vector selector to hint to scanners that only histogram stats are needed for the query. When scanners detect this flag, they would use histogram decoders which return histogram objects with populated values for sum, count and the counter reset hint, completely dropping buckets and spans.
This commit optimizes queries on native histograms when we only need to get the histogram count or sum value.
The approach uses an optimizer which can set a flag in the vector selector to hint to scanners that only histogram stats are needed for the query. When scanners detect this flag, they would use histogram decoders which return histogram objects with populated values for sum, count and the counter reset hint, completely dropping buckets and spans.
Benchmarks