refactor(timeseriesql): shared scan module and split to_clickhouse - #110
Conversation
Unify quote/regex/paren masking across SELECT and DDL paths via scan.rs, split the monolithic ClickHouse translator into submodules, and fix conservative OR time-bound extraction for WITH FILL anchoring.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit fb37aa6. Configure here.
There was a problem hiding this comment.
Stale comment
Left a non-blocking comment: Cursor Bugbot completed with 1 unresolved finding (quoted BEGIN/END masking in statement splitting), so this is not approved. Human review is needed; no reviewer assignment tool is available in this run.
Sent by Cursor Approval Agent: Pull Request Router and Approver
Detect CQ block keywords via scan-aware matching so substrings inside string literals or other masked spans do not affect begin_depth.
There was a problem hiding this comment.
Stale comment
Left a non-blocking comment: Cursor Bugbot previously reported 1 unresolved finding (quoted BEGIN/END masking in statement splitting), and no current approving review exists, so this is not approved. Human review is needed; reviewer assignment is unavailable in this run.
Sent by Cursor Approval Agent: Pull Request Router and Approver
There was a problem hiding this comment.
Stale comment
Left a non-blocking comment: Cursor Bugbot’s prior finding remains unresolved (quoted BEGIN/END masking in statement splitting), and there is no current approving review, so this is not approved. Human review is needed; reviewer assignment is unavailable in this run.
Sent by Cursor Approval Agent: Pull Request Router and Approver



Summary
scan.rsfor quote/regex/paren masking used by both the SELECT clause scanner and DDL lexer, eliminating regex/division drift between parsing paths.to_clickhouse.rsinto focused submodules (select,conditions,aggregates,materialized_view,time_bounds, etc.) with public API preserved via re-exports.extract_time_boundsfor WITH FILL anchoring: envelope min/max only when every OR disjunct defines that side; add regression tests for partial-bound OR andsplit_statementsparen/semicolon behavior.Test plan
cargo test --lib timeseriesql::(210 passed)cargo test --test compat(215 passed)cargo clippy --lib -p hyperbytedb -- -D warningsMade with Cursor