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

Add support for LATERAL keyword

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Fix Version/s: 10.9
    • Component/s: None
    • Labels:
      None

      Description

      The SQL standard defines the LATERAL keyword, which can be found on
      https://mariadb.com/kb/en/select-statement/

      LATERAL combined with joins are very useful, because you can reference columns in the left hand side from the right hand side. A good use case is the following. Let's say you have Posts and Comments and you want the first three comments for each post.

      SELECT * FROM Posts CROSS JOIN LATERAL (SELECT * FROM Comments WHERE Comments.PostID = Posts.ID LIMIT 3)

      That works in PostgreSQL. SQL Server instead has APPLY which is similar.

      If this will be supported, Entity Framework will work much better with MariaDB. EF expects that the database has support for these kind of queries, so some queries make the EF provider throw an exception when used with MySQL/MariaDB.
      For example:
      http://stackoverflow.com/questions/11389050/linq-filterling-result
      http://stackoverflow.com/questions/14157877/exception-after-installation-of-net-framework-4-5-using-entity-framework-and-my
      http://forums.devart.com/viewtopic.php?t=18989

      Both Oracle and PostgreSQL has recently implemented support. MariaDB should too

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              Emill Emil
              Votes:
              20 Vote for this issue
              Watchers:
              14 Start watching this issue

                Dates

                Created:
                Updated:

                  Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.