You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/01/06 10:43:44 UTC
[GitHub] [flink] slinkydeveloper commented on a change in pull request #18264: [FLINK-25518][table-planner] Harden JSON utilities for serde of the persisted plan
slinkydeveloper commented on a change in pull request #18264:
URL: https://github.com/apache/flink/pull/18264#discussion_r779457785
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/serde/LogicalWindowJsonDeserializer.java
##########
@@ -68,24 +66,25 @@ public LogicalWindowJsonDeserializer() {
@Override
public LogicalWindow deserialize(
JsonParser jsonParser, DeserializationContext deserializationContext)
- throws IOException, JsonProcessingException {
- FlinkDeserializationContext flinkDeserializationContext =
- (FlinkDeserializationContext) deserializationContext;
- ObjectMapper mapper = flinkDeserializationContext.getObjectMapper();
+ throws IOException {
JsonNode jsonNode = jsonParser.readValueAsTree();
String kind = jsonNode.get(FIELD_NAME_KIND).asText().toUpperCase();
WindowReference alias =
- mapper.readValue(jsonNode.get(FIELD_NAME_ALIAS).toString(), WindowReference.class);
+ jsonParser
Review comment:
Good question. For some reason, only in this specific case, I'm forced to use the codec directly. I feel like this has something to do with the fact that the class `WindowReference` is in scala. I also havent't spent much time investigating, as my understanding is that we don't need to serialize this class anymore once we disable `GroupWindow`s.
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org