fix(datafusion): strip trailing semicolon on unlimited query path - #2585
fix(datafusion): strip trailing semicolon on unlimited query path#2585Bartok9 wants to merge 1 commit into
Conversation
Closes nothing — LocalRuntime rejects client SQL ending in `;` on the unlimited path the same way the limited subquery wrap already handled.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughThe DataFusion connector now strips trailing semicolons before executing queries in both limited and unlimited paths. Unit tests cover semicolons with and without trailing whitespace or newlines. ChangesDataFusion SQL cleanup
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 |
Code reviewTwo problems, one of which applies to #2594 as well. 1. Duplicate. #2594 makes the same change to the same file with the same test filename, opened a day later. One of the two should close; #2594's diff is the smaller of the pair. 2. The stated justification is not true. The comment claims the unlimited path needs stripping because: WrenAI/core/wren/src/wren/connector/datafusion.py Lines 29 to 42 in 5ef0ed4 The DataFusion connector executes through All four succeed, including the double terminator. There is no rejection to avoid on this path. That does not necessarily kill the change — aligning DataFusion with |
|
Thanks for the careful check — you're right, |
Summary
query()beforectx.query.Motivation
Limited queries already stripped before wrap. Unlimited still forwarded raw
SELECT 1;, which LocalRuntime rejects for single-statement execution.Verification
core/wren/.venv/bin/python -m pytest tests/unit/test_datafusion_semicolon.py -q— 8 passedDuplicate check
Summary by CodeRabbit