Jackie-Jiang opened a new pull request, #19318:
URL: https://github.com/apache/pinot/pull/19318

   ## Summary
   
   Follow-up to #19317. When every metric is serialized with a fixed size 
(aggregated value type `LONG` or `DOUBLE`, e.g. `COUNT` / `SUM` / `MIN` / `MAX` 
configs), the star-tree record size is constant, so the record start offsets 
can be computed arithmetically instead of being stored:
   - `RecordOffsets` becomes a small interface with two implementations, picked 
once per build from the aggregated value types.
   - `FixedSizeRecordOffsets` tracks only the record size and the record count 
— no per-record storage at all, and `getStartOffset` is a single multiply.
   - `VariableSizeRecordOffsets` keeps the compact int/long list from #19317 
for configs with variable-size (`BYTES`) metrics.
   
   The selection intentionally does not rely on 
`ValueAggregator.isAggregatedValueFixedSize()`: that contract gates ingestion 
aggregation and does not guarantee every serialization produces exactly the 
same length (e.g. 
`DistinctCountHLLValueAggregator#getMaxAggregatedValueByteSize` depends on the 
values seen). Restricting the fixed-size path to `LONG` / `DOUBLE` metrics 
keeps the invariant local to `serializeStarTreeRecord`, which always writes 
exactly 8 bytes for these types without a length prefix.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to