# RISE: Rule-Driven SQL Dialect Translation via Query Reduction

arXiv: https://arxiv.org/abs/2601.05579 · HTML: https://mlsanity.com/paper/2601.05579/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- Builds on 6 of its 18 references that are in the map.
- First posted on arXiv 9 Jan 2026.

## Builds on (most cited first, 6 of 6)

- [Structured Chain-of-Thought Prompting for Code Generation](https://mlsanity.com/paper/2305.06599/) (2023)
- [An Empirical Study of the Non-determinism of ChatGPT in Code Generation](https://mlsanity.com/paper/2308.02828/) (2023)
- [Perfection Not Required? Human-AI Partnerships in Code Translation](https://mlsanity.com/paper/2104.03820/) (2021)
- [VeriEQL: Bounded Equivalence Verification for Complex SQL Queries with Integrity Constraints](https://mlsanity.com/paper/2403.03193/) (2024)
- [LPR: Large Language Models-Aided Program Reduction](https://mlsanity.com/paper/2312.13064/) (2023)
- [Translating between SQL Dialects for Cloud Migration](https://mlsanity.com/paper/2403.08375/) (2024)

## Built on by (most cited first, 1 of 1)

- [UniQL: Towards Dialect-Universal Benchmarking for Text-to-SQL](https://mlsanity.com/paper/2606.08018/) (2026)

## Abstract (arXiv)

Translating SQL dialects across different relational database management systems (RDBMSs) is crucial for migrating RDBMS-based applications to the cloud. Traditional SQL dialect translation tools rely on manually-crafted rules, necessitating significant manual effort to support new RDBMSs and dialects. Although large language models (LLMs) can assist in translating SQL dialects, they often struggle with lengthy and complex SQL queries. In this paper, we propose RISE, a novel LLM-based SQL dialect translation approach that can accurately handle lengthy and complex SQL queries. Given a complex source query Qc that contains a SQL dialect d, we first employ a dialect-aware query reduction technique to derive a simplified query Qs by removing d-irrelevant SQL elements from Qc. Subsequently, we utilize LLMs to translate Qs into Q_s', and automatically extract the translation rule rd for dialect d based on the relationship between Qs and Q_s'. By applying rd to Qc, we can effectively translate the dialect d within Qc, thereby bypassing the complexity of the source query Qc. We evaluate RISE on two real-world benchmarks, i.e., TPC-DS and SQLProcBench, comparing its performance against both the traditional rule-based tools and the LLM-based approaches with respect to translation accuracy. RISE achieves accuracies of 97.98% on TPC-DS and 100% on SQLProcBench, outperforming the baselines by an average improvement of 24.62% and 238.41%, respectively.
