lintingbin opened a new pull request, #4194: URL: https://github.com/apache/amoro/pull/4194
## What changes were proposed in this pull request? Fix the `@Result` annotations on `ResourceMapper.selectResourcesByGroup` so that the property names actually match the fields on `Resource`: | Column | Old `property` | Correct `property` | | --- | --- | --- | | `group_name` | `group` | `groupName` | | `container_name` | `container` | `containerName` | | `total_memory` | `totalMemory` | `memoryMb` | Also drop the `start_time` column from the `SELECT` list and remove its `@Result` entry. `Resource` has no `startTime` field, so the mapping was silently discarded — keeping the column in the projection added no value. ## Why are the changes needed? These mapping names have never matched the target class. Currently `DefaultOptimizerManager.listResourcesByGroup` is the only path that calls this mapper, and it has no caller on `master`, so the bug was latent. Any future caller (e.g. the auto-restart optimizer feature under development) that starts using this method would get back `Resource` instances with `null`/`0` values in `groupName`, `containerName`, and `memoryMb`. Fixing it as a standalone change keeps the diff minimal and makes it safe to cherry-pick. ## Does this PR introduce any user-facing change? No. ## How was this patch tested? - Verified no current caller of `selectResourcesByGroup` / `listResourcesByGroup` exists on master besides the declaration itself, so the change cannot regress existing behavior. - `mvn spotless:apply` passes. -- 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]
