lintingbin opened a new pull request, #4178:
URL: https://github.com/apache/amoro/pull/4178

   ## Why are the changes needed?
   
   Close #4122
   
   The `partitions` field in `AbstractOptimizingEvaluator.PendingInput` is 
annotated with `@JsonIgnore`, which causes partition information to be silently 
dropped during JSON serialization/deserialization through `TableRuntimeStore` 
(stored as CLOB in the database).
   
   When `PendingInput` is read back from the database, the `partitions` map is 
always empty. This causes the partition filter in 
`IcebergTableUtil.createOptimizingPlanner()` to fall back to 
`Expressions.alwaysTrue()`, meaning all partitions are scanned instead of only 
the ones that need optimizing.
   
   ### Fix
   
   Add a serializable `partitionPaths` field (`Set<String>`) that stores 
partition info as `specId:partitionPath` strings. On serialization, build paths 
from the in-memory partitions map via `PartitionSpec.partitionToPath()`; on 
deserialization, rebuild the partitions map from paths using `DataFiles.data()`.
   
   ## How was this patch tested?
   
   - `TestIcebergTableUtil`: 4 tests passed
   - `TestOptimizingEvaluator`: 20 tests passed
   - `TestOptimizingPlanner`: 20 tests passed


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to