[ 
https://issues.apache.org/jira/browse/FLINK-39801?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ramin Gharib updated FLINK-39801:
---------------------------------
    Description: 
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.

  was:
`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.


> 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
>            Priority: Minor
>
> 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