BELUGA BEHR created HIVE-20015:
----------------------------------
Summary: 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
{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)