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

Populate ArrayList with Constructor

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 3.0.0, 4.0.0
    • 4.0.0-alpha-1
    • HiveServer2

    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

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

            Dates

              Created:
              Updated:
              Resolved: