Repository navigation
docs(sea): update SEA feature matrix — F1/F2/F3/F3b/F4 implementations + 3 corrections - #77
Closed
msrathore-db wants to merge 2 commits into
Closed
msrathore-db wants to merge 2 commits into
msrathore-db wants to merge 2 commits into
Conversation
…s + 3 corrections Lands the SEA feature matrix at `napi-binding/docs/sea-feature-matrix.md` on `main`. The file previously lived as an untracked working draft in the `msrathore/kernel-napi-classes` worktree; this commit makes it canonical so the source-of-truth doesn't depend on a per-developer working tree. ## Status flips for the 6 in-flight SEA implementation PRs Section 2 (Session / Connection): - `Connection pool (max_connections)` NodeJS SEA: N → PR (#74 / #392) — SEA-only extension (Thrift doesn't expose this knob) - `Complex types as Arrow (not JSON strings)` NodeJS SEA: N → Y (kernel default, e2e-locked PR #392 against pecotesting) Section 3 (Statement / Execution): - `Async execute (submit + poll)` NodeJS SEA: N → PR (#76 / #394) — napi `AsyncStatement` + `AsyncResultHandle` - `Compound types (ARRAY/MAP/STRUCT as Arrow)` NodeJS SEA: N → Y (kernel default, e2e-locked PR #392) - `Statement conf map` NodeJS SEA: N → PR (#75 / #393 — `ExecuteOptions.statementConf`) - `Query tags` NodeJS SEA: N → PR (#75 / #393 — byte-identical Thrift `serializeQueryTags` wire shape) Section 4 (Result / Fetch): - `Fetch all (drain to table)` NodeJS SEA: N → Y (facade `DBSQLOperation.fetchAll` already routes through `SeaOperationBackend.fetchChunk`; e2e regression-locked PR #393) ## Three matrix corrections found while researching These three rows had Thrift-side claims that didn't match the Thrift code. Verified each by re-reading the cited Thrift source path. 1. **Wait timeout / queryTimeout — Thrift: N → Y** `lib/contracts/IDBSQLSession.ts:13` declares `queryTimeout?: number | bigint | Int64` on `ExecuteStatementOptions`; `lib/DBSQLSession.ts:220` forwards it to `TExecuteStatementReq.queryTimeout`. The matrix previously said Thrift = N (matched only the "explicitly rejected on SEA" note); the public Thrift surface DOES expose this knob. Corrected. 2. **Row limit — Thrift: Y → N** `lib/contracts/IDBSQLSession.ts:7-30` enumerates `ExecuteStatementOptions` fields: `queryTimeout`, `maxRows`, `useCloudFetch`, `useLZ4Compression`, `stagingAllowedLocalPath`, `namedParameters`, `ordinalParameters`, `queryTags`. NO `rowLimit`. The only way to cap rows on the Thrift path is `LIMIT N` in the SQL itself. Corrected; new note 5 explains the kernel-side `ExecuteParams.row_limit` field that's wire-present but not on `StatementSpec`. 3. **Max rows per fetch — semantics divergence (single row was conflating two features)** Thrift's `maxRows` is a "direct-results first-batch hint" populating `TExecuteStatementReq` via `getDirectResultsOptions`; Python `use_sea`'s `max_rows=` is a "per-fetch row cap" on `fetch_many_arrow`. They are not the same feature despite sharing a name. The SEA path through the kernel uses Arrow-batch streaming with server-driven batch sizing, so neither maps cleanly. Listed as "deferred — concept does not map cleanly" for NodeJS SEA. New note 6 documents the semantics divergence. ## Cross-PR refs Implementation PRs cited in the matrix: - #74 `msrathore/krn-max-connections` (kernel — napi `maxConnections`) - #75 `msrathore/krn-statement-options` (kernel — napi `ExecuteOptions`) - #76 `msrathore/krn-async-execute` (kernel — napi `AsyncStatement`) - #392 `msrathore/sea-max-connections` (NodeJS — F1 + F2) - #393 `msrathore/sea-statement-options` (NodeJS — F3 + F4) - #394 `msrathore/sea-async-execute` (NodeJS — F3b) ## What this PR is NOT - No code changes. Documentation only. - Does NOT depend on any of #74/#75/#76/#392/#393/#394 being merged first — the matrix can land independently and stay current as the rest of the stack lands. - Does NOT touch PR #25's branch (which holds the prior working-draft copy of this file). Putting the file on `main` avoids dismissing PR #25's approvals. ## What still belongs in the matrix as deferred (per scope rubric) - Positional/named params, TIMESTAMP/_NTZ/_LTZ/VARIANT params, row_limit: documented as "still deferred" in the updated Section 6 gaps subsection, with the kernel-side `StatementSpec` extension noted as the blocking prerequisite for row_limit. Co-authored-by: Isaac Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
…nf map Add a Quick-reference section at the top mapping the six implementation PRs (#74/#75/#76/#392/#393/#394) to features + test counts, plus a Python comparison table showing how each feature maps to Python's `use_sea=True` / `use_kernel=True` reference implementations. Scope-down the Statement conf map + Query tags rows in Section 3 to clarify the implementation is napi-only — the public NodeJS `ExecuteStatementOptions` surface does not yet expose them. Wiring to public API is a follow-up increment. Documented as Note 7. Addresses DA's round-3 PR #77 review point on Statement conf map scope. Co-authored-by: Isaac Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
Collaborator
Author
|
Closing — this is internal working documentation, not appropriate for the kernel repo. The SEA feature matrix references internal-only NodeJS workflow decisions, private PR numbers across the NodeJS repo, and team-internal jira-candidate references. Keeping it as a local reference doc instead. Branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lands
napi-binding/docs/sea-feature-matrix.mdonmainas a single signed commit. The file previously existed as an untracked working draft on themsrathore/kernel-napi-classesbranch's worktree — this PR makes it canonical so the source-of-truth doesn't depend on a per-developer working tree, and the matrix can be kept current independently of the in-flight feature stack.Status flips for the 6 in-flight SEA implementation PRs
Section 2 (Session / Connection):
Connection pool (max_connections)NodeJS SEA: N →PR (#74 / #392)— SEA-only extension (Thrift doesn't expose this knob)Complex types as Arrow (not JSON strings)NodeJS SEA: N → Y — kernel defaultcomplex_types_as_json=false; e2e-locked against pecotestingSection 3 (Statement / Execution):
Async execute (submit + poll)NodeJS SEA: N →PR (#76 / #394)— napi `AsyncStatement` + `AsyncResultHandle`Compound types (ARRAY/MAP/STRUCT as Arrow)NodeJS SEA: N → Y — same kernel default; e2e-lockedStatement conf mapNodeJS SEA: N →PR (#75 / #393)— `ExecuteOptions.statementConf`Query tagsNodeJS SEA: N →PR (#75 / #393)— byte-identical Thrift `serializeQueryTags` wire shapeSection 4 (Result / Fetch):
Fetch all (drain to table)NodeJS SEA: N → Y — facade `DBSQLOperation.fetchAll` already routes through `SeaOperationBackend.fetchChunk` (no SEA-side code change needed); e2e regression-locked in PR fix(metadata): match list_tables table_types case-sensitively for Thrift parity #393Three matrix corrections
Each row was verified by re-reading the cited Thrift source path before flipping.
Wait timeout / queryTimeoutThriftlib/contracts/IDBSQLSession.ts:13declares `queryTimeout?: number`;lib/DBSQLSession.ts:220forwards to `TExecuteStatementReq.queryTimeout`Row limitThriftExecuteStatementOptions(lib/contracts/IDBSQLSession.ts:7-30) has NO `rowLimit` field. Only way to cap rows on Thrift is `LIMIT N` in SQLMax rows per fetchrow splitNotes 5 and 6 added to spell out the row_limit kernel-internal-only state and the max-rows-per-fetch semantics divergence.
Cross-PR refs
msrathore/krn-max-connectionsmsrathore/krn-statement-optionsmsrathore/krn-async-executemsrathore/sea-max-connectionsmsrathore/sea-statement-optionsmsrathore/sea-async-executeWhat this PR is NOT
mainavoids dismissing PR feat(napi): openSession / Connection / Statement napi surface (stack 3/8) #25's existing approvals.Test plan
git pushsucceeded; branch created cleanly offorigin/main