feat(cubesql): Improve UX for parsing errors#10984
Conversation
2d9017a to
bf33812
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #10984 +/- ##
==========================================
+ Coverage 78.75% 78.82% +0.07%
==========================================
Files 470 471 +1
Lines 93902 94322 +420
Branches 3466 3494 +28
==========================================
+ Hits 73953 74351 +398
- Misses 19446 19461 +15
- Partials 503 510 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Render a source snippet with a caret under the offending location for SQL parser errors, so the user sees where the query broke instead of just a line/column number. Locations come from the parser error message (or end-of-input for EOF), with token-aware caret placement: - snap to the start of a word the parser stopped just after (`MEASURE(`) - snap to the end of the last token for `;` / EOF (`SELECT FROM`) - underline the whole literal for unterminated strings (`'abc`)
bf33812 to
f54ee80
Compare
|
Claude finished @ovr's task in 1m 40s —— View job Code ReviewNice, focused UX improvement. The Findings — 0 high, 0 medium, 3 low/nitLow — latent underflow in
|
|
Claude finished @ovr's task in 1m 24s —— View job Code Review — follow-up on
|
Same-line branch subtracted the un-clamped start.column from a clamped end_col, underflowing for a span entirely past end of line. Clamp both operands to the same ceiling and floor end_col to start_col.
|
Claude finished @ovr's task in 34s —— View job Code Review — follow-up on
|
Render a source snippet with a caret under the offending location for SQL parser errors, so the user sees where the query broke instead of just a line/column number.
Locations come from the parser error message (or end-of-input for EOF), with token-aware caret placement:
MEASURE();/ EOF (SELECT FROM)'abc)