Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-3773

Share input scan by unions across multiple queries

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: In Progress
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Query Processor
    • None

    Description

      Consider a query like:

      select * from
      (
      select key, 1 as value, count(1) from src group by key
      union all
      select 1 as key, value, count(1) from src group by value
      union all
      select key, value, count(1) from src group by key, value
      ) s;

      src is scanned multiple times currently (one per sub-query).
      This should be treated like a multi-table insert by the optimizer.

      Attachments

        Issue Links

          Activity

            People

              gangtimliu Gang Tim Liu
              namit Namit Jain
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated: