alexeykudinkin commented on code in PR #7413:
URL: https://github.com/apache/hudi/pull/7413#discussion_r1053763213
##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/TestInsertTable.scala:
##########
@@ -1046,4 +1048,62 @@ class TestInsertTable extends HoodieSparkSqlTestBase {
)
}
}
+
+ /**
+ * This test is to make sure that bulk insert doesn't create a bunch of tiny
files if
+ * hoodie.bulkinsert.user.defined.partitioner.sort.columns doesn't start
with the partition columns
+ *
+ */
+ forAll(BulkInsertSortMode.values().toList) { (sortMode: BulkInsertSortMode)
=>
+ val sortModeName = sortMode.name()
+ test(s"Test Bulk Insert with BulkInsertSortMode: '$sortModeName'") {
Review Comment:
Oh, nice! Didn't know that. Previously i've tried just using a normal
for-loop and that was just shamble
##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/TestInsertTable.scala:
##########
@@ -1046,4 +1048,67 @@ class TestInsertTable extends HoodieSparkSqlTestBase {
)
}
}
+
+ /**
+ * This test is to make sure that bulk insert doesn't create a bunch of tiny
files if
+ * hoodie.bulkinsert.user.defined.partitioner.sort.columns doesn't start
with the partition columns
+ *
+ */
+ forAll(BulkInsertSortMode.values().toList) { (sortMode: BulkInsertSortMode)
=>
+ val sortModeName = sortMode.name()
+ test(s"Test Bulk Insert with BulkInsertSortMode: '$sortModeName'") {
+ withTempDir { basePath =>
+ testBulkInsertPartitioner(basePath, sortModeName)
+ }
+ }
+ }
+
+ def testBulkInsertPartitioner(basePath: File, sortModeName: String): Unit = {
+ val tableName = generateTableName
+ spark.sessionState.conf.unsetConf("hoodie.datasource.write.operation")
Review Comment:
This is temporary until you address this in your other PR, right?
--
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]