Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-20015

Populate ArrayList with Constructor

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.0.0, 4.0.0
    • Fix Version/s: 4.0.0
    • Component/s: HiveServer2
    • Labels:

      Description

      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;
        }
      

      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.

        Attachments

        1. HIVE-20015.1.patch
          0.7 kB
          Daniel Voros

          Activity

            People

            • Assignee:
              dvoros Daniel Voros
              Reporter:
              belugabehr David Mollitor
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: