fix(datafusion): strip trailing semicolon before dry_run - #2463
Conversation
|
Warning Review limit reached
Next review available in: 57 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Walkthrough
ChangesDataFusion dry-run semicolon handling
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ac3ad80 to
094e3d8
Compare
|
#2478 fixed the building failure of |
DataFusion rejects trailing semicolons the same way limit wraps do. Reuse the existing strip helper on dry_run so EXPLAIN-style validation matches query behavior.
094e3d8 to
2da09b4
Compare
Summary
dry_runvia the existing helper already used byquery.;no longer fails validation while limit wraps already worked.Motivation
Other connectors (postgres, redshift, duckdb, databricks, athena) neutralize trailing semicolons before dry-run / subquery wrap. DataFusion already stripped before LIMIT wraps in
query, butdry_runpassed SQL through verbatim, soSELECT 1;still hit the parser as multi-statement / invalid at plan time. Reuse_strip_trailing_semicolonso dry-run matches query behavior without inventing a second path.Verification
cd core/wren && .venv/bin/python -m pytest tests/unit/test_datafusion_semicolon.py -q— 7 passeddry_run("SELECT 1;")now invokesctx.dry_run("SELECT 1");SELECT ';' AS xpreservedcore/**License
Touches
core/wren/**only (Apache-2.0).Summary by CodeRabbit
Bug Fixes
dry_runSQL preprocessing by stripping only trailing semicolons and surrounding trailing whitespace/newlines.Tests
dry_run("SELECT 1;"),dry_run("SELECT 1; \n"), anddry_run("SELECT ';' AS x").