Back to MariaDB
GSoC 2026

Implementing ANY_VALUE() and GROUPING() in MariaDB

This project aims to implement the ANY_VALUE() and GROUPING() functions in MariaDB, addressing longstanding gaps in compatibility with MySQL 8.0 and modern SQL standards. Currently, the absence of these functions limits MariaDB’s usability in applications that rely on advanced GROUP BY semantics, particularly when migrating from MySQL or working with rollup queries. To solve this, I will extend MariaDB’s SQL parser and execution engine to support both functions. For ANY_VALUE(), I will implement a new aggregate function that allows safe selection of non-aggregated columns under ONLY_FULL_GROUP_BY. For GROUPING(), I will introduce a function that distinguishes between NULL values originating from rollup aggregation and those present in the underlying data, by tracking rollup state during query execution. The primary deliverables of this project include fully functional implementations of ANY_VALUE() and GROUPING() in MariaDB, comprehensive MTR test suites validating correctness and MySQL compatibility, and updated documentation describing their usage and behavior. The final outcome will improve MariaDB’s standards compliance and provide developers with essential tools for writing expressive and portable SQL queries.

Project details

Contributor

Jaeheon Shim

Mentors

Not available

Technologies

Not listed in the archive