kevinjqliu opened a new pull request, #4151:
URL: https://github.com/apache/iceberg-python/pull/4151

   <!--
   Thanks for opening a pull request!
   -->
   
   <!-- In the case this PR will resolve an issue, please replace 
${GITHUB_ISSUE_ID} below with the actual Github issue id. -->
   <!-- Closes #${GITHUB_ISSUE_ID} -->
   
   # Rationale for this change
   
   Found this while looking at #4112. Same kind of bug, but for views.
   
   `create_view` and `register_view` take the view name from 
`_split_identifier_for_path`, which URL-encodes it for the path, and then put 
it in the JSON body. So creating a view called `my view` actually creates 
`my%20view` on the server. `create_table` and `register_table` already use the 
raw name. This does the same for views. Introduced in #2826.
   
   Also added an integration test against the REST fixture that round-trips 
namespace, table, and view names with spaces, `+&=`, and non-ASCII characters 
through path, query, and body params. It catches both this bug and the one 
fixed in #4112. Left out `%` since the fixture rejects `%25` in paths with a 
400.
   
   ## Are these changes tested?
   
   Yes.
   - `uv run pytest tests/catalog/test_rest.py`: 176 passed. The new view tests 
fail on `main`.
   - `pytest tests/integration/test_catalog.py -m integration -k 
test_rest_identifiers_with_special_characters` against the REST fixture: 
passed. Fails on `main` at `view_exists`.
   - `prek run` on the changed files: passed.
   
   ## Are there any user-facing changes?
   
   Yes, bug fix. Views with names that need URL encoding are now created and 
registered with the right name.
   
   AI Disclosure: Assisted by GitHub Copilot.


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