Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1055

SubQueryRemoveRule should create Correlate, not Join, for correlated sub-queries

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.6.0
    • None
    • None

    Description

      In some cases of FILTER correlated subqueries, the "variablesSet" didn't get passed down to RelBuilder.join() and thus a Join rel was created while it should have been a Correlate rel.
      For example,

      select order_id, quantity from orders o
      where quantity = (
          select max(quantity) from orders o2
          where o.item_id = o2.item_id)
      

      Does the same apply to PROJECT and JOIN subqueries, julianhyde ?

      Attachments

        1. CALCITE-1055_2.patch
          4 kB
          Wei Xue
        2. CALCITE-1055.patch
          1 kB
          Wei Xue

        Issue Links

          Activity

            People

              maryannxue Wei Xue
              maryannxue Wei Xue
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: