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

Remove subplan under "Limit 0"

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • CBO
    • None

    Description

      After the Calcite upgrade and some fixes, there are plans that have a "limit 0" but then do stuff after 0 rows are selected.

      An example is in filter_union.q.out:
      ...

            Reduce Operator Tree:

              Group By Operator

                aggregations: count(VALUE._col0)

                keys: KEY._col0 (type: string)

                mode: mergepartial

                outputColumnNames: _col0, _col1

                Statistics: Num rows: 250 Data size: 23750 Basic stats: COMPLETE Column stats: COMPLETE

                Limit

                  Number of rows: 0
      ...
      We can simplify the plan by maybe creating a dummy table after the Limit 0.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              scarlin Steve Carlin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: