Normalize rowLimit across connection backends - #2980
Draft
MianliWang wants to merge 1 commit into
Draft
Conversation
Signed-off-by: Rough-Egoist <mianli.wang@mail.utoronto.ca>
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
rowLimitconfiguration metadata and validation with a default of 1000malloy.configrow limits through every registered database connection factoryper-run > connection config > defaultprecedence in batch and streaming pathsFixes #2786
Root cause
rowLimitexisted as a run option, but connection factories did not consistently register or forward the same setting frommalloy.config. Individual backends then supplied independent defaults, including several hard-coded limits of 10. As a result, configuration could validate incompletely, be dropped during connection construction, or behave differently between batch and streaming execution.Resulting behavior
per-run rowLimit > connection rowLimit > 1000rowLimit: 0is valid and returns no rowsNaN, or infinite) are rejectedAreas that need focused review
packages/malloy/src/connection/query_options.tssrc/index.ts,native.ts, orbrowser.tsfilesrowLimitand pass the resolved connection value without replacing a valid zerototalRowsreporting fetched rows rather than draining the operationEXPLAINuses a one-row internal override without wrapping user SQLmalloy-config.jsonschema exposure and validation behaviorValidation
limit: 25git diff --checkpassedThe full DuckDB suite also reaches two unrelated Windows idle file-lock failures; the focused row-limit and zero-streaming tests pass. A companion documentation update in
malloydata/malloydata.github.iois still needed.