Repository navigation
Conversation
ddd4189 to
4e204af
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughDataFusion query and dry-run paths now strip trailing semicolons and whitespace before execution. Unit tests update no-limit query expectations and add coverage for no-limit queries and dry runs. ChangesDataFusion SQL normalization
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
core/wren/tests/unit/test_datafusion_semicolon.py (1)
64-68: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
test_query_without_limit_strips_trailing_semicolonduplicatestest_query_without_limit_is_unwrapped.Both tests call
connector.query("SELECT 1;")and assertsent == "SELECT 1"— identical coverage. Consider consolidating, or differentiate one to cover an additional case (e.g., trailing whitespace + semicolon:"SELECT 1; ").Additionally, in
test_dry_run_strips_trailing_semicolon(Lines 73-74), theif not hasattr(ctx, "dry_run")guard is dead code becausectxis aMagicMock, which auto-creates any attribute on access. The mock can be set unconditionally.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@core/wren/tests/unit/test_datafusion_semicolon.py` around lines 64 - 68, The semicolon tests duplicate coverage, and the dry-run mock setup contains an ineffective attribute guard. Differentiate test_query_without_limit_strips_trailing_semicolon by covering trailing whitespace after the semicolon, and update test_dry_run_strips_trailing_semicolon to assign ctx.dry_run unconditionally without checking hasattr.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@core/wren/tests/unit/test_datafusion_semicolon.py`:
- Around line 64-68: The semicolon tests duplicate coverage, and the dry-run
mock setup contains an ineffective attribute guard. Differentiate
test_query_without_limit_strips_trailing_semicolon by covering trailing
whitespace after the semicolon, and update
test_dry_run_strips_trailing_semicolon to assign ctx.dry_run unconditionally
without checking hasattr.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: d07a192e-d6e9-4bb2-8b20-12e872c6fba9
📒 Files selected for processing (2)
core/wren/src/wren/connector/datafusion.pycore/wren/tests/unit/test_datafusion_semicolon.py
|
The shared CI failure here ( |
4e204af to
e9e4a81
Compare
|
@Bartok9, there are some conflicts. |
|
Closing as superseded — |
Summary
query()anddry_run()strip terminating semicolon/whitespace runs beforectx.query/ctx.dry_run.Motivation
Limited queries already strip before wrap. Unlimited/
dry_runstill forwarded raw client SQL ending in;, which DataFusion rejects for single-statement execution depending on path. Reuse the connector's terminating-run helper.Verification
core/wren/.venv/bin/python -m pytest tests/unit/test_datafusion_semicolon.py -q— all passedquery("SELECT 1;")without limit sendsSELECT 1.Apache path:
core/wren/**.Summary by CodeRabbit
Bug Fixes
Tests