Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-10306

SQL: Transform subqueries to JOINs when possible

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.10
    • sql
    •  Introduced new feature that rewrites subqueries to joins where possible.
    • Docs Required

    Description

      Currently subqueries are mostly not analyzed in any way. This makes our distributed execution plan more complex to analyze and execute. Moreover, we cannot extract partition information from such queries efficiently. We need to apply the simplest "JOIN conversion" optimization on early query analysis phase and try to transform our AST from subquery to join.

      This should be done before partition extraction, pushdowns and splitter. See [1] for more information.
      Postgres implementation of subquery rewrites could be found here [2].

      [1] https://cwiki.apache.org/confluence/display/IGNITE/IEP-24%3A+SQL+Partition+Pruning
      [2] https://github.com/postgres/postgres/blob/master/src/backend/optimizer/prep/prepjointree.c

      Attachments

        Issue Links

          Activity

            People

              korlov Konstantin Orlov
              vozerov Vladimir Ozerov
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Time Spent - 64h Remaining Estimate - 107.5h
                  107.5h
                  Logged:
                  Time Spent - 64h Remaining Estimate - 107.5h
                  64h