• Varun Gupta's avatar
    MDEV-23029: JSON_OBJECTAGG returns NULL when used together with GROUP BY · 7e19954b
    Varun Gupta authored
    Quick grouping is not supported for JSON_OBJECTAGG. The same for GROUP_CONCAT too
    so make sure that Item::quick_group is set to FALSE. We need to make sure that in
    the case of JSON_OBJECTAGG we don't create an index over grouping fields of
    the temp table and update the result after each iteration.
    Instead we should first sort the result in accordance to the
    GROUP BY fields and then perform the grouping and
    write the result to the temp table.
    7e19954b
item_jsonfunc.cc 84.8 KB