yuqi1129 opened a new issue, #12970:
URL: https://github.com/apache/gravitino/issues/12970

   ### What would you like to be improved?
   
   `PolicyMetaMapper` repeats the same 8-column `@Results({...})` block ten 
times, once per query method that returns a `PolicyPO`. A column addition or 
rename therefore has to be replicated across all ten by hand, and the copies 
can drift apart silently.
   
   This codebase already has the convention for avoiding that: 
`FunctionMetaMapper` and `ViewMetaMapper` declare a single `@Results(id = 
"...")` and reference it from the other methods with `@ResultMap("...")`.
   
   ### How should we improve?
   
   Declare the column mapping once in `PolicyMetaMapper` with `@Results(id = 
...)` and replace the remaining nine blocks with `@ResultMap`.
   
   A mis-mapped column fails silently rather than throwing, so this should be 
its own change with the policy storage tests run against H2, MySQL and 
PostgreSQL — not folded into an unrelated PR.
   
   Follow-up from the review of #12782.
   


-- 
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