Skip to content

fix(connector): use public strip_trailing_semicolon in dry_run paths - #2550

Merged
goldmedal merged 1 commit into
Canner:mainfrom
Bartok9:fix/strip-trailing-semicolon-name
Jul 20, 2026
Merged

fix(connector): use public strip_trailing_semicolon in dry_run paths#2550
goldmedal merged 1 commit into
Canner:mainfrom
Bartok9:fix/strip-trailing-semicolon-name

Conversation

@Bartok9

@Bartok9 Bartok9 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Test plan

Summary by CodeRabbit

  • Bug Fixes
    • Improved SQL dry-run validation for DataFusion and Snowflake connections.
    • Trailing semicolons are now handled consistently, helping prevent unnecessary validation failures when previewing or checking SQL statements.
    • Existing dry-run error handling and query metadata remain unchanged.

Main still calls the old private alias _strip_trailing_semicolon in
DataFusion and Snowflake dry_run after the helper was renamed/exported
as strip_trailing_semicolon on base. That completes as NameError/F821
on every PR merge against main (lint + unit). Point both call sites at
the imported public helper.
@github-actions github-actions Bot added python Pull requests that update Python code core labels Jul 20, 2026
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: fd7432b8-5d1a-47d8-ab51-ef51ad761631

📥 Commits

Reviewing files that changed from the base of the PR and between 2b0b335 and 0c68f86.

📒 Files selected for processing (2)
  • core/wren/src/wren/connector/datafusion.py
  • core/wren/src/wren/connector/snowflake.py

Walkthrough

DataFusion and Snowflake dry-run methods now use strip_trailing_semicolon(sql) instead of their prior local helper before processing SQL.

Changes

SQL normalization

Layer / File(s) Summary
Dry-run semicolon handling
core/wren/src/wren/connector/datafusion.py, core/wren/src/wren/connector/snowflake.py
DataFusion and Snowflake dry-run paths use the shared strip_trailing_semicolon helper before engine dry-run and cursor description calls.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers: goldmedal

Poem

A bunny trims SQL with care,
One shared helper hops everywhere.
DataFusion’s query runs clean,
Snowflake’s describe stays serene.
Semicolons tucked away—
A tidy trail for tests today!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: switching dry_run paths to the public strip_trailing_semicolon helper.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@goldmedal

Copy link
Copy Markdown
Collaborator

Thanks @Bartok9

@goldmedal
goldmedal merged commit 4e0c4f3 into Canner:main Jul 20, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants