kroushan-nit commented on code in PR #816:
URL: https://github.com/apache/incubator-xtable/pull/816#discussion_r3043353651
##########
xtable-core/src/test/java/org/apache/xtable/TestSparkHudiTable.java:
##########
@@ -220,6 +220,19 @@ public void deletePartition(String partition,
HoodieTableType tableType) {
assertNoWriteErrors(result);
}
+ public List<HoodieRecord<HoodieAvroPayload>> insertOverwrite(
+ List<HoodieRecord<HoodieAvroPayload>> records) {
+ String actionType =
+ CommitUtils.getCommitActionType(
+ WriteOperationType.INSERT_OVERWRITE,
HoodieTableType.COPY_ON_WRITE);
+ String instant = getStartCommitOfActionType(actionType);
+ JavaRDD<HoodieRecord<HoodieAvroPayload>> writeRecords =
jsc.parallelize(records, 1);
+ HoodieWriteResult writeResult = writeClient.insertOverwrite(writeRecords,
instant);
+ List<WriteStatus> result = writeResult.getWriteStatuses().collect();
+ assertNoWriteErrors(result);
+ return records;
Review Comment:
This method returns the exact same list (`records`) the caller passed in, so
the return value carries no information. Can we make this `void`?
##########
xtable-core/src/test/java/org/apache/xtable/hudi/ITHudiConversionSource.java:
##########
@@ -419,6 +419,54 @@ public void testsForDropPartition(HoodieTableType
tableType) {
}
}
+ @Test
+ public void testMultipleInsertOverwriteOnSamePartitions() {
Review Comment:
Can we make this parameterised to test for `MOR` as well?
##########
xtable-core/src/test/java/org/apache/xtable/TestSparkHudiTable.java:
##########
@@ -220,6 +220,19 @@ public void deletePartition(String partition,
HoodieTableType tableType) {
assertNoWriteErrors(result);
}
+ public List<HoodieRecord<HoodieAvroPayload>> insertOverwrite(
+ List<HoodieRecord<HoodieAvroPayload>> records) {
+ String actionType =
+ CommitUtils.getCommitActionType(
+ WriteOperationType.INSERT_OVERWRITE,
HoodieTableType.COPY_ON_WRITE);
Review Comment:
Can we update this to take tableType to support `MOR` as well?
--
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]