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

   `filteredCompareToFileList()` uses raw `startsWith(location)` to scope the 
caller-provided file list, which incorrectly matches sibling paths (e.g. 
`s3://bucket/table-backup/` matches when location is `s3://bucket/table`). This 
fixes the filter to require a path separator after the location prefix, 
preventing files outside the table directory from being treated as orphans and 
deleted. This is the separate `filteredCompareToFileList` fix that @rdblue 
carved out in #16493.
   
   Closes #16493 (for the `filteredCompareToFileList` path).
   
   Test plan: `testCompareToFileListExcludesSiblingPaths` creates a table and a 
sibling directory sharing the same prefix, puts both in the compare-to file 
list, and asserts the sibling file is not included in orphan results.
   
   ---
   **AI Disclosure**
   - Model: Claude Opus 4.6
   - Platform/Tool: Kiro Crew (MeshClaw) dashboard
   - Human Oversight: [unknown - human to fill in]
   - Prompt Summary: Fix sibling path matching bug in filteredCompareToFileList 
for #16493
   
   Generated-by: Claude Opus 4.6
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to