Jackie-Jiang commented on code in PR #9413:
URL: https://github.com/apache/pinot/pull/9413#discussion_r973274073
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/util/ZKMetadataUtils.java:
##########
@@ -56,6 +60,32 @@ public static void refreshSegmentZKMetadata(String
tableNameWithType, SegmentZKM
segmentSizeInBytes, false);
}
+ public static void updateSegmentZKMetadataInterval(TableConfig tableConfig,
SegmentZKMetadata segmentZKMetadata,
+ Schema oldSchema, Schema newSchema) {
+ String timeColumnName =
tableConfig.getValidationConfig().getTimeColumnName();
+ if (StringUtils.isNotEmpty(timeColumnName)) {
+ DateTimeFieldSpec currentDateTimeFieldSpec =
oldSchema.getDateTimeSpec(timeColumnName);
+ DateTimeFieldSpec newDateTimeFieldSpec =
newSchema.getDateTimeSpec(timeColumnName);
+
+ long startTime = segmentZKMetadata.getStartTimeMs();
Review Comment:
Currently we store the converted start/end time in the ZK metadata (always
EPOCH). We should also store the raw min/max time in the ZK metadata, and use
them and the schema to re-generate the start/end time.
When the raw min/max time value doesn't comply with the time format, or
converted start/end time is not in the right range, we can put `null` as
start/end time, and make the caller able to handle it (e.g. skip the segment
for time management purpose)
--
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]