Text-to-SQL models are normally trained and evaluated on SQLite, but production systems run on PostgreSQL, MySQL, ClickHouse, and other engines. Across thirteen models from 3B to frontier scale, that single-dialect assumption costs 8 to 17 percentage points in lower-bound execution accuracy when the same model is run against other dialects. This work proposes having the LLM emit a dialect-agnostic relational algebra query plan instead of SQL, then compiling that plan deterministically to the target dialect. On BIRD, this shrinks the cross-dialect gap to at most 2.3 points and, with matched fine-tuning, plan supervision beats SQL supervision.
They also introduce DF-Match, a question-aware result-set comparator that avoids confounding semantic errors with benign cross-dialect variation, which existing metrics fail to separate.