diqiu50 opened a new pull request, #13784:
URL: https://github.com/apache/gravitino/pull/13784
### What changes were proposed in this pull request?
`RESTUtils.encodeString` now encodes a space as `%20` instead of `+`. A
literal `+` in the input is
still encoded as `%2B`, so the result is valid as a path segment and as a
query or form value.
### Why are the changes needed?
`URLEncoder` follows form encoding and turns a space into `+`, which the
server keeps as a literal
`+` in a path segment. Objects whose names contain a space could be listed
but not loaded, for
example a JDBC table named `with space` is shown by the Trino connector but
cannot be queried.
Fix: #13781
### Does this PR introduce _any_ user-facing change?
Objects whose names contain a space can be accessed through the Java client.
### How was this patch tested?
- Updated `TestRESTUtils.testEncodeString`.
- Added `TestTableOperations.testLoadTableWithSpaceInName`, which loads a
table through the server
with a path built by `RESTUtils.encodeString`; it fails without this
change.
--
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]