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

Incorrect results when using subquery in multi table insert

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.10.0, 0.11.0
    • None
    • Query Processor
    • None

    Description

      I'm using a multi table insert like this:
      FROM <x>
      INSERT INTO TABLE t PARTITION (type='x')
      SELECT * WHERE type='x'
      INSERT INTO TABLE t PARTITION (type='y')
      SELECT * WHERE type='y';

      Now when <x> is the name of a table, everything works as expected.
      However if I use a subquery as <x>, the query runs but it inserts all results from the subquery into each partition, as if there were no "WHERE" clauses in the selects.

      Attachments

        1. HIVE-4598.1.patch.txt
          6 kB
          Navis Ryu

        Issue Links

          Activity

            People

              navis Navis Ryu
              tannin Sebastian
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: