Jackie-Jiang commented on code in PR #11985:
URL: https://github.com/apache/pinot/pull/11985#discussion_r1417996293


##########
pinot-spi/src/main/java/org/apache/pinot/spi/env/CommonsConfigurationUtils.java:
##########
@@ -47,100 +47,77 @@ public class CommonsConfigurationUtils {
   private CommonsConfigurationUtils() {
   }
 
-  public static void setListDelimiterHandler(PropertiesConfiguration 
configuration, Character delimiter) {
-    configuration.setListDelimiterHandler(new 
DefaultListDelimiterHandler(delimiter));
+  /**
+   * Instantiate a {@link PropertiesConfiguration} from a {@link File}.
+   * @param file containing properties
+   * @return a {@link PropertiesConfiguration} instance. Empty if file does 
not exist.
+   */
+  public static PropertiesConfiguration fromFile(File file) {
+    try {
+      return fromFile(file, false, false);
+    } catch (ConfigurationException e) {

Review Comment:
   Should we keep the checked exception to have consistent behavior for all 
methods?



##########
pinot-segment-local/src/test/java/org/apache/pinot/segment/local/segment/index/loader/SegmentPreProcessorTest.java:
##########
@@ -1898,15 +1899,19 @@ private File buildTestSegment(final TableConfig 
tableConfig, final Schema schema
   private static void removeMinMaxValuesFromMetadataFile(File indexDir) {
     PropertiesConfiguration configuration = 
SegmentMetadataUtils.getPropertiesConfiguration(indexDir);
     Iterator<String> keys = configuration.getKeys();
+    LinkedList<String> keysToClear = new LinkedList<>();

Review Comment:
   (minor)
   ```suggestion
       List<String> keysToClear = new ArrayList<>();
   ```



##########
pinot-spi/src/main/java/org/apache/pinot/spi/env/CommonsConfigurationUtils.java:
##########
@@ -317,19 +242,57 @@ public static String 
recoverSpecialCharacterInPropertyValue(String value) {
     return value.replace("\0\0", ",");
   }
 
+  /**

Review Comment:
   Do we need this? After setting the list delimiter, will `getList()` 
automatically treat `,` as list delimiter?
   If not, this is high risk change because other developer might not know they 
cannot use `getList()` to retrieve the list values



-- 
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-unsubscr...@pinot.apache.org

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

Reply via email to