You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "waterWang (via GitHub)" <gi...@apache.org> on 2026/08/11 10:04:52 UTC

[PR] fix: respect path boundary in compareToFileList location prefix matching (#16493) [iceberg]

waterWang opened a new pull request, #17607:
URL: https://github.com/apache/iceberg/pull/17607

   Fixes #16493
   
   ## Why
   
   When using `compareToFileList(Dataset)`, the `file_list_view` is filtered by `startsWith(tableLocation)`. This raw string prefix match incorrectly includes sibling paths that share a prefix with the table location. For example, a table at `s3://bucket/table` would also match `s3://bucket/table-backup/data/file.parquet` or `s3://bucket/table_old/data/file.parquet`, treating files outside the intended directory as in-scope orphan candidates.
   
   ## Summary
   
   Normalize the location to ensure it ends with a path separator (`/`) before using `startsWith`, and also accept an exact match for the location itself. This ensures that only files actually under the table directory (or equal to the location) are treated as in-scope.
   
   ## How to Test
   
   New test `testCompareToFileListDoesNotMatchSiblingPaths` verifies that:
   - Files under `tableLocation + "-backup/"` (sibling prefix) are NOT in scope
   - Files under `tableLocation + "_old/"` (sibling prefix) are NOT in scope
   - Files under `tableLocation + "/data/"` are correctly in scope
   
   ## Type
   
   - [x] Bug fix
   - [ ] Feature
   - [ ] Documentation
   
   ## Checklist
   
   - [x] Changes are tested
   - [x] Changes follow the project's code style


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] fix: respect path boundary in compareToFileList location prefix matching (#16493) [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #17607: fix: respect path boundary in compareToFileList location prefix matching (#16493)
URL: https://github.com/apache/iceberg/pull/17607


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] fix: respect path boundary in compareToFileList location prefix matching (#16493) [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17607:
URL: https://github.com/apache/iceberg/pull/17607#issuecomment-5649682530

   This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] fix: respect path boundary in compareToFileList location prefix matching (#16493) [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17607:
URL: https://github.com/apache/iceberg/pull/17607#issuecomment-5753875047

   This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org