hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Laszlo Bodor (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-20015) Populate ArrayList with Constructor
Date Thu, 28 Jun 2018 12:12:00 GMT

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

Laszlo Bodor commented on HIVE-20015:
-------------------------------------

+1 LGTM

> 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)

Mime
View raw message