New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] Encountered Chinese garbled code issue during Iceberg rest HTTP transmission #7821
Comments
This probably makes sense. @hxgdada do you have a small reproducible example? |
Before modification After modification |
fixes apache#7821 Without the fix, tests would fail with ``` expected: struct<1: id: required int (unique ID 😀), 2: data: required string> but was: struct<1: id: required int (unique ID ?), 2: data: required string> ```
fixes apache#7821 Without the fix, tests would fail with ``` expected: struct<1: id: required int (unique ID 🤪), 2: data: required string> but was: struct<1: id: required int (unique ID ?), 2: data: required string> ```
fixes apache#7821 Without the fix, tests would fail with ``` expected: struct<1: id: required int (unique ID 🤪), 2: data: required string> but was: struct<1: id: required int (unique ID ?), 2: data: required string> ```
fixes #7821 Without the fix, tests would fail with ``` expected: struct<1: id: required int (unique ID 🤪), 2: data: required string> but was: struct<1: id: required int (unique ID ?), 2: data: required string> ```
Apache Iceberg version
ALL
Query engine
None
Please describe the bug 🐞
org.apache.iceberg.rest.HTTPClient
origin:
private StringEntity toJson(Object requestBody) {
try {
return new StringEntity(mapper.writeValueAsString(requestBody));
} catch (JsonProcessingException e) {
throw new RESTException(e, "Failed to write request body: %s", requestBody);
}
}
After modification:
private StringEntity toJson(Object requestBody) {
try {
return new StringEntity(mapper.writeValueAsString(requestBody), Charset.forName("UTF-8"));
} catch (JsonProcessingException e) {
throw new RESTException(e, "Failed to write request body: %s", requestBody);
}
}
The text was updated successfully, but these errors were encountered: