fx19880617 commented on a change in pull request #5653: URL: https://github.com/apache/incubator-pinot/pull/5653#discussion_r449704644
########## File path: pinot-core/src/main/java/org/apache/pinot/core/indexsegment/mutable/MutableSegmentImpl.java ########## @@ -367,11 +370,33 @@ public SegmentPartitionConfig getSegmentPartitionConfig() { } public long getMinTime() { - return _minTime; + Long minTime = extractTimeValue(_minValueMap.get(_timeColumnName)); + if (minTime != null) { + return minTime; + } + return Long.MAX_VALUE; } public long getMaxTime() { - return _maxTime; + Long maxTime = extractTimeValue(_maxValueMap.get(_timeColumnName)); + if (maxTime != null) { + return maxTime; + } + return Long.MIN_VALUE; + } + + private Long extractTimeValue(Comparable time) { + if (time != null) { + if (time instanceof Number) { + return ((Number) time).longValue(); + } else { + String stringValue = time.toString(); Review comment: This logic is only used for Kafka HLC. It assumes time field is always some epoch value. Maybe we should mark this as Deprecated? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org