tarun11Mavani commented on code in PR #16721:
URL: https://github.com/apache/pinot/pull/16721#discussion_r2312563980
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/virtualcolumn/VirtualColumnProviderFactory.java:
##########
@@ -58,5 +59,15 @@ public static void
addBuiltInVirtualColumnsToSegmentSchema(Schema schema, String
schema.addField(new DimensionFieldSpec(BuiltInVirtualColumn.SEGMENTNAME,
FieldSpec.DataType.STRING, true,
DefaultNullValueVirtualColumnProvider.class, segmentName));
}
+
+ if (!schema.hasColumn(BuiltInVirtualColumn.PARTITIONID)) {
+ // Try to extract partition ID from segment name, fall back to -1 as
default for offline segments
+ Integer partitionId =
SegmentUtils.getPartitionIdFromSegmentName(segmentName);
Review Comment:
Thanks for the suggestion @Jackie-Jiang
I have updated the logic to show the partition info based on the segment
metadata.
Since we don't update the partitionMap in segment metadata until the segment
is committed so I am keeping it blank for consuming segment.
Please let me know if we should show it for consuming segment as well.
--
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]