Oliver Lee created CALCITE-5694: ----------------------------------- Summary: RelJson fails to serialize/deserialize AggregateCall Key: CALCITE-5694 URL: https://issues.apache.org/jira/browse/CALCITE-5694 Project: Calcite Issue Type: Bug Reporter: Oliver Lee Assignee: Oliver Lee
The current output of {{RelJson.toJson(AggregateCall call)}} will fail to serialize back into an {{{}AggregateCall{}}}. and throw {{java.lang.UnsupportedOperationException: cannot convert to rex}} Correct behavior: {quote}AggregateCall aggCall; Object jsonRepresentation = relJson.toJson(aggCall); assertThat(jsonRepresentation, notNullValue()); RexNode deserialized = relJson.toRex(b.getCluster(), jsonRepresentation); assertThat(aggCall, is(deserialized)); assertThat(jsonRepresentation, is(relJson.toJson(deserialized))); {quote} These 2 assert statements should evaluate to {{{}true{}}}. -- This message was sent by Atlassian Jira (v8.20.10#820010)