PARROT: 크로스 시스템 SQL 번역에서 LLM 평가를 위한 벤치마크
PARROT: A Benchmark for Evaluating LLMs in Cross-System SQL Translation
September 27, 2025
저자: Wei Zhou, Guoliang Li, Haoyu Wang, Yuxing Han, Xufei Wu, Fan Wu, Xuanhe Zhou
cs.AI
초록
대규모 언어 모델(LLM)은 텍스트-to-SQL 작업에서 점점 더 효과적인 성능을 보여주고 있습니다. 그러나 한 데이터베이스 시스템(예: MySQL)용으로 작성된 쿼리를 다른 시스템(예: ClickHouse)에 맞는 동등한 쿼리로 변환하는 크로스 시스템 SQL 번역(SQL-to-SQL) 문제는 실질적으로 매우 중요함에도 불구하고 아직 충분히 연구되지 않고 있습니다. 기존의 SQL 벤치마크는 SQL-to-SQL 평가에 적합하지 않은데, 이는 (1) 제한된 데이터베이스 시스템 집합(주로 SQLite)에 초점을 맞추고 있으며, (2) 시스템별 SQL 방언(예: 맞춤형 함수, 데이터 타입, 구문 규칙)을 충분히 반영하지 못하기 때문입니다. 따라서 본 논문에서는 크로스 시스템 SQL 번역을 위한 실용적이고 현실적인 벤치마크인 PARROT을 소개합니다. PARROT은 38개의 오픈소스 벤치마크와 실제 비즈니스 서비스에서 추출한 598개의 번역 쌍으로 구성되어 있으며, 시스템별 SQL 이해를 테스트하기 위해 특별히 준비되었습니다(예: LLM의 평균 정확도는 38.53% 미만). 또한, 28,003개의 번역을 포함한 PARROT-Diverse(광범위한 구문 테스트용)와 5,306개의 대표 샘플을 포함한 PARROT-Simple(집중적인 스트레스 테스트용) 등 여러 벤치마크 변형을 제공하며, 총 22개의 프로덕션급 데이터베이스 시스템을 다룹니다. 향후 연구를 촉진하기 위해 공개 리더보드와 소스 코드를 https://code4db.github.io/parrot-bench/에서 공개합니다.
English
Large language models (LLMS) have shown increasing effectiveness in
Text-to-SQL tasks. However, another closely related problem, Cross-System SQL
Translation (a.k.a., SQL-to-SQL), which adapts a query written for one database
system (e.g., MySQL) into its equivalent one for another system (e.g.,
ClickHouse), is of great practical importance but remains underexplored.
Existing SQL benchmarks are not well-suited for SQL-to-SQL evaluation, which
(1) focus on a limited set of database systems (often just SQLite) and (2)
cannot capture many system-specific SQL dialects (e.g., customized functions,
data types, and syntax rules). Thus, in this paper, we introduce PARROT, a
Practical And Realistic BenchmaRk for CrOss-System SQL Translation. PARROT
comprises 598 translation pairs from 38 open-source benchmarks and real-world
business services, specifically prepared to challenge system-specific SQL
understanding (e.g., LLMS achieve lower than 38.53% accuracy on average). We
also provide multiple benchmark variants, including PARROT-Diverse with 28,003
translations (for extensive syntax testing) and PARROT-Simple with 5,306
representative samples (for focused stress testing), covering 22
production-grade database systems. To promote future research, we release a
public leaderboard and source code at: https://code4db.github.io/parrot-bench/.