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

Cannot drop partitions on table when using Oracle metastore

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 0.10.0
    • 0.10.0
    • SQL
    • None
    • Oracle 11g r2

    Description

      Create a table with a partition. Try to drop the partition or the table containing the partition. Following error is seen:
      FAILED: Error in metadata: MetaException(message:javax.jdo.JDODataStoreException: Error executing JDOQL query "SELECT 'org.apache.hadoop.hive.metastore.model.MPartitionColumnStatistics' AS NUCLEUS_TYPE,THIS.AVG_COL_LEN,THIS."COLUMN_NAME",THIS.COLUMN_TYPE,THIS.DB_NAME,THIS.DOUBLE_HIGH_VALUE,THIS.DOUBLE_LOW_VALUE,THIS.LAST_ANALYZED,THIS.LONG_HIGH_VALUE,THIS.LONG_LOW_VALUE,THIS.MAX_COL_LEN,THIS.NUM_DISTINCTS,THIS.NUM_FALSES,THIS.NUM_NULLS,THIS.NUM_TRUES,THIS.PARTITION_NAME,THIS."TABLE_NAME",THIS.CS_ID FROM PART_COL_STATS THIS LEFT OUTER JOIN PARTITIONS THIS_PARTITION_PARTITION_NAME ON THIS.PART_ID = THIS_PARTITION_PARTITION_NAME.PART_ID WHERE THIS_PARTITION_PARTITION_NAME.PART_NAME = ? AND THIS.DB_NAME = ? AND THIS."TABLE_NAME" = ?" : ORA-00904: "THIS"."PARTITION_NAME": invalid identifier

      The problem here is that the column "PARTITION_NAME" that the query is referring to in table "PART_COL_STATS" is non-existent. Looking at the hive schema scripts for mysql & derby, this should be "PARTITION_NAME". Postgres also suffers from the same problem.

      Attachments

        1. HIVE-3814.patch
          3 kB
          Deepesh Khandelwal

        Activity

          People

            deepesh Deepesh Khandelwal
            deepesh Deepesh Khandelwal
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: