What question does this note answer?
When a team considers using a language model to convert warehouse code, the first question is how often the result is right. Marketing figures are easy to find. This note looks at what independent, published measurements say.
Method. We reviewed three studies: one of code translation between programming languages, one of SQL translation between database systems, and one of how stable model accuracy is across repeated runs. We quote each figure from the paper’s abstract and name the source. This note uses no Novuz customer data. Where it describes how Novuz works, it says so.
How often do language models translate code correctly?
In the largest study we found, less than half the time. Pan and colleagues translated 1,700 code samples, drawn from three benchmarks and two real-world projects, between C, C++, Go, Java and Python, using general-purpose and code-specific language models. They checked the translations by running them.
Correct translations ranged from 2.1% to 47.3% across the models studied. The paper goes on to classify the bugs the models introduced, which is its main contribution: the failures are varied, and many are not visible by reading the code.
Correct translations, by model studied
2.1%
Lowest model
47.3%
Highest model
1,700
Code samples, five languages
Source: Pan and others, Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating Code, ICSE 2024.
General-purpose programming languages, not SQL or ETL. The models tested have since been superseded.
Is SQL translation between databases easier?
It does not appear to be. PARROT is a benchmark built for exactly this task: translating SQL from one database system to another. It contains 598 translation pairs drawn from 38 open-source benchmarks and real business services, covering 22 production database systems.
Its authors report that language models average under 38.53% accuracy on it. SQL dialects differ in ways that are easy to miss: functions that share a name and differ in behavior, implicit type conversions, NULL handling, and date arithmetic. A translation can run without error and still return different rows.
PARROT: cross-system SQL translation
Under 38.53%
Average model accuracy
598
Translation pairs
22
Database systems
Source: PARROT: A Benchmark for Evaluating LLMs in Cross-System SQL Translation, NeurIPS 2025.
A benchmark of single queries, not of stored procedures, ETL packages or whole estates.
Is a model’s accuracy stable from one run to the next?
No. Atil and colleagues ran five language models on eight tasks, ten times each, with settings intended to make the output deterministic. Accuracy varied by up to 15% between runs, and the gap between a model’s best and worst possible performance reached 70%. No model gave repeatable accuracy on every task.
For a migration this matters as much as the average. If accuracy moves between runs, a test that passed on Tuesday does not describe the code produced on Wednesday. Our earlier note on non-determinism covers the causes and what model vendors say about them.
Variation across ten runs with “deterministic” settings
Up to 15%
Accuracy variation between runs
Up to 70%
Gap between best and worst possible performance
5 models
Eight tasks, ten runs each
Source: Atil and others, Non-Determinism of “Deterministic” LLM Settings, arXiv:2408.04667.
General language tasks, not code conversion. The finding is about repeatability, not about any one task.
What do these errors look like in warehouse SQL?
The studies classify failures in general terms. In a warehouse migration the most damaging class is the translation that runs and returns different results, because two SQL dialects can accept the same statement and mean different things. The examples below are documented behaviors of each platform.
| Area | Source behavior | Databricks SQL behavior | Effect if carried over by name |
|---|---|---|---|
| Integer division | SQL Server: 5 / 2 returns 2 | 5 / 2 returns 2.5 | Ratios and allocations shift |
| Year difference | SQL Server DATEDIFF counts boundaries crossed | timestampdiff counts whole units elapsed | Tenure and aging logic moves by one |
| Empty strings | Oracle treats an empty string as NULL | Empty string and NULL are distinct | Filters, joins and counts change |
| String comparison | Teradata is case-insensitive by default; SQL Server ignores trailing spaces | Case-sensitive and exact | Joins lose rows; groups split |
| Duplicate rows | A Teradata SET table discards duplicates on insert | Duplicates are kept | Counts and sums inflate |
| NULL ordering | Oracle sorts NULLs last ascending | NULLs sort first ascending | Top-N and window results change |
Which checks catch which errors?
The studies that report low accuracy checked translations by running them. That matters: a check that only compiles or reads the code would have scored the same translations far higher. The table sets out what each kind of check can see.
| Failure mode | Compiles? | Visible on reading? | Caught by comparing results on the same inputs? |
|---|---|---|---|
| Semantic drift: division, dates, NULLs, collation | Yes | Rarely | Yes |
| Invented function or option | No | Sometimes | Yes |
| Dropped branch in a long procedure | Yes | Sometimes | Only if the inputs exercise the branch |
| Changed join type or moved predicate | Yes | Sometimes | Yes |
| Type or precision change | Yes | Rarely | Yes, on aggregates |
| Different output on a second run | Yes | No | Yes, if the second run is also compared |
How should a migration team read these numbers?
With care, in both directions.
| What the studies show | What they do not show |
|---|---|
| Model-written translations are often wrong in ways that reading the code does not reveal | The error rate of any migration product, which may add checks, retries and context |
| SQL translation between systems is hard for models, not easier than general code | How current models perform; newer ones are likely to score higher |
| Accuracy can change between runs of the same model on the same task | How any model behaves on your estate, which only a test on your code can show |
What follows for a migration plan?
Three things, none of which depends on the exact figures.
- An accuracy rate is not a plan. Even at a high rate, some objects are wrong and nobody knows which, so every object needs a check that does not rely on reading the code.
- The check has to be on results. Run the original and the converted object on the same inputs and compare schema, row counts, totals and sampled rows.
- Repeatability is worth paying for. A conversion that gives the same output on every run is tested once. One that varies is tested every time it runs.
How does Novuz use a model, given this?
Stated here so readers can weigh this note accordingly. Novuz converts about 95% of objects by fixed, versioned rules with no model call, so the same input gives the same output. The objects rules cannot settle go to a resolver on a model the customer approves. It proposes a conversion; an engineer approves, edits or rejects it; and every object, rule-converted or resolved, is reconciled against the original on the same inputs.
The studies above are a reason for that design, not a measurement of it. The test of any tool, ours included, is the same: run it on your own objects and check the results.
Would a much better model remove the need to check?
No, and the reason is arithmetic, not pessimism about models. A migration needs every object right. If each object is converted correctly with probability p, independently, the probability that all N objects are correct is p raised to the power N.
At 99.9% per object, which is far above any figure in the studies reviewed here, a 1,500-object estate is more likely than not to contain an error. Per-object accuracy would have to reach about 99.99% before the estate is probably clean, and even then nobody would know without checking. Better models reduce the repair work. They do not remove the need for proof.
| Per-object accuracy | Expected wrong objects, N = 1,500 | Probability the whole estate is correct |
|---|---|---|
| 90% | 150 | Effectively zero |
| 99% | 15 | About 0.00003% |
| 99.9% | 1.5 | About 22% |
| 99.99% | 0.15 | About 86% |
What are the limits of this note?
None of the three studies measures warehouse migration. Two test general-purpose code or language tasks, and the third tests single SQL queries. We know of no public, independent benchmark of AI conversion of stored procedures, ETL packages and schedules at estate scale.
The models tested in the earliest study have been replaced by stronger ones, and tools built on models can add retrieval, tests and retries that raise their success rate. The figures here are a lower bound on caution, not a forecast. We will update this note as newer studies appear.
Sources
- Pan, R. and others, “Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating Code”, ICSE 2024, arXiv:2308.03109
- “PARROT: A Benchmark for Evaluating LLMs in Cross-System SQL Translation”, NeurIPS 2025
- Atil, B. and others, “Non-Determinism of ‘Deterministic’ LLM Settings”, arXiv:2408.04667
- Ouyang, S., Zhang, J. M., Harman, M. and Wang, M., “An Empirical Study of the Non-determinism of ChatGPT in Code Generation”, arXiv:2308.02828
