Repository navigation
Commit 7024529
committed
Core: Clear derived delete files when file scan tasks are cleared
BaseScanTaskResponse.Builder.withFileScanTasks derives deleteFiles from the
tasks, but only on the non-null branch, so clearing the tasks left the previously
derived delete files behind. Combined with the removal of withDeleteFiles in this
PR, there was no longer any way to clear them, and
response.toBuilder().withPlanStatus(FAILED).withFileScanTasks(null).build()
failed validation with "deleteFiles should only be returned with fileScanTasks
that reference them".
Derives on both branches so clearing the tasks clears the derived delete files,
and reads the tasks parameter rather than the field, which is what the guard
always meant.
Reported-by: u70b31 parent b6c8fcb commit 7024529
2 files changed
Lines changed: 34 additions & 5 deletions
File tree
- core/src
- main/java/org/apache/iceberg/rest/responses
- test/java/org/apache/iceberg/rest/responses
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
377 | 406 | | |
378 | 407 | | |
379 | 408 | | |
| |||
0 commit comments