Jackie-Jiang commented on code in PR #11218:
URL: https://github.com/apache/pinot/pull/11218#discussion_r1278375741
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/creator/impl/SegmentColumnarIndexCreator.java:
##########
@@ -571,8 +572,19 @@ public static void
addColumnMetadataInfo(PropertiesConfiguration properties, Str
public static void addColumnMinMaxValueInfo(PropertiesConfiguration
properties, String column, String minValue,
String maxValue, DataType dataType) {
- properties.setProperty(getKeyFor(column, MIN_VALUE),
getValidPropertyValue(minValue, false, dataType));
- properties.setProperty(getKeyFor(column, MAX_VALUE),
getValidPropertyValue(maxValue, true, dataType));
+ String validMinValue = getValidPropertyValue(minValue, false, dataType);
+ properties.setProperty(getKeyFor(column, MIN_VALUE), validMinValue);
+ // setting the property for signifying that the min value is escaped.
+ if (validMinValue.compareTo(minValue) != 0) {
Review Comment:
We want to compare value within the `getValidPropertyValue` because even the
value is changed, it might not be escaped (e.g. only truncated). Also we can
use `equals()` instead of `compareTo()` which is cheaper
--
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]