RussellSpitzer commented on code in PR #11157:
URL: https://github.com/apache/iceberg/pull/11157#discussion_r1848675267
##########
spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestMigrateTableProcedure.java:
##########
@@ -273,4 +273,22 @@ public void testMigrateWithInvalidParallelism() throws
IOException {
.isInstanceOf(IllegalArgumentException.class)
.hasMessage("Parallelism should be larger than 0");
}
+
+ @TestTemplate
+ public void testMigratePartitionedWithParallelism() throws IOException {
+ assumeThat(catalogName).isEqualToIgnoringCase("spark_catalog");
+
+ String location = Files.createTempDirectory(temp,
"junit").toFile().toString();
+ sql(
+ "CREATE TABLE %s (id bigint NOT NULL, data string) USING parquet
PARTITIONED BY (id) LOCATION '%s'",
+ tableName, location);
+ sql("INSERT INTO TABLE %s (id, data) VALUES (1, 'a'), (2, 'b')",
tableName);
+ List<Object[]> result =
+ sql("CALL %s.system.migrate(table => '%s', parallelism => %d)",
catalogName, tableName, 2);
+ assertEquals("Procedure output must match", ImmutableList.of(row(2L)),
result);
+ assertEquals(
+ "Should have expected rows",
Review Comment:
Quick check do these tests fail without this patch? I just want to make sure
because I'm pretty sure we are running this code in local mode and I want to
make sure the serializers break without this patch.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]