Hoist trailing-semicolon strip to the engine.query/dry_run boundary
Context
Follow-up to #2497 and #2498. Once every per-connector query/validation path calls the shared strip_trailing_semicolon, the durable simplification is to strip once at the dispatch boundary and delete the per-connector calls.
Proposal
Strip in engine.query and engine.dry_run on the raw input (before dry_plan / connector dispatch). Removing a trailing statement terminator is dialect-independent, and the sqlglot parse→generate in dry_plan cannot reintroduce it, so a single strip at the boundary is safe.
Then remove the per-connector strip_trailing_semicolon calls, keeping the shared helper in connector/base.py.
Prerequisite / supersedes
- After #2480, #2497, #2498.
- Supersedes the per-connector calls those add — they become redundant once stripping happens at the boundary.
Verify before removing per-connector calls
engine.query/engine.dry_runis the sole production entry to connectors (CLI / cube paths go through the engine)- No connector relies on receiving a raw trailing
;
Done when
- Stripping happens once at the engine boundary
- Per-connector strip calls removed; shared helper retained
Optional / lower priority — the base-helper consolidation (#2480) and per-path coverage (#2497, #2498) deliver the correctness fix; this is the cleanup that removes the remaining duplication.
Source: Canner/WrenAI