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

   <!--
   1. Title: [#<issue>] <type>(<scope>): <subject>
      Examples:
        - "[#123] feat(operator): Support xxx"
        - "[#233] fix: Check null before access result in xxx"
        - "[MINOR] refactor: Fix typo in variable name"
        - "[MINOR] docs: Fix typo in README"
        - "[#255] test: Fix flaky test NameOfTheTest"
      Reference: https://www.conventionalcommits.org/en/v1.0.0/
   2. If the PR is unfinished, please mark this PR as draft.
   -->
   
   ### What changes were proposed in this pull request?
   This PR refactors the response construction logic in 
`GravitinoLanceTableOperations#createTable`:
   1. **Removed redundant setters**: Deleted the initial 
`response.setLocation(tableLocation)` and the first 
`response.setProperties(t.properties())` as they were immediately overwritten.
   2. **Extracted local variable**: Stored `t.properties()` in a local variable 
to ensure a single source of truth and avoid multiple redundant method calls.
   
   ### Why are the changes needed?
   The original code contained "dead store" assignments where values were set 
and then immediately overwritten. This cleanup improves code readability and 
eliminates unnecessary method calls.
   
   Fix: #10496
   
   ### Does this PR introduce any user-facing change?
   No.
   
   ### How was this patch tested?
   Passed `./gradlew :lance:lance-common:build` to ensure the project compiles 
and no regressions were introduced.


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