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

Remove duplicate ORDER BY/GROUP BY column references

    XMLWordPrintable

    Details

    • Type: Task
    • Status: In Progress (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Fix Version/s: 10.1
    • Component/s: None
    • Labels:
    • Sprint:
      10.1.6-2, 10.1.8-1

      Description

      Currently the optimizer doesn't cannot take into account duplicate column references in the GROUP/ORDER BY clauses. As a result, queries like:

      select a col1, a col2 from t1 group by col1, col2;

      will not use an index on t1(a), even though the duplicate columns
      do not change the meaning of the query.

      This is a simple task to remove duplicates in the order/group lists.
      Care should be taken of queries with the ROLLUP modifier.

      There is already an implementation attached to this task. The implementation has to be verified/changed so that:

      • it takes care of queries with ROLLUP,
      • it is verified that the place where duplicate removal is done covers all cases when it can and should be done,
      • there is sufficient coverage with test cases.

        Attachments

          Activity

            People

            Assignee:
            monty Michael Widenius
            Reporter:
            timour Timour Katchaounov (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: