You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jiatao Tao (Jira)" <ji...@apache.org> on 2020/07/01 02:28:00 UTC

[jira] [Updated] (CALCITE-4098) remove redundant code in "RelJson.toJson(RelDistribution)"

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

Jiatao Tao updated CALCITE-4098:
--------------------------------
    Description: 
RelDistribution#getKeys is annotated as nonnull, and must return "List<Integer>", so this code is unnecessary.

 
{code:java}
List<Object> keys = new ArrayList<>(relDistribution.getKeys().size()); 
 for (Integer key : relDistribution.getKeys()) {
  keys.add(toJson(key));
}
 
{code}
 

 

  was:
RelDistribution#getKeys is annotated as nonnull, and must return "List<Integer>", so this code is unnecessary.

```

List<Object> keys = new ArrayList<>(relDistribution.getKeys().size()); 
 for (Integer key : relDistribution.getKeys()) { 
  keys.add(toJson(key)); 
 }

```


> remove redundant code in "RelJson.toJson(RelDistribution)"
> ----------------------------------------------------------
>
>                 Key: CALCITE-4098
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4098
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Jiatao Tao
>            Assignee: Jiatao Tao
>            Priority: Minor
>
> RelDistribution#getKeys is annotated as nonnull, and must return "List<Integer>", so this code is unnecessary.
>  
> {code:java}
> List<Object> keys = new ArrayList<>(relDistribution.getKeys().size()); 
>  for (Integer key : relDistribution.getKeys()) {
>   keys.add(toJson(key));
> }
>  
> {code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)