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

Daniel Voros updated HIVE-20015:
--------------------------------
    Attachment: HIVE-20015.1.patch

> Populate ArrayList with Constructor
> -----------------------------------
>
>                 Key: HIVE-20015
>                 URL: https://issues.apache.org/jira/browse/HIVE-20015
>             Project: Hive
>          Issue Type: Improvement
>          Components: HiveServer2
>    Affects Versions: 3.0.0, 4.0.0
>            Reporter: BELUGA BEHR
>            Assignee: Daniel Voros
>            Priority: Trivial
>              Labels: newbie, noob
>         Attachments: HIVE-20015.1.patch
>
>
> {code:title=MapWork.java}
>   public ArrayList<Operator<?>> getWorks() {
>     return new ArrayList<Operator<?>>(aliasToWork.values());
>   }
>   public ArrayList<Path> getPaths() {
>     ArrayList<Path> ret=new ArrayList<>();
>     ret.addAll(pathToAliases.keySet());
>     return ret;
>   }
> {code}
> {{getWorks}} method correctly uses the constructor to populate the 
> {{ArrayList}}.  Please update {{getPaths}} method to do the same, instead of 
> creating an empty array, then creating a new array to accommodate the 
> {{addAll}} request.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to