singhpk234 commented on code in PR #6190:
URL: https://github.com/apache/iceberg/pull/6190#discussion_r1022262621


##########
spark/v3.1/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestRewriteManifestsProcedure.java:
##########
@@ -73,6 +78,93 @@ public void testRewriteLargeManifests() {
         "Must have 4 manifests", 4, 
table.currentSnapshot().allManifests(table.io()).size());
   }
 
+  @Test
+  public void 
testRewriteLargeManifestsOnDatePartitionedTableWithJava8APIEnabled() {
+    sql(
+        "CREATE TABLE %s (id INTEGER, name STRING, dept STRING, ts DATE) USING 
iceberg PARTITIONED BY (ts)",
+        tableName);
+    try {
+      spark
+          .createDataFrame(
+              ImmutableList.of(
+                  RowFactory.create(1, "John Doe", "hr", 
Date.valueOf("2021-01-01")),
+                  RowFactory.create(2, "Jane Doe", "hr", 
Date.valueOf("2021-01-02")),
+                  RowFactory.create(3, "Matt Doe", "hr", 
Date.valueOf("2021-01-03")),
+                  RowFactory.create(4, "Will Doe", "facilities", 
Date.valueOf("2021-01-04"))),
+              spark.table(tableName).schema())
+          .writeTo(tableName)
+          .append();
+    } catch (NoSuchTableException e) {
+      // not possible as we already created the table above.
+      throw new RuntimeException(e);
+    }

Review Comment:
   move this outside of the `spark.sql.datetime.java8API.enabled` as dataframe 
write was failing it was expecting the LocalDate obj rather than Date obj. 
   
   Note this was not an issue an issue for 3.3 & 3.2 seems like something broke 
between 3.1 and 3.2



-- 
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: issues-unsubscr...@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to