You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two parity-blocking issues surfaced by the python-comparator audit
(tests/comparator-tests/python/), bundled into one PR since they're
both small kernel-backend client changes:
1. Async Statement retention (was the original scope of this PR)
`KernelDatabricksClient.execute_command` closed the parent `Statement`
in `finally` regardless of `async_op`. The kernel's `Statement.close()`
invalidates child handles (see `databricks-sql-kernel/src/statement/
validity.rs`), so the async handle was being killed before the user
could poll it, breaking the entire async surface
(`execute_async` → `is_query_pending` → `get_async_execution_result`).
Fix: when `async_op=True`, retain the parent Statement in a new
`_async_statements` dict alongside `_async_handles`, and close it
from `close_command`, `close_session`, and `get_execution_result`
after the executed handle is done.
Comparator outcome: STATEMENT_ASYNC suite 3/3 match (was 0/3).
2. intervals_as_string wire-through (companion to kernel PR #64)
pyarrow's Python bindings cannot decode Arrow's `month_interval`
type at all (id 21 — raises `KeyError` from `.as_py`, `to_pylist`,
`cast(string)`, `to_pandas`). Every kernel-backend `SELECT *` over
any table with an INTERVAL YEAR TO MONTH column was throwing
`ArrowNotImplementedError` and producing no rows — 32 / 88 audit
diffs.
Fix: pass `intervals_as_string=True` to the kernel `Session(...)`
constructor unconditionally. The kernel's post-processor then
stringifies Interval / Duration columns server-side to Utf8 (see
kernel PR #64), so pyarrow never sees the unreadable type.
Comparator outcome: bucket A (ArrowNotImplementedError) drops from
32 → 0 diffs.
Depends on kernel PR #64 landing first (or being available locally for
the harness via `KERNEL_FREEZE=1`).
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
0 commit comments