RISE: Rule-Driven SQL Dialect Translation via Query Reduction
Xudong Xie, Yuwei Zhang, Wensheng Dou, Yu Gao, Ziyu Cui, Jiansen Song, Rui Yang, Jun Wei

TL;DR
RISE is a novel LLM-based approach for translating complex SQL dialects by reducing queries to simpler forms, extracting translation rules, and achieving high accuracy on benchmark datasets.
Contribution
The paper introduces RISE, a new method combining query reduction and LLMs for accurate SQL dialect translation, outperforming existing tools.
Findings
Achieves 97.98% accuracy on TPC-DS benchmark.
Achieves 100% accuracy on SQLProcBench.
Outperforms traditional rule-based and LLM approaches significantly.
Abstract
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 that contains a SQL dialect , we first employ a dialect-aware query reduction technique to derive a simplified query by removing -irrelevant SQL elements from . Subsequently, we utilize LLMs to translate into , and automatically extract the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Database Systems and Queries · Data Quality and Management · Semantic Web and Ontologies
