Skip to content

[python] Send the warehouse config parameter encoded once - #10357

Open
plusplusjiajia wants to merge 2 commits into
apache:masterfrom
plusplusjiajia:fix/python-rest-path-encoding
Open

plusplusjiajia wants to merge 2 commits into
apache:masterfrom
plusplusjiajia:fix/python-rest-path-encoding

Conversation

@plusplusjiajia

@plusplusjiajia plusplusjiajia commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Purpose

The warehouse config parameter is encoded twice: RESTApi encodes it and urlencode encodes it again. For file:///tmp/paimon-warehouse the server receives file%3A%2F%2F%2Ftmp%2Fpaimon-warehouse. Java fixed the same bug in #8792. Since #10385 started encoding /, a warehouse such as a/b now fails as well. table_details also encodes the database name now, as Java does.

Tests

Ports RESTApiWarehouseEncodingTest and ResourcePathsTest#testUrlEncode, and adds a table_details case. Its expected path comes from Java's ResourcePaths.

@plusplusjiajia
plusplusjiajia marked this pull request as ready for review October 4, 2026 12:33
@JingsongLi

Copy link
Copy Markdown
Contributor

Please rebase.

@plusplusjiajia
plusplusjiajia force-pushed the fix/python-rest-path-encoding branch from 5a0e683 to 9c9cef5 Compare October 5, 2026 13:55
@plusplusjiajia plusplusjiajia changed the title [python] Align REST URL encoding with Java [python] Send the warehouse config parameter encoded once Oct 5, 2026
@plusplusjiajia
plusplusjiajia force-pushed the fix/python-rest-path-encoding branch from 9c9cef5 to c471058 Compare October 5, 2026 14:25
@plusplusjiajia

Copy link
Copy Markdown
Member Author

@JingsongLi Rebased.

@plusplusjiajia
plusplusjiajia force-pushed the fix/python-rest-path-encoding branch 2 times, most recently from 3c13f52 to 276550b Compare October 6, 2026 15:18
@plusplusjiajia
plusplusjiajia force-pushed the fix/python-rest-path-encoding branch from 276550b to 99515f4 Compare October 8, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants