emilie-wang commented on code in PR #526:
URL: https://github.com/apache/incubator-xtable/pull/526#discussion_r1737479193


##########
xtable-core/src/main/java/org/apache/xtable/delta/DeltaValueConverter.java:
##########
@@ -194,9 +194,35 @@ public static Object convertFromDeltaPartitionValue(
 
   private static Object castObjectToInternalType(Object value, InternalType 
valueType) {
     switch (valueType) {
+      case DOUBLE:
+        if (value instanceof String)
+          switch (value.toString()) {
+            case "NaN":

Review Comment:
   After searching there was no constants defined in Delta and will define them 
internally. 
   How about defining them inside DeltaValueConverter class like
   ```
   public class DeltaValueConverter {
     private static final String DATE_FORMAT_STR = "yyyy-MM-dd HH:mm:ss";
     private static final TimeZone TIME_ZONE = TimeZone.getTimeZone("UTC");
     protected static final String NAN_VALUE = "NaN";
     protected static final String INFINITY_VALUE = "Infinity";
   ...
   ```
   
     



##########
xtable-core/src/test/java/org/apache/xtable/delta/TestDeltaValueConverter.java:
##########
@@ -82,6 +82,15 @@ void parseWrongDateTime() throws ParseException {
     assertThrows(ParseException.class, () -> 
strictDateFormat.parse(wrongDateTime));
   }
 
+  @ParameterizedTest
+  @MethodSource("nonNumericValuesForColStats")
+  public void formattedDifferentNonNumericValuesFromDeltaColumnStat(

Review Comment:
   For info, I use `public` by following these tests: 
https://github.com/apache/incubator-xtable/blob/main/xtable-core/src/test/java/org/apache/xtable/delta/TestDeltaValueConverter.java#L44
   but happy to remove all of them



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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to