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

Share input scan by unions across multiple queries

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: In Progress
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Query Processor
    • Labels:
      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

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

                Dates

                • Created:
                  Updated: