Details
-
New Feature
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
MXS-CAPACITY-Q4-2026
Description
Problem
GROUP_CONCAT, TIMESTAMPDIFF and MODA() may behave differently on Exasol than on MariaDB (or not exist), so queries using them can fail or return different results when the smart router sends them to Exasol. Exasol may already have a native GROUP_CONCAT, so a UDF might not be needed for every function.
Goal
For each function, prove whether Exasol's native version matches MariaDB. Where it does, pass it through. Where it doesn't, have the preprocessor rewrite it to a UDF in the UTIL schema (UTIL.GROUP_CONCAT, UTIL.TIMESTAMPDIFF, UTIL.MODA) that returns MariaDB-compatible results.
Validation (first step)
- Build a test set per function that runs the same queries on MariaDB and Exasol and compares the results. Cover: DISTINCT, ORDER BY inside the aggregate, SEPARATOR, NULLs, empty groups, GROUP BY, all TIMESTAMPDIFF units, negative and boundary values, long results (group_concat_max_len truncation), and character sets.
- Output is a per-function result: identical, differs in documented edge cases, or not supported.
- Identical: no rewrite, native function passes through. Differs or missing: build the UDF and rewrite.
- The same test set runs against the UDFs and stays in CI as a regression check against both MariaDB and Exasol versions.
Requirements
- UDFs, where needed, are created and versioned as part of the router/CDC setup.
- The preprocessor (sqlglot) rewrites only the cases that need it.
- Unsupported forms are not rewritten and keep the existing fallback, with a warning.
Acceptance criteria
- A comparison report exists for all three functions with the decision for each (native, UDF, or unsupported).
- Every function that is supported (natively or via UDF) returns identical results on both databases across the test set.
- The UDFs are created automatically when missing and reported by a status check.
Open questions
- Exact semantics expected for MODA(): MariaDB behaviour or a custom function? Yes its a custom columnstore function
- Differences that cannot be fixed (for example truncation or collation behaviour): document them or block the rewrite? write into exa limitation page