mchades commented on code in PR #9016:
URL: https://github.com/apache/gravitino/pull/9016#discussion_r2490575976
##########
lance/lance-rest-server/src/main/java/org/apache/gravitino/lance/service/rest/LanceTableOperations.java:
##########
@@ -97,13 +104,28 @@ public Response createTable(
MultivaluedMap<String, String> headersMap = headers.getRequestHeaders();
String tableLocation = headersMap.getFirst(LANCE_TABLE_LOCATION_HEADER);
String tableProperties =
headersMap.getFirst(LANCE_TABLE_PROPERTIES_PREFIX_HEADER);
+ CreateTableRequest.ModeEnum modeEnum =
CreateTableRequest.ModeEnum.fromValue(mode);
Map<String, String> props =
- JsonUtil.mapper().readValue(tableProperties, new TypeReference<>()
{});
+ StringUtils.isBlank(tableProperties)
+ ? ImmutableMap.of()
+ : JsonUtil.parse(
+ tableProperties,
+ jsonNode -> {
+ Map<String, String> map = new HashMap<>();
+ jsonNode
+ .fields()
+ .forEachRemaining(
+ entry -> {
+ map.put(entry.getKey(),
entry.getValue().asText());
+ });
+ return map;
Review Comment:
Can you give an example of what the differences are in their serialization
results?
--
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]