From 2f251fe4899694edcae58ab9a292f6b704446a99 Mon Sep 17 00:00:00 2001 From: Jacky Hu Date: Tue, 12 Nov 2024 18:54:23 -0800 Subject: [PATCH] Print warning message if pyarrow is not installed Signed-off-by: Jacky Hu --- src/databricks/sql/client.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/databricks/sql/client.py b/src/databricks/sql/client.py index 4e0ab941..15a09650 100755 --- a/src/databricks/sql/client.py +++ b/src/databricks/sql/client.py @@ -52,6 +52,13 @@ logger = logging.getLogger(__name__) +if pyarrow is None: + logger.warning( + "[WARN] pyarrow is not installed by default since databricks-sql-connector 4.0.0," + "any arrow specific api (e.g. fetchmany_arrow) and cloud fetch will be disabled." + "If you need these features, please run pip install pyarrow or pip install databricks-sql-connector[pyarrow] to install" + ) + DEFAULT_RESULT_BUFFER_SIZE_BYTES = 104857600 DEFAULT_ARRAY_SIZE = 100000