You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Oliver Lee (Jira)" <ji...@apache.org> on 2023/05/12 18:05:00 UTC
[jira] [Closed] (CALCITE-5694) RelJson fails to serialize/deserialize AggregateCall
[ https://issues.apache.org/jira/browse/CALCITE-5694?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oliver Lee closed CALCITE-5694.
-------------------------------
Resolution: Invalid
I hastily filed this ticket because I thought that was the desired behavior, but upon closer inspection, RelJson shouldn't be expected to serialize AggregateCalls.
Closing.
> 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
> Priority: Minor
>
> 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)