Taragolis commented on code in PR #28874:
URL: https://github.com/apache/airflow/pull/28874#discussion_r1067755312


##########
airflow/providers/apache/hive/provider.yaml:
##########
@@ -56,6 +56,7 @@ dependencies:
   # the sasl library anyway (and there sasl library version is not relevant)
   - sasl>=0.3.1; python_version>="3.9"
   - thrift>=0.9.2
+  - impyla

Review Comment:
   [impyla](https://github.com/cloudera/impyla) doesn't make any asyncio calls 
in execute_async.
   



##########
airflow/providers/apache/hive/hooks/hive.py:
##########
@@ -1036,3 +1040,92 @@ def get_pandas_df(  # type: ignore
         res = self.get_results(sql, schema=schema, hive_conf=hive_conf)
         df = pandas.DataFrame(res["data"], columns=[c[0] for c in 
res["header"]], **kwargs)
         return df
+
+
+class HiveCliAsyncHook(BaseHook):
+    """
+    HiveCliAsyncHook to interact with the Hive using impyla library
+
+    :param metastore_conn_id: connection string for the hive
+    :param auth_mechanism: auth mechanism to use for authentication
+    """
+
+    def __init__(self, metastore_conn_id: str) -> None:
+        """Get the connection parameters separated from connection string"""
+        super().__init__()
+        self.conn = self.get_connection(conn_id=metastore_conn_id)
+        self.auth_mechanism = self.conn.extra_dejson.get("authMechanism", 
"PLAIN")

Review Comment:
   This block async thread



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to