You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "gianm (via GitHub)" <gi...@apache.org> on 2026/10/09 08:17:16 UTC
[PR] fix: Better capability handling in cluster groups and projections. (druid)
gianm opened a new pull request, #20541:
URL: https://github.com/apache/druid/pull/20541
Addresses four problems:
1) Provide PhysicalSegmentColumnInspector from PartialQueryableIndexSegment.
Previously it was not provided, so segmentMetadata queries were not
able to report types.
2) Look at all cluster groups when determining capabilities, not just
the first one. (They can differ in the details, like auto-determined
type and hasMultipleValues.)
3) Use the DimensionIndexer's ColumnFormat when writing columns in
cluster groups and projections. Previously the ColumnFormat present
at creation time was used, which could differ in details (such as
hasMultipleValues). This caused multi-valued columns to be
incorrectly persisted, in situations where the persist logic did
not realize they were multi-value.
4) Updates Capable.or and Capable.and to use correct 3-valued logic.
This made certain new code simpler to write, and as far as I can
tell, will only have positive effects on existing callers.
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] fix: Better capability handling for v10 segments and projections. (druid)
Posted by "gianm (via GitHub)" <gi...@apache.org>.
gianm merged PR #20541:
URL: https://github.com/apache/druid/pull/20541
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] fix: Better capability handling for v10 segments and projections. (druid)
Posted by "FrankChen021 (via GitHub)" <gi...@apache.org>.
FrankChen021 commented on code in PR #20541:
URL: https://github.com/apache/druid/pull/20541#discussion_r4229988527
##########
processing/src/main/java/org/apache/druid/segment/PartialQueryableIndexSegment.java:
##########
@@ -98,8 +96,16 @@ public <T> T as(@Nonnull Class<T> clazz)
return (T) index;
} else if (TimeBoundaryInspector.class.equals(clazz)) {
return (T) timeBoundaryInspector;
- } else if (RowCountInspector.class.equals(clazz)) {
- return (T) rowCountInspector;
+ } else if (RowCountInspector.class.equals(clazz)
+ || PhysicalSegmentColumnInspector.class.equals(clazz)
+ || PhysicalSegmentInspector.class.equals(clazz)) {
+ if (index.isFullyDownloaded()) {
+ // If fully downloaded, we can return some additional information.
+ return (T) new QueryableIndexPhysicalSegmentInspector(index);
Review Comment:
[P2] Use resident column capabilities for the full-download inspector
**Finding:** For a non-clustered V10 segment with a string dimension configured with `createBitmapIndex=false`, this full-download branch still reports `isDictionaryEncoded=false`: `QueryableIndexPhysicalSegmentInspector.getColumnCapabilities` delegates to `PartialQueryableIndex.getColumnCapabilities`, which always builds descriptor-only capabilities. `SegmentAnalyzer` finds the resident column holder, but its string-analysis path has no `DictionaryEncodedStringValueIndex` without bitmaps and only falls back to the column dictionary when these capabilities report dictionary encoding. Consequently a segment metadata query requesting CARDINALITY or MINMAX returns cardinality 0 and null bounds for a populated dimension even after every file has been downloaded. The added analysis test uses a bitmap-indexed dimension, so it does not exercise this path.
**Suggestion:** Have the fully downloaded inspector obtain non-clustered column capabilities from the resident holders, and cover string metadata analysis with bitmap indexes disabled.
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org