AIJan 26

Beyond Text-to-SQL: Can LLMs Really Debug Enterprise ETL SQL?

arXiv:2601.18119v1h-index: 1
Originality Synthesis-oriented
AI Analysis

This addresses the challenge of improving SQL debugging efficiency for enterprise data engineers, though it is incremental as it focuses on benchmarking rather than solving the problem directly.

The paper tackles the problem of debugging complex enterprise SQL code by introducing OurBench, a benchmark for evaluating LLMs on SQL reasoning and debugging, finding that even the best model achieves only 36.46% accuracy on syntax errors and 32.17% on semantic errors.

SQL is central to enterprise data engineering, yet generating fully correct SQL code in a single attempt remains difficult, even for experienced developers and advanced text-to-SQL LLMs, often requiring multiple debugging iterations. We introduce OurBench, the first benchmark for enterprise-level SQL reasoning and debugging. Our benchmark is built on two key innovations: (1) an automated construction workflow that uses reverse engineering to systematically inject realistic bugs into large-scale SQL code, enabling scalable and diverse benchmark generation; and (2) an execution-free evaluation framework tailored to enterprise settings, providing fast, accurate, and resource-efficient assessment. OurBench comprises 469 OurBenchSyn queries featuring syntax errors with explicit error messages, and 516 OurBenchSem queries targeting semantic errors in which the code fails to meet user intent. The queries are highly complex, averaging over 140 lines and featuring deep and wide abstract syntax trees. Evaluation of nearly 30 LLMs reveals a substantial performance gap: the best-performing model, Claude-4-Sonnet, achieves only 36.46 percent accuracy on OurBenchSyn and 32.17 percent on OurBenchSem, while most models score below 20 percent. We further explore four solution strategies, identify key challenges, and outline promising directions for enterprise SQL debugging with LLMs.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes