zhang-arvin commented on issue #18256:
URL: https://github.com/apache/iceberg/issues/18256#issuecomment-5835493895

   @zhang-arvin here — I'd like to take this one.
   
   Confirmed the gap: `ResolveBranch` rewrites the relation identifier for 
path-based tables in two cases (`location.contains("#")` → append 
`,branch_<name>`, otherwise `#branch_<name>`), and grep over 
`spark/*/spark-extensions/src/test` shows no test referencing `ResolveBranch`. 
The only path+branch tests today are the negative assertions in 
`TestSnapshotSelection` (`"Cannot time travel in branch"`), so the `case _` 
catalog path is the only one exercised.
   
   Plan:
   1. Add a `TestResolveBranch` (or extend `TestSnapshotSelection`) covering 
read via `.option("branch", ...)` on a path-loaded table, asserting the 
identifier is rewritten to `<location>#branch_<name>`.
   2. Cover the second case where the location already carries a metadata 
selector, asserting the branch selector is appended with a comma → 
`<location>#files,branch_<name>`.
   3. Cover the write path, asserting the append lands on the branch and `main` 
is untouched.
   
   Will keep it test-only, no production behavior change. Please assign this to 
me if convenient.


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