Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
- Split the connector into two separate packages: `databricks-sql-connector` and `databricks-sqlalchemy`. The `databricks-sql-connector` package contains the core functionality of the connector, while the `databricks-sqlalchemy` package contains the SQLAlchemy dialect for the connector.
- Pyarrow dependency is now optional in `databricks-sql-connector`. Users needing arrow are supposed to explicitly install pyarrow

# 3.7.1 (2025-01-07)

- Relaxed the number of Http retry attempts (databricks/databricks-sql-python#486 by @jprakash-db)

# 3.7.0 (2024-12-23)

- Fix: Incorrect number of rows fetched in inline results when fetching results with FETCH_NEXT orientation (databricks/databricks-sql-python#479 by @jprakash-db)
Expand Down
2 changes: 1 addition & 1 deletion src/databricks/sql/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def __repr__(self):
DATE = DBAPITypeObject("date")
ROWID = DBAPITypeObject()

__version__ = "3.7.0"
__version__ = "4.0.0"
USER_AGENT_NAME = "PyDatabricksSqlConnector"

# These two functions are pyhive legacy
Expand Down
2 changes: 1 addition & 1 deletion src/databricks/sql/thrift_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
_retry_policy = { # (type, default, min, max)
"_retry_delay_min": (float, 1, 0.1, 60),
"_retry_delay_max": (float, 30, 5, 3600),
"_retry_stop_after_attempts_count": (int, 5, 1, 60),
"_retry_stop_after_attempts_count": (int, 30, 1, 60),
"_retry_stop_after_attempts_duration": (float, 900, 1, 86400),
"_retry_delay_default": (float, 5, 1, 60),
}
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/test_arrow_queue.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import unittest
import pytest

try:
import pyarrow as pa
except ImportError:
pa = None
from databricks.sql.utils import ArrowQueue


@pytest.mark.skipif(pa is None, reason="PyArrow is not installed")
class ArrowQueueSuite(unittest.TestCase):
@staticmethod
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_cloud_fetch_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import databricks.sql.utils as utils
from databricks.sql.types import SSLOptions


@pytest.mark.skipif(pyarrow is None, reason="PyArrow is not installed")
class CloudFetchQueueSuite(unittest.TestCase):
def create_result_link(
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/test_fetches.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
try:
import pyarrow as pa
except ImportError:
pa=None
pa = None

import databricks.sql.client as client
from databricks.sql.utils import ExecuteResponse, ArrowQueue


@pytest.mark.skipif(pa is None, reason="PyArrow is not installed")
class FetchTests(unittest.TestCase):
"""
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/test_fetches_bench.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import unittest
from unittest.mock import Mock

try:
import pyarrow as pa
except ImportError:
pa=None
pa = None
import uuid
import time
import pytest

import databricks.sql.client as client
from databricks.sql.utils import ExecuteResponse, ArrowQueue


@pytest.mark.skipif(pa is None, reason="PyArrow is not installed")
class FetchBenchmarkTests(unittest.TestCase):
"""
Expand Down
6 changes: 4 additions & 2 deletions tests/unit/test_thrift_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
from unittest.mock import patch, MagicMock, Mock
from ssl import CERT_NONE, CERT_REQUIRED
from urllib3 import HTTPSConnectionPool

try:
import pyarrow
except ImportError:
pyarrow=None
pyarrow = None
import databricks.sql
from databricks.sql import utils
from databricks.sql.types import SSLOptions
Expand All @@ -28,7 +29,8 @@ def retry_policy_factory():
"_retry_delay_default": (float, 5, 1, 60),
}

@pytest.mark.skipif(pyarrow is None,reason="PyArrow is not installed")

@pytest.mark.skipif(pyarrow is None, reason="PyArrow is not installed")
class ThriftBackendTestSuite(unittest.TestCase):
okay_status = ttypes.TStatus(statusCode=ttypes.TStatusCode.SUCCESS_STATUS)

Expand Down
Loading