
What happened
A Hacker News essay says direct natural-language-to-SQL lands around 60% accurate, so every error triggers a rework cycle, and proposes SQLazy: AI plans canonical steps, a deterministic compiler generates the SQL.
Why it matters
Reviewing—not writing—is the bottleneck, so moving uncertainty into auditable planning steps lets reviewers check logic once and recompile the same script for different databases instead of re-reading generated code.
Ask the AI about this article. Questions and answers are published on this page
The essay builds its case around a gap between two costs: writing SQL has become cheap with AI, but reviewing it has not. Its argument is that people reverse-engineer generated queries anyway—where a column came from, why a DISTINCT appears—so the uncertainty should be moved into a planning layer where a human can inspect named steps rather than a black-box final statement.
The paper illustrates this with a stock example: a longest-rising-streak query that in nested SQL needs four levels of nesting, but as a step script reads top to bottom in five lines, aligning reading order with evaluation order. From there, the same script can be recompiled for another database—the essay walks through ClickHouse output—so logic is audited once and dialects are left to the compiler. It then extends the division of labor to stored procedures, noting that audit pain concentrates in SELECT computations and WHERE conditions rather than flow code, and suggesting SPL as an optional host when the target database lacks stored procedures.
Against conventional AI translation—repeated compare-and-regenerate loops—the essay frames the choice as comprehension debt: relocated to the target database, or repaid once by reverse-translating legacy code into a readable, compilable script. The existing code becomes an asset rather than a maintenance liability, it argues, and recompilation makes the next change deterministic rather than another round of AI rewriting.
Pick your industry and the AI tools you use, and get news related to your work every day.
By signing up you agree to the Terms of Service and Privacy Policy.
Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →
At AWS re:Invent, NVIDIA and AWS announced general availability of Amazon EC2 P7 UltraServers and instances on…

LINE Yahoo said on December 3 that LINE Calendar will gain Calendar AI from mid-December, extracting dates fro…

Anthropic published a survey of 2,000 Claude users on Dec 2, 2026, finding positive correlations between inten…

alesha-pro released a 70.2M-parameter recurrent-depth adapter over frozen Qwen3.8-Flash-Next (125B-A6B MoE + 5…

At its October 21 earnings briefing, Meta said over 25% of weekly active Muse users use the AI agent for shopp…

ArtFanders and Spice Factory signed a partnership on planning and deploying AI agents, and Spice Factory is la…
