EUVIMEDEUVIMED entdecken
Crossref

A Formal Framework for Typing and Cast Semantics in SQL Engines

Wenjia Ye, Matías Toro, Claudio Gutierrez, Bruno C. D. S. Oliveira, Éric Tanter

ACM Transactions on Programming Languages and Systems · 28.07.2026

DOI: 10.1145/3834861 ↗

Kurz gefasst

Fachartikel in der Zeitschrift ACM Transactions on Programming Languages and Systems, online erschienen am 28.07.2026. Verfasst von Wenjia Ye und 4 weiteren Autor:innen. Die Arbeit nennt 47 Literaturangaben.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

Practical SQL engines differ in subtle ways in their handling of typing constraints and implicit type casts. These issues, usually not considered in formal accounts of SQL, directly affect the portability of queries between engines. To address this problem, we present a formal typing semantics for SQL, named TRAF , that explicitly captures both static and dynamic type behavior. The system TRAF is expressed in terms of abstract operators that provide the necessary leeway to systematically model the type and cast behavior of different SQL engines (PostgreSQL, MS SQL Server, MySQL, SQLite, and Oracle). We show that this formalism provides formal guarantees for the handling of types. We identify practical conditions under which engine instantiations satisfy type safety and type soundness. In this regard, TRAF can serve as an explicit and testable account of typing in existing engines, potentially guide their evolution, and provide a formal basis to study type-aware query optimizations and design provably-correct query translators. We also test the adequacy of the formalism by implementing TRAF in Python for these five engines and testing it with synthetic queries, SQLancer++- generated queries, and adapted Spider and Calcite benchmark queries.

Zitieren

APA

Ye, W., Toro, M., Gutierrez, C., Oliveira, B. C. D. S., & Tanter, É. (2026). A Formal Framework for Typing and Cast Semantics in SQL Engines. ACM Transactions on Programming Languages and Systems. https://doi.org/10.1145/3834861

Vancouver

Ye W, Toro M, Gutierrez C, Oliveira BCDS, Tanter É. A Formal Framework for Typing and Cast Semantics in SQL Engines. ACM Transactions on Programming Languages and Systems. 2026. doi:10.1145/3834861

BibTeX
@article{Ye2026,
  author = {Ye, Wenjia and Toro, Matías and Gutierrez, Claudio and Oliveira, Bruno C. D. S. and Tanter, Éric},
  title = {A Formal Framework for Typing and Cast Semantics in SQL Engines},
  journal = {ACM Transactions on Programming Languages and Systems},
  year = {2026},
  doi = {10.1145/3834861}
}
Kostenlos starten →