You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Oliver Lee (Jira)" <ji...@apache.org> on 2023/05/09 00:19:00 UTC
[jira] [Created] (CALCITE-5694) RelJson fails to serialize/deserialize AggregateCall
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)