Skip to content

Commit e42f978

Browse files
jprakash-dbwyattscarpenter
authored andcommitted
Merging changes from v3.7.1 release (databricks#488)
* Increased the number of retry attempts allowed (databricks#486) Updated the number of attempts allowed * bump version to 3.7.1 (databricks#487) bumped up version * Refractore * Minor change Signed-off-by: wyattscarpenter <[email protected]>
1 parent e229a9d commit e42f978

7 files changed

+17
-5
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
- 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.
66
- Pyarrow dependency is now optional in `databricks-sql-connector`. Users needing arrow are supposed to explicitly install pyarrow
77

8+
# 3.7.1 (2025-01-07)
9+
10+
- Relaxed the number of Http retry attempts (databricks/databricks-sql-python#486 by @jprakash-db)
11+
812
# 3.7.0 (2024-12-23)
913

1014
- Fix: Incorrect number of rows fetched in inline results when fetching results with FETCH_NEXT orientation (databricks/databricks-sql-python#479 by @jprakash-db)

src/databricks/sql/thrift_backend.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
_retry_policy = { # (type, default, min, max)
6868
"_retry_delay_min": (float, 1, 0.1, 60),
6969
"_retry_delay_max": (float, 30, 5, 3600),
70-
"_retry_stop_after_attempts_count": (int, 5, 1, 60),
70+
"_retry_stop_after_attempts_count": (int, 30, 1, 60),
7171
"_retry_stop_after_attempts_duration": (float, 900, 1, 86400),
7272
"_retry_delay_default": (float, 5, 1, 60),
7373
}

tests/unit/test_arrow_queue.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import unittest
22
import pytest
3+
34
try:
45
import pyarrow as pa
56
except ImportError:
67
pa = None
78
from databricks.sql.utils import ArrowQueue
89

10+
911
@pytest.mark.skipif(pa is None, reason="PyArrow is not installed")
1012
class ArrowQueueSuite(unittest.TestCase):
1113
@staticmethod

tests/unit/test_cloud_fetch_queue.py

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import databricks.sql.utils as utils
1111
from databricks.sql.types import SSLOptions
1212

13+
1314
@pytest.mark.skipif(pyarrow is None, reason="PyArrow is not installed")
1415
class CloudFetchQueueSuite(unittest.TestCase):
1516
def create_result_link(

tests/unit/test_fetches.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
try:
66
import pyarrow as pa
77
except ImportError:
8-
pa=None
8+
pa = None
99

1010
import databricks.sql.client as client
1111
from databricks.sql.utils import ExecuteResponse, ArrowQueue
1212

13+
1314
@pytest.mark.skipif(pa is None, reason="PyArrow is not installed")
1415
class FetchTests(unittest.TestCase):
1516
"""

tests/unit/test_fetches_bench.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
import unittest
22
from unittest.mock import Mock
3+
34
try:
45
import pyarrow as pa
56
except ImportError:
6-
pa=None
7+
pa = None
78
import uuid
89
import time
910
import pytest
1011

1112
import databricks.sql.client as client
1213
from databricks.sql.utils import ExecuteResponse, ArrowQueue
1314

15+
1416
@pytest.mark.skipif(pa is None, reason="PyArrow is not installed")
1517
class FetchBenchmarkTests(unittest.TestCase):
1618
"""

tests/unit/test_thrift_backend.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
from unittest.mock import patch, MagicMock, Mock
77
from ssl import CERT_NONE, CERT_REQUIRED
88
from urllib3 import HTTPSConnectionPool
9+
910
try:
1011
import pyarrow
1112
except ImportError:
12-
pyarrow=None
13+
pyarrow = None
1314
import databricks.sql
1415
from databricks.sql import utils
1516
from databricks.sql.types import SSLOptions
@@ -28,7 +29,8 @@ def retry_policy_factory():
2829
"_retry_delay_default": (float, 5, 1, 60),
2930
}
3031

31-
@pytest.mark.skipif(pyarrow is None,reason="PyArrow is not installed")
32+
33+
@pytest.mark.skipif(pyarrow is None, reason="PyArrow is not installed")
3234
class ThriftBackendTestSuite(unittest.TestCase):
3335
okay_status = ttypes.TStatus(statusCode=ttypes.TStatusCode.SUCCESS_STATUS)
3436

0 commit comments

Comments
 (0)