Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1446 Support INTERSECT, EXCEPT, MINUS, each with DISTINCT, ALL options
  3. CALCITE-1447

Implement INTERSECT DISTINCT by rewriting to UNION ALL and counting

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.11.0
    • None
    • None

    Description

      Interesect distinct will be rewritten as

      Rewrite: (GB-Union All-GB)-GB-FIL-Proj
          Example: R1 Intersect All R2
          R3 = GB(R1 on all attributes + count() as c) union all GB(R2 on all attributes + count() as c)
          R4 = GB(R3 on all attributes + count(c) as cnt)
          R5 = Fil ( cnt == #branch )
          R6 = Proj(R5 on all attributes)
      

      Attachments

        1. CALCITE-1447.01.patch
          16 kB
          Pengcheng Xiong

        Activity

          People

            pxiong Pengcheng Xiong
            pxiong Pengcheng Xiong
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: