Skip to content

Commit 3004541

Browse files
aakash-saravanan-dbIsaac
andcommitted
refactor!: remove the deprecated use_sea backend
The pure-Python SEA backend is superseded by use_kernel=True. Delete backend/sea/ with its unit tests and experimental examples, and drop the use_sea cases from the e2e suites. connect() now raises ValueError for use_sea=True before any auth, HTTP client or telemetry setup, pointing callers to use_kernel=True. The SEA-only use_hybrid_disposition and max_connections options are gone. SqlType moves into kernel/type_mapping.py, its only remaining user. Connection.__del__ now tolerates a Connection whose __init__ raised before a session was assigned. Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com> Co-authored-by: Isaac <no-reply@databricks.com>
1 parent 087b2bf commit 3004541

38 files changed

Lines changed: 184 additions & 7239 deletions

‎.bot/prompts/engineer/system.md‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,11 @@ up whatever it needs.
106106
== HOW TO WORK (bug-fix flow) ==
107107

108108
0. **Pick the BACKEND the bug is on — reproduce on that one.** The connector has
109-
three backends and a bug on one won't reproduce on another. Choose from the
109+
two backends and a bug on one won't reproduce on another. Choose from the
110110
issue:
111111
- **kernel** (`use_kernel=True`) — only if the issue is specifically about the
112112
Rust kernel / `use_kernel`. Repro in `tests/e2e/test_kernel_backend.py` and run
113113
it alone (it needs the real wheel; see the `-m "not realkernel"` note above).
114-
- **SEA** (`use_sea=True`) — if the issue implicates SEA, or the area is
115-
backend-parametrized (add the `{"use_sea": True}` param case).
116114
- **Thrift** (the default, no kwarg) — everything else; this is the common case.
117115
See CONTRIBUTING.md → "Backends and test tiers" for the full matrix (selection
118116
kwarg + where each backend's tests live).

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Release History
22

33
# Unreleased
4+
- Remove the deprecated pure-Python SEA backend. Passing `use_sea=True` now raises `ValueError`; use `use_kernel=True` to connect through the Rust kernel instead. The SEA-only `use_hybrid_disposition` and `max_connections` options are removed and ignored if passed.
45
- Honor `max_download_threads` on kernel connections, with a default download window of 16 and explicit chunk-setting overrides. Invalid values raise `ValueError` when connecting with `use_kernel=True`.
56
- Fix the kernel backend ignoring `use_cloud_fetch=False`, so complete results can be fetched without cloud-storage downloads.
67
- Fix inline parameters (`use_inline_params=True`) so a sequence directly after `IN` renders as a list again: `x IN %(ids)s` renders as `x IN (1,2,3)` instead of `x IN ARRAY(1,2,3)`, which Spark rejects. Inside the list, tuples render as rows for a multi-column `IN`, and a `set` or `frozenset` is accepted again. Sequences anywhere else still render as `ARRAY(...)` ([#629](https://github.com/databricks/databricks-sql-python/issues/629))

‎CONNECTION_PARAMETERS.md‎

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ but ignored (or rejected) on the other is called out in the **Note** column.
1919
> does **not** splat `**kwargs`. Options implemented in the shared Python driver
2020
> layer can still apply to both backends; unforwarded backend-specific options
2121
> are ignored or rejected on the kernel path.
22-
>
23-
> A separate pure-Python **SEA** backend (`use_sea=True`) also exists but is
24-
> being deprecated. Its selector and SEA-only hybrid-disposition option are
25-
> listed for completeness, but this reference does not provide a third SEA
26-
> support column.
2722
2823
## Legend
2924

@@ -58,12 +53,9 @@ to change without notice.
5853

5954
## Backend selection
6055

61-
| Option | Type | Thrift | Kernel | Default Value | Note |
62-
| ------------------------ | ------ | :----: | :----: | ------------- | -------------------------------------------------------------------------------------------------- |
63-
| `use_kernel` | `bool` | — | — | `False` | Routing selector: `False` selects Thrift; `True` selects Kernel. Mutually exclusive with `use_sea`. |
64-
| `use_sea` | `bool` | — | — | `False` | Select the deprecated pure-Python SEA backend. Mutually exclusive with `use_kernel`. |
65-
| `use_hybrid_disposition` | `bool` | ❌ | ❌ | `False` | SEA-only result-disposition option; ignored by Thrift and Kernel. |
66-
| `max_connections` | `int` | ❌ | ❌ | `10` | Internal SEA-only HTTP-pool limit; ignored by Thrift and Kernel. |
56+
| Option | Type | Thrift | Kernel | Default Value | Note |
57+
| ------------ | ------ | :----: | :----: | ------------- | ---------------------------------------------------------------- |
58+
| `use_kernel` | `bool` | — | — | `False` | Routing selector: `False` selects Thrift; `True` selects Kernel. |
6759

6860
---
6961

‎CONTRIBUTING.md‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,13 @@ The suites marked `[not documented]` require additional configuration which will
146146

147147
#### Backends and test tiers
148148

149-
The connector has **three execution backends**, selected per connection. When you
149+
The connector has **two execution backends**, selected per connection. When you
150150
reproduce or fix a bug, use the backend the bug is actually on — a Thrift bug won't
151-
reproduce on a SEA or kernel connection, and vice versa:
151+
reproduce on a kernel connection, and vice versa:
152152

153153
| Backend | Select via (connect kwarg / `extra_params`) | Where its tests live |
154154
| --- | --- | --- |
155-
| **Thrift** (default) | *(nothing — the default path)* | the general `tests/e2e` suite (the `{}` parametrize case) and mocked `tests/unit` |
156-
| **SEA** (Statement Execution API) *(deprecated — use Kernel for SEA-native connections)* | `use_sea=True` | the general `tests/e2e` suite (the `{"use_sea": True}` parametrize case, e.g. `tests/e2e/test_driver.py`) and mocked `tests/unit` |
155+
| **Thrift** (default) | *(nothing — the default path)* | the general `tests/e2e` suite and mocked `tests/unit` |
157156
| **Kernel** (Rust, optional) | `use_kernel=True` | the dedicated `tests/e2e/test_kernel_backend.py` / `test_kernel_tls.py`, plus the offline routing test `tests/unit/test_session.py -m realkernel` |
158157

159158
Notes that matter when running the suite:

‎examples/experimental/sea_connector_test.py‎

Lines changed: 0 additions & 126 deletions
This file was deleted.

‎examples/experimental/tests/__init__.py‎

Whitespace-only changes.

0 commit comments

Comments
 (0)