File tree 1 file changed +8
-12
lines changed
paimon-common/src/main/java/org/apache/paimon
1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -2272,17 +2272,13 @@ public boolean writeOnly() {
2272
2272
}
2273
2273
2274
2274
public Set <WriteAction > writeActions () {
2275
- return options .getOptional (WRITE_ACTIONS )
2276
- .map (
2277
- str ->
2278
- Arrays .stream (str .split ("," ))
2279
- .map (
2280
- action ->
2281
- WriteAction .valueOf (
2282
- action .toUpperCase ()
2283
- .replace ('-' , '_' )))
2284
- .collect (Collectors .toCollection (HashSet ::new )))
2285
- .orElseGet (() -> new HashSet <>(0 ));
2275
+ String str = options .get (WRITE_ACTIONS );
2276
+ if (StringUtils .isNullOrWhitespaceOnly (str )) {
2277
+ return new HashSet <>(0 );
2278
+ }
2279
+ return Arrays .stream (str .split ("," ))
2280
+ .map (action -> WriteAction .valueOf (action .toUpperCase ().replace ('-' , '_' )))
2281
+ .collect (Collectors .toCollection (HashSet ::new ));
2286
2282
}
2287
2283
2288
2284
public boolean doPartitionExpireAction (Set <WriteAction > doWriteActions ) {
@@ -2321,7 +2317,7 @@ public boolean doCompact() {
2321
2317
}
2322
2318
2323
2319
public boolean doAllWriteActions (Set <WriteAction > doWriteActions ) {
2324
- return doWriteActions .contains (WriteAction .ALL );
2320
+ return doWriteActions .isEmpty () || doWriteActions . contains (WriteAction .ALL );
2325
2321
}
2326
2322
2327
2323
public boolean streamingReadOverwrite () {
You can’t perform that action at this time.
0 commit comments