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

   
   <!--
   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 adds the `AND deleted_at = 0` condition to the sort delete logic in 
the codebase. This ensures that only non-deleted records are considered during 
sort operations, preventing deleted records from being included in the sorting 
process.
   
   
   ### Why are the changes needed?
   
   Fix: #8032
   
   The current sort delete logic was missing a crucial condition to filter out 
already soft-deleted records. Without the `AND deleted_at = 0` condition, the 
sort operation could potentially include records that have been marked as 
deleted (deleted_at > 0), leading to inconsistent behavior and potential data 
integrity issues.
   
   This fix ensures that:
   1. Soft-deleted records are properly excluded from sort operations
   2. Data consistency is maintained across the application
   3. The soft delete pattern is correctly implemented throughout the codebase
   
   ### Does this PR introduce _any_ user-facing change?
   
   No
   
   ### How was this patch tested?
   
   - Since the changes involve SQL query string modifications only, no 
additional unit tests were written.
   
   


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