cecemei opened a new pull request, #19847:
URL: https://github.com/apache/druid/pull/19847

   ## Summary
   - Adds `SegmentMetadataQuery.AnalysisType.CONTAINERSIZE`, which reports each 
V10 segment file container's owning bundle name and on-disk byte size via 
`SegmentAnalysis.getContainers()`.
   - Only populated for segments written in the V10 file format; pre-V10 
segments report `null`, consistent with how other analysis types (e.g. 
`ROLLUP`, `TIMESTAMPSPEC`) handle segments that predate them.
   - `QueryableIndex.getFileContainers()` (default `null`) sources this from 
`SegmentFileMapper.getSegmentFileMetadata()`, implemented by 
`SimpleQueryableIndex`/`PartialQueryableIndex`; `SmooshedFileMapper` (legacy) 
explicitly returns `null` since it has no container/bundle structure.
   - Merging sums sizes by bundle name rather than concatenating raw 
per-segment container lists, since a container has no identity across segments; 
single-sided merges pass the non-null side through unchanged.
   - `SegmentAnalysis.ContainerAnalysis` is nested (not top-level) since it has 
no identity outside that one field, and `SegmentAnalysis.Builder` gained bulk 
setters so production call sites don't need the raw constructor.
   
   ## Test plan
   - [x] `SegmentMetadataQueryContainerSizeTest` builds a real V10-format 
segment with a projection and verifies `CONTAINERSIZE` reports correct bundle 
names/sizes, and that containers are `null` when not requested.
   - [x] `SegmentMetadataQueryQueryToolChestTest` covers merge-by-bundle 
behavior (summing, one-sided, both-null).
   - [x] Existing `SegmentAnalysis`/`SegmentMetadataQuery` test suites pass 
unchanged after the `Builder` migration.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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