Repository navigation
fix(wren): multiline subquery wrap to prevent trailing comment swallowing (#2733) - #2754
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. WalkthroughCanner, ClickHouse, Databricks, and DataFusion now place inner SQL on separate lines in the affected subquery wrappers. Tests verify the formatting and cover trailing line comments in limited-query and dry-run paths. ChangesSQL wrapper fix
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The affected wrappers separate trailing line comments from closing syntax, and the regression tests cover those cases. No actionable merge risk remains in the reviewed changes. 🚥 Pre-merge checks | ✅ 2 | ❌ 1 | ❓ 2❌ Failed checks (1 warning, 2 inconclusive)
✅ Passed checks (2 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. A rabbit checks the SQL line, Comment |
|
@FrancescoCastaldi, thanks for working on this. There are some conflicts. Could you resolve them? |
85eee1d to
5492391
Compare
|
@goldmedal Rebased on latest main and resolved the conflicts in canner.py and databricks.py. All 75 connector unit tests are passing cleanly. |
goldmedal
left a comment
There was a problem hiding this comment.
Thanks @FrancescoCastaldi 👍
Summary
Closes #2733.
When user SQL ends in a --\ line comment, wrapping the SQL in a single-line subquery (\SELECT * FROM ({sql}) AS ...) causes the closing parenthesis, table alias, and LIMIT clause to be swallowed by the line comment.
This was previously fixed for \postgres\ (#2728), \oracle,
edshift, and \ rino\ (#2736), and \�igquery\ / \duckdb. This PR finishes the remaining connectors identified in #2733:
Changes
Verification
uff check\ and
uff format --check: all clean.
Summary by CodeRabbit