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

Fokko Driesprong resolved PARQUET-1723.
---------------------------------------
    Fix Version/s: 1.12.0
       Resolution: Fixed

> Read From Maps Without Using Contains
> -------------------------------------
>
>                 Key: PARQUET-1723
>                 URL: https://issues.apache.org/jira/browse/PARQUET-1723
>             Project: Parquet
>          Issue Type: Improvement
>            Reporter: David Mollitor
>            Assignee: David Mollitor
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.12.0
>
>
> I see a few places with the following pattern...
>  
> {code:java}
> if (map.contains(key)) {
>    return map.get(key);
> }
> {code}
> Better to just call {{get()}} and then check the return value for 'null' to 
> determine if the key is there.  This prevents the need to traverse the 
> {{Map}} twice,... once for {{contains}} and once for {{get}}.



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

Reply via email to