sachinnn99 opened a new pull request, #10639:
URL: https://github.com/apache/gravitino/pull/10639

   ### What changes were proposed in this pull request?
   
   Changed `MetadataObjectUtil.toEntityIdent()` to use `metadataObject.name()` 
instead of the `metalakeName` parameter when handling 
`MetadataObject.Type.METALAKE`.
   
   ### Why are the changes needed?
   
   The METALAKE case was the only branch using the context parameter 
`metalakeName` instead of the object's own name. All other type branches (ROLE, 
TAG, CATALOG, SCHEMA, etc.) already use `metadataObject.name()` or 
`metadataObject.fullName()`. This inconsistency means a mismatched metalake 
name in the request silently resolves to the wrong metalake.
   
   Fix: #10621
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Added a unit test in `TestMetadataObjectUtil` that passes a different 
`metalakeName` parameter than the metadata object's name, verifying the 
object's name is used in the returned `NameIdentifier`.
   
   ```bash
   ./gradlew :core:test --tests 
"org.apache.gravitino.utils.TestMetadataObjectUtil" -PskipITs
   ```


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