diff options
author | Markus Mäkelä <markus456@gmail.com> | 2019-07-04 13:12:08 +0300 |
---|---|---|
committer | Markus Mäkelä <markus456@gmail.com> | 2019-07-04 13:12:08 +0300 |
commit | d0fc07c85f1b01291c78a9ea42525d57df7b66b7 (patch) | |
tree | fdfd6704c3b68b2a4986e5b365698cdde81562b0 /sql/lex.h | |
parent | 4d6a90942c231a5a6628fe8e0b9bd9e8d4509d26 (diff) | |
download | mariadb-git-d0fc07c85f1b01291c78a9ea42525d57df7b66b7.tar.gz |
MDEV-16620: Add JSON_ARRAYAGG function
The JSON_ARRAYAGG function extends the GROUP_CONCAT function and provides
a method of aggregating JSON results. The current implementation supports
DISTINCT and LIMIT but not ORDER BY (Oracle supports GROUP BY).
Adding GROUP BY support is possible but it requires some extra work as the
grouping appears to be done inside a temporary table that complicates
matters.
Added test cases that covert aggregation of all JSON types and JSON
validation for the generated results.
Diffstat (limited to 'sql/lex.h')
-rw-r--r-- | sql/lex.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/lex.h b/sql/lex.h index c52e981f8b8..df2de54dbc5 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -741,6 +741,7 @@ static SYMBOL sql_functions[] = { { "EXTRACT", SYM(EXTRACT_SYM)}, { "FIRST_VALUE", SYM(FIRST_VALUE_SYM)}, { "GROUP_CONCAT", SYM(GROUP_CONCAT_SYM)}, + { "JSON_ARRAYAGG", SYM(JSON_ARRAYAGG_SYM)}, { "LAG", SYM(LAG_SYM)}, { "LEAD", SYM(LEAD_SYM)}, { "MAX", SYM(MAX_SYM)}, |