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

Exchange partition does not show inputs field for post/pre execute hooks

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.12.0
    • 2.1.0
    • Query Processor
    • None

    Description

      The pre/post execute hook interface has fields that indicate which Hive objects were read / written to as a result of running the query. For the exchange partition operation, the read entity field is empty.

      This is an important issue as the hook interface may be configured to perform critical warehouse operations.

      See
      ql/src/test/results/clientpositive/exchange_partition3.q.out

      --- a/ql/src/test/results/clientpositive/exchange_partition3.q.out
      +++ b/ql/src/test/results/clientpositive/exchange_partition3.q.out
      @@ -65,9 +65,17 @@ ds=2013-04-05/hr=2
       PREHOOK: query: -- This will exchange both partitions hr=1 and hr=2
       ALTER TABLE exchange_part_test1 EXCHANGE PARTITION (ds='2013-04-05') WITH TABLE exchange_part_test2
       PREHOOK: type: ALTERTABLE_EXCHANGEPARTITION
      +PREHOOK: Output: default@exchange_part_test1
      +PREHOOK: Output: default@exchange_part_test2
       POSTHOOK: query: -- This will exchange both partitions hr=1 and hr=2
       ALTER TABLE exchange_part_test1 EXCHANGE PARTITION (ds='2013-04-05') WITH TABLE exchange_part_test2
       POSTHOOK: type: ALTERTABLE_EXCHANGEPARTITION
      +POSTHOOK: Output: default@exchange_part_test1
      +POSTHOOK: Output: default@exchange_part_test1@ds=2013-04-05/hr=1
      +POSTHOOK: Output: default@exchange_part_test1@ds=2013-04-05/hr=2
      +POSTHOOK: Output: default@exchange_part_test2
      +POSTHOOK: Output: default@exchange_part_test2@ds=2013-04-05/hr=1
      +POSTHOOK: Output: default@exchange_part_test2@ds=2013-04-05/hr=2
       PREHOOK: query: SHOW PARTITIONS exchange_part_test1
       PREHOOK: type: SHOWPARTITIONS
       PREHOOK: Input: default@exchange_part_test1
      

      Attachments

        1. HIVE-12865.2.patch
          8 kB
          Aihua Xu
        2. HIVE-12865.patch
          6 kB
          Aihua Xu

        Activity

          People

            aihuaxu Aihua Xu
            pauly Paul Yang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: