Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-22011

DISTINCT with JSON_ARRAYAGG gives wrong results

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.5
    • Fix Version/s: 10.5.4
    • Component/s: Optimizer
    • Labels:
      None

      Description

      As JSON_ARRAYAGG is implemented as a wrapper over Item_func_group_concat, MDEV-11563 is going to affect JSON_ARRAYAGG too.

      The problem with DISTINCT in JSON_ARRAYAGG is that it expects the values read from the table for each record. It does not use the key but instead calls val_str() for all the arguments in the GROUP_CONCAT function.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              varun Varun Gupta
              Reporter:
              varun Varun Gupta
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: