Skip to content

feat: enrich SQL bind errors with node span and near-sql context#306

Merged
KKould merged 7 commits intomainfrom
feat/error_span
Mar 2, 2026
Merged

feat: enrich SQL bind errors with node span and near-sql context#306
KKould merged 7 commits intomainfrom
feat/error_span

Conversation

@KKould
Copy link
Member

@KKould KKould commented Mar 2, 2026

What problem does this PR solve?

Upgraded sqlparser-rs to support more precise error location reporting where possible, improving interaction experience

example:

column: `missing_col` not found
--> line 1
1 | select id, missing_col from t_bind_span
  |

support for

  • DatabaseError::CastFail
  • DatabaseError::InvalidColumn
  • DatabaseError::ColumnNotFound
  • DatabaseError::InvalidTable
  • DatabaseError::FunctionNotFound
  • DatabaseError::ParametersNotFound
  • DatabaseError::NotNull

chore:

  • add where_by_index.slt and stream_distinct.slt for explain test
  • support multi-statement execution in run() and transaction run()

Code changes

  • Has Rust code change
  • Has CI related scripts change

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Note for reviewer

@KKould KKould added the enhancement New feature or request label Mar 2, 2026
@KKould KKould self-assigned this Mar 2, 2026
@KKould KKould merged commit 2eb03c6 into main Mar 2, 2026
12 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant