fix: skip row limit enforcement for EXPLAIN queries#8888
Open
VishakBaddur wants to merge 3 commits intomarimo-team:mainfrom
Open
fix: skip row limit enforcement for EXPLAIN queries#8888VishakBaddur wants to merge 3 commits intomarimo-team:mainfrom
VishakBaddur wants to merge 3 commits intomarimo-team:mainfrom
Conversation
Fixes marimo-team#8328 EXPLAIN queries were being truncated to the default result limit (e.g. 10 rows) before the EXPLAIN-specific display logic ran. This meant extract_explain_content() only saw the truncated data, and users had no way to scroll through the full EXPLAIN output. Fix: add not is_explain_query(query) to the enforce_own_limit condition so EXPLAIN queries bypass the row limit entirely.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Bundle ReportBundle size has no change ✅ Affected Assets, Files, and Routes:view changes for bundle: marimo-esmAssets Changed:
|
22b290c to
fc31568
Compare
for more information, see https://pre-commit.ci
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.
Fixes #8328
Root Cause
EXPLAIN queries were being truncated to the default result limit (e.g. 10 rows) before the EXPLAIN-specific display logic ran.
enforce_own_limitwasTruefor EXPLAIN queries, sodf.limit()/df.head()truncated the dataframe first. Thenextract_explain_content()only saw the truncated data — and sinceplain_text()has no pagination, users had no way to scroll through the full output.Fix
One-line change: add
not is_explain_query(query)to theenforce_own_limitcondition:EXPLAIN queries now bypass the row limit entirely, so all rows are passed to
extract_explain_content().Testing
Added
test_explain_query_not_truncated_by_limittotests/_sql/test_duckdb.py: verifies that EXPLAIN output is not truncated whenMARIMO_SQL_DEFAULT_LIMITis set.