jonvex commented on code in PR #14076:
URL: https://github.com/apache/hudi/pull/14076#discussion_r2466284296


##########
hudi-utilities/src/test/java/org/apache/hudi/utilities/sources/helpers/TestMercifulJsonToRowConverterBase.java:
##########
@@ -320,10 +314,20 @@ void dateLogicalTypeTest(String groundTruthRow, Object 
dateInput) throws IOExcep
     if (groundTruthRow == null) {
       return;
     }
-    Row rec = 
RowFactory.create(java.sql.Date.valueOf(groundTruthRow).toLocalDate());
-    Row realRow = CONVERTER.convertToRow(json, schema);
+    Row rec;
+    if (isJava8ApiEnabled()) {
+      rec = 
RowFactory.create(java.sql.Date.valueOf(groundTruthRow).toLocalDate());

Review Comment:
   To clarify, this is for java<8 vs java 8. There is a spark config 
`spark.sql.datetime.java8API.enabled` for some reason the default is still 
false, even in spark 4. 
   The description is 
   ```
   If the configuration property is set to true, java.time.Instant and 
java.time.LocalDate classes of Java 8 API are used as external types for 
Catalyst's TimestampType and DateType. If it is set to false, 
java.sql.Timestamp and java.sql.Date are used for the same purpose.
   ```
   While not deprecated, java.sql.TImestamp and java.sql.Date are discouraged 
against using



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