You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "iinow (via GitHub)" <gi...@apache.org> on 2025/08/11 13:37:06 UTC

[PR] [#8007] fix: include recursive field in hashCode [gravitino]

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

   <!--
   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?
   
   Modified IndexDTO's hashCode() method to include fieldNames in the hash calculation.
   The fieldNames is a two-dimensional String[][] array, and each sub-array’s hash is incorporated to ensure more accurate hash codes.
   
   ### Why are the changes needed?
   
   This fix ensures that fieldNames contributes to the hash code, maintaining the contract between equals() and hashCode().
   
   Fix: #8007
   
   ### Does this PR introduce _any_ user-facing change?
   
   No user-facing changes or API modifications are introduced by this patch.
   
   ### How was this patch tested?
   
   Added a new test class org.apache.gravitino.dto.rel.indexes.TestIndexDTO to verify the updated hashCode() behavior.
   


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#8007] fix: include recursive field in hashCode [gravitino]

Posted by "iinow (via GitHub)" <gi...@apache.org>.
iinow commented on PR #8020:
URL: https://github.com/apache/gravitino/pull/8020#issuecomment-3179553003

   @justinmclean 
   
   I added ASF license header


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#8007] fix: include recursive field in hashCode [gravitino]

Posted by "justinmclean (via GitHub)" <gi...@apache.org>.
justinmclean commented on PR #8020:
URL: https://github.com/apache/gravitino/pull/8020#issuecomment-3177700668

   Hi the CI failed as the file TestIndexDTO.java is missing an ASF license header.


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#8007] fix: include fieldnames in hashCode [gravitino]

Posted by "justinmclean (via GitHub)" <gi...@apache.org>.
justinmclean merged PR #8020:
URL: https://github.com/apache/gravitino/pull/8020


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org