fix: preserve row mode in native pipelines - #3742
Open
zfaustk wants to merge 1 commit into
Open
Conversation
1 task
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 changed
Native pipeline entries now retain each query's array mode, and
pg-nativeuses that mode when it builds the corresponding pipeline result.The regression test mixes
rowMode: 'array'and the default object mode in one connected pipeline batch, so it also verifies that row mode does not leak between queries.Why
The non-pipeline native path applies
NativeQuery._arrayModebefore reading a result, but the pipeline path dropped that per-query value. ArowMode: 'array'query therefore returned object rows whenpipeline: true.This is observable downstream in drizzle-team/drizzle-orm#6118: interpreted mapping produced
undefinedfields and JIT mapping threwTypeError: object is not iterable.Verification
ff9d775in native mode (object row returned instead of[10]).pgunit suite passes.The canonical full
yarn testmatrix was not completed locally: its Yarn 1 workspace install caches unrelated multi-platform optional binaries beyond this executor's bounded disk budget. GitHub CI remains the authoritative full matrix.Compatibility
No public API is added or changed. The native pipeline path now matches the existing per-query
rowModebehavior of the non-pipeline and JavaScript clients.AI assistance
Codex was used for investigation, implementation, and test execution. No human-review attestation is made.