[HUDI-1153] Spark DataSource and Streaming Write must fail when operation type is misconfigured (#2014)
This commit is contained in:
@@ -71,6 +71,14 @@ public enum WriteOperationType {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for value.
|
||||
* @return string form of WriteOperationType
|
||||
*/
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static boolean isChangingRecords(WriteOperationType operationType) {
|
||||
return operationType == UPSERT || operationType == UPSERT_PREPPED || operationType == DELETE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user