code: def run_hive(args, check_return_code=True):
      
      cmd = load_hive_cmd() + args
      p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
      stdout, stderr = p.communicate()
      if check_return_code and p.returncode != 0:
          raise HiveCommandError("Hive command: {0} failed with error code: {1}".format(" ".join(cmd), p.returncode),
                                 stdout, stderr)
      return stdout.decode('utf-8')
docs: Runs the `hive` from the command line, passing in the given args, and
      returning stdout.
  
      With the apache release of Hive, so of the table existence checks
      (which are done using DESCRIBE do not exit with a return code of 0
      so we need an option to ignore the return code and just return stdout for parsing