Commit bd41384
authored
### What changes were proposed in this pull request?
This PR removes the redundant invocation of `table.supportPartitions()`
in `CatalogWrapper#doWithPartitionOps`.
Now, the method is called once and its result is cached in a local
variable.
### Why are the changes needed?
Calling `table.supportPartitions()` twice results in unnecessary
repeated look-ups.
Caching the result improves code readability and performance.
Fix: #7520
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
No behavior change is expected.
1 parent 8d20c48 commit bd41384
File tree
1 file changed
+3
-2
lines changed- core/src/main/java/org/apache/gravitino/catalog
1 file changed
+3
-2
lines changedLines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
221 | 222 | | |
222 | | - | |
223 | | - | |
| 223 | + | |
| 224 | + | |
224 | 225 | | |
225 | 226 | | |
226 | 227 | | |
| |||
0 commit comments