[ 
https://issues.apache.org/jira/browse/FLINK-39801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18085199#comment-18085199
 ] 

Sergey Nuyanzin commented on FLINK-39801:
-----------------------------------------

Merged as 
[cc348d480963ef619b3f55832e8ed2f50944ca88|https://github.com/apache/flink/commit/cc348d480963ef619b3f55832e8ed2f50944ca88]

> Skip serializing empty partitionKeys / orderKeys / orderDirections in 
> TABLE_ARG_CALL compiled plan
> --------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-39801
>                 URL: https://issues.apache.org/jira/browse/FLINK-39801
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / Planner
>            Reporter: Ramin Gharib
>            Assignee: Ramin Gharib
>            Priority: Minor
>              Labels: pull-request-available
>
> RexNodeJsonSerializer.serializeTableArgCall always writes partitionKeys, 
> orderKeys, and orderDirections, even when empty. This bloats compiled plans 
> with [ ] entries for the common case where a table argument has no ORDER BY 
> (and often no PARTITION BY).
> Skip writing each array when empty, matching the existing pattern in 
> serializeCall for operands.
> The deserializer must tolerate the absent fields. orderDirections already 
> does; partitionKeys and orderKeys currently use JsonNode.required(...) and 
> need to default to an empty array when missing.
> Existing restore-tests plan JSON files that contain the empty arrays need 
> regenerating.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to