1
0

[HUDI-1774] Adding support for delete_partitions to spark data source (#3437)

This commit is contained in:
Sivabalan Narayanan
2021-08-11 01:03:01 -04:00
committed by GitHub
parent a5e496fe23
commit c9fa3cffaf
5 changed files with 225 additions and 190 deletions

View File

@@ -46,7 +46,8 @@ public class CommitUtils {
* For example, INSERT_OVERWRITE/INSERT_OVERWRITE_TABLE operations have REPLACE commit action type.
*/
public static String getCommitActionType(WriteOperationType operation, HoodieTableType tableType) {
if (operation == WriteOperationType.INSERT_OVERWRITE || operation == WriteOperationType.INSERT_OVERWRITE_TABLE) {
if (operation == WriteOperationType.INSERT_OVERWRITE || operation == WriteOperationType.INSERT_OVERWRITE_TABLE
|| operation == WriteOperationType.DELETE_PARTITION) {
return HoodieTimeline.REPLACE_COMMIT_ACTION;
} else {
return getCommitActionType(tableType);