-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Recently, the CAR team added a "fixed buckets" bit to the catalog. Unfortunately, the current definition from the catalog perspective is simply "whether the time-series bucket scheme has changed since the collection was created." On the query team, though, we use "fixed buckets" to mean something narrower: the bucketing scheme has not changed, the bucket rounding equals the maximum bucket span, and there is no extended-range data. In practice, this means we can rely on the invariant that buckets do not cross the alignment defined by the rounding.
When buckets are aligned, we can apply several optimizations. For example, we can omit per-document residual filters, and in some cases we can compute $group stages entirely from bucket metadata, without unpacking any documents.
Because catalog terminology is harder to change than query-layer code, we should rename these to "aligned bucket optimizations." That name is clearer than the old one and avoids confusion with the catalog bit, which now refers only to whether the bucketing scheme has changed.