File tree Expand file tree Collapse file tree
src/databricks/sql/backend/kernel Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 ``ExecutedAsyncStatement.await_result()``. No statement id; no
1010 cancel.
1111
12- Both implement the same three methods this class actually calls:
13- ``arrow_schema() / fetch_next_batch() / close()``. ``KernelResultSet``
14- takes either via the ``kernel_handle`` parameter and treats them
15- uniformly — the connector's ``ResultSet`` contract doesn't need to
16- distinguish them.
17-
18- Buffer shape mirrors the prior ADBC POC's ``AdbcResultSet``: a FIFO
19- of pyarrow ``RecordBatch``es, fed one batch at a time from the
12+ Both implement ``arrow_schema() / fetch_next_batch() / close()``.
13+ ``KernelResultSet`` takes either via the ``kernel_handle`` parameter and
14+ treats them uniformly — the connector's ``ResultSet`` contract doesn't
15+ need to distinguish them. Newer kernels also have ``schema_key()`` and
16+ ``fetch_all_rows()``: the schema key looks the cached description up
17+ without calling ``arrow_schema()``, and the first row fetch (unless an
18+ Arrow fetch came first) gets a small result's rows as Python values in
19+ one ``fetch_all_rows()`` call.
20+
21+ Otherwise the buffer mirrors the prior ADBC POC's ``AdbcResultSet``: a
22+ FIFO of pyarrow ``RecordBatch``es, fed one batch at a time from the
2023kernel as the connector calls ``fetch*``. ``fetchmany(n)`` slices
2124within a batch when ``n`` is smaller than the kernel's natural
2225batch size; ``fetchall`` drains the whole stream.
You can’t perform that action at this time.
0 commit comments