altimate-code icon indicating copy to clipboard operation
altimate-code copied to clipboard

data_diff: fuzzy column-name suggestions on errors

Open anandgupta42 opened this issue 7 months ago • 1 comments

Flagged during v0.5.22 release review (End User persona).

When a user passes a misspelled column (key_columns=['ordr_id']), the tool surfaces the raw driver error via SQL execution failed for task <id>: <raw>. Drivers like ClickHouse return cryptic messages (Code: 47. DB::Exception: Missing columns: 'ordr_id').

Since we already run DESCRIBE TABLE / information_schema for auto-discovery (when extra_columns is omitted), we have the full column list available. On error we should:

  1. Match driver error patterns (Missing column, Unknown column, column not found)
  2. Pick closest match via Levenshtein
  3. Append Did you mean: 'order_id'?

File: packages/opencode/src/altimate/native/connections/data-diff.ts ~L894

Deferred because: requires wiring discovery results into the error path — meaningful refactor, not a quick win.

anandgupta42 avatar Apr 17 '26 14:04 anandgupta42

Consolidated into #1680, which tracks this together with related issues. The original report here stays linked from that tracker.

anandgupta42 avatar Nov 05 '26 21:11 anandgupta42