class_docstr: Wrapper around the pyhive library.
  
  Notes:
  * the default auth_mechanism is PLAIN, to override it you
  can specify it in the ``extra`` of your connection in the UI
  * the default for run_set_variable_statements is true, if you
  are using impala you may need to set it to false in the
  ``extra`` of your connection in the UI
  
  :param hiveserver2_conn_id: Reference to the
      :ref: `Hive Server2 thrift service connection id <howto/connection:hiveserver2>`.
  :param schema: Hive database name.
class_docstr_tok: ["Wrapper","around","the","pyhive","library",".","Notes",":","*","the","default","auth_mechanism","is","PLAIN",",","to","override","it","you","can","specify","it","in","the","``","extra","``","of","your","connection","in","the","UI","*","the","default","for","run_set_variable_statements","is","true",",","if","you","are","using","impala","you","may","need","to","set","it","to","false","in","the","``","extra","``","of","your","connection","in","the","UI",":","param","hiveserver2_conn_id",":","Reference","to","the",":","ref",":","`","Hive","Server2","thrift","service","connection","id","<","howto\/connection",":","hiveserver2",">","`",".",":","param","schema",":","Hive","database","name","."]
docstr: Get results of the provided hql in target schema.
  
  :param sql: hql to be executed.
  :param schema: target schema, default to 'default'.
  :param fetch_size: max size of result to fetch.
  :param hive_conf: hive_conf to execute alone with the hql.
  :return: results of hql execution, dict with data (list of results) and header
docstr_tok: ["Get","results","of","the","provided","hql","in","target","schema",".",":","param","sql",":","hql","to","be","executed",".",":","param","schema",":","target","schema",",","default","to","'default","'",".",":","param","fetch_size",":","max","size","of","result","to","fetch",".",":","param","hive_conf",":","hive_conf","to","execute","alone","with","the","hql",".",":","return",":","results","of","hql","execution",",","dict","with","data","(","list","of","results",")","and","header"]
code: def get_results(
      self,
      sql: str | list[str],
      schema: str = "default",
      fetch_size: int | None = None,
      hive_conf: Iterable | Mapping | None = None,
  ) -> dict[str, Any]:
      """
      Get results of the provided hql in target schema.
  
      :param sql: hql to be executed.
      :param schema: target schema, default to 'default'.
      :param fetch_size: max size of result to fetch.
      :param hive_conf: hive_conf to execute alone with the hql.
      :return: results of hql execution, dict with data (list of results) and header
      """
      results_iter = self._get_results(
          sql, schema, fetch_size=fetch_size, hive_conf=hive_conf
      )
      header = next(results_iter)
      results = {"data": list(results_iter), "header": header}
      return results
  
imports: from __future__ import annotations
  import contextlib
  import os
  import re
  import socket
  import subprocess
  import time
  import warnings
  from tempfile import NamedTemporaryFile, TemporaryDirectory
  from typing import TYPE_CHECKING, Any, Iterable, Mapping
  from airflow.exceptions import AirflowProviderDeprecationWarning
  import csv
  from airflow.configuration import conf
  from airflow.exceptions import AirflowException
  from airflow.hooks.base import BaseHook
  from airflow.providers.common.sql.hooks.sql import DbApiHook
  from airflow.security import utils
  from airflow.utils.helpers import as_flattened_list
  from airflow.utils.operator_helpers import AIRFLOW_VAR_NAME_FORMAT_MAPPING
label_desc: Use image node_id 3 for calling the HiveServer2Hook obj's underlying member method code with example usage: obj.get_results(sql, schema, fetch_size, hive_conf) and returns: results