yihua commented on code in PR #11943:
URL: https://github.com/apache/hudi/pull/11943#discussion_r1798525670


##########
hudi-common/src/main/java/org/apache/hudi/common/config/HoodieConfig.java:
##########
@@ -149,6 +153,11 @@ public <T> String getString(ConfigProperty<T> 
configProperty) {
     return rawValue.map(Object::toString).orElse(null);
   }
 
+  public <T> Option<String> getStringOpt(ConfigProperty<T> configProperty) {
+    Option<Object> rawValue = getRawValue(configProperty);
+    return rawValue.map(Object::toString);
+  }

Review Comment:
   Could `getString` be reused?



##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/table/TestHoodieMergeOnReadTable.java:
##########
@@ -317,6 +318,7 @@ public void testLogFileCountsAfterCompaction() throws 
Exception {
     }
   }
 
+  @Disabled

Review Comment:
   Is anything broken here?



##########
hudi-common/src/main/java/org/apache/hudi/common/model/DefaultHoodieRecordPayload.java:
##########
@@ -190,7 +190,8 @@ protected boolean needUpdatingPersistedRecord(IndexedRecord 
currentValue,
     Comparable incomingOrderingVal = (Comparable) 
HoodieAvroUtils.getNestedFieldVal((GenericRecord) incomingRecord,
         orderField,
         true, consistentLogicalTimestampEnabled);
-    return persistedOrderingVal == null || ((Comparable) 
persistedOrderingVal).compareTo(incomingOrderingVal) <= 0;
+    return persistedOrderingVal == null || ((persistedOrderingVal instanceof 
String || incomingOrderingVal instanceof String)
+        ? ((Comparable) 
persistedOrderingVal.toString()).compareTo(incomingOrderingVal.toString()) <= 0
+        : ((Comparable) persistedOrderingVal).compareTo(incomingOrderingVal) 
<= 0);

Review Comment:
   Why is this change needed?



##########
hudi-common/src/main/java/org/apache/hudi/common/config/HoodieStorageConfig.java:
##########
@@ -90,6 +94,7 @@ public class HoodieStorageConfig extends HoodieConfig {
   public static final ConfigProperty<String> LOGFILE_DATA_BLOCK_FORMAT = 
ConfigProperty
       .key("hoodie.logfile.data.block.format")
       .noDefaultValue()
+      .withValidValues(AVRO_DATA_BLOCK.getId().toUpperCase(), 
HFILE_DATA_BLOCK.getId().toUpperCase(), 
PARQUET_DATA_BLOCK.getId().toUpperCase())

Review Comment:
   Can these make smaller case config values unacceptable?



-- 
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]

Reply via email to