Repository navigation
feat(napi): expose intervalsAsString + complexTypesAsJson on openSession - #96
Closed
msrathore-db wants to merge 1 commit into
Closed
msrathore-db wants to merge 1 commit into
msrathore-db wants to merge 1 commit into
Conversation
Surface the kernel's ResultConfig.intervals_as_string and complex_types_as_json knobs on the napi ConnectionOptions, threaded onto the SessionBuilder via `builder.result(ResultConfig)` (mirrors the pyo3 Session.__new__ surface). Omitted ⇒ kernel default (native Arrow month_interval / duration[us] and native nested types). Motivation: the NodeJS Thrift driver surfaces INTERVAL columns as strings, so the SEA driver needs intervals_as_string=true for byte-compatible result parity (verified via the node comparator — interval columns then match Thrift in both type code and value). complex_types_as_json is exposed alongside for completeness; the SEA driver leaves it at the native-Arrow default (which already decodes identically to Thrift). Co-authored-by: Isaac Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
This was referenced May 31, 2026
Collaborator
Author
|
Closing as superseded by #101, which is now the main-based kernel SEA parity mega PR for agent review. The branch is preserved and this can be reopened if we decide to return to smaller stacked reviews. |
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.
What
Surface the kernel's
ResultConfig.intervals_as_stringandcomplex_types_as_jsonknobs on the napiConnectionOptions, threaded ontoSessionBuilderviabuilder.result(ResultConfig)— mirroring the pyo3Session.__new__surface. Omitted ⇒ kernel default (native Arrowmonth_interval/duration[us]and native nested types).Why
The NodeJS Thrift driver surfaces
INTERVALcolumns as strings, while the kernel defaults to native Arrow interval/duration types. Running the node comparator thrift-vs-SEA, interval columns were the onlySTATEMENT_SELECTdivergence (Thrift type 7 STRING vs kernel type 21 INTERVAL). Exposingintervals_as_stringlets the SEA NodeJS driver set ittrueand become a byte-compatible drop-in — confirmed: interval columns then match Thrift in both type code and value.complex_types_as_jsonis exposed alongside for completeness (the SEA driver keeps the native-Arrow default, which already decodes identically to Thrift).Verified identical behaviour in the Python kernel binding:
Session(..., intervals_as_string=True)→ Arrowstring; default →month_interval/duration[us].Scope
Stacked on #95. Only
napi/src/database.rs(the twoConnectionOptionsfields +builder.result(...)wiring + test-fixture fields). No param/codec changes — positional params are #84.Tests
cargo build/fmt/clippy -D warningsclean; 41 napi tests pass.This pull request and its description were written by Isaac.
Downstream fixes / reviewer note
intervalsAsString: trueso INTERVAL result columns match the Thrift driver without relying on the earlier JS-side workaround.