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

Indices can't be built on tables whose schema info comes from SerDe

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.10.0, 0.10.1, 0.11.0
    • Fix Version/s: 0.12.0
    • Component/s: None
    • Labels:
      None

      Description

      Building indices on tables who get the schema information from the deserializer (e.g. Avro backed tables) doesn't work because when the column is checked to exist, the correct API isn't used.

      hive> describe doctors;                                                                      
      OK
      # col_name            	data_type           	comment             
      	 	 
      number              	int                 	from deserializer   
      first_name          	string              	from deserializer   
      last_name           	string              	from deserializer   
      Time taken: 0.215 seconds, Fetched: 5 row(s)
      hive> create index doctors_index on table doctors(number) as 'compact' with deferred rebuild; 
      FAILED: Error in metadata: java.lang.RuntimeException: Check the index columns, they should appear in the table being indexed.
      FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
      

        Attachments

        1. HIVE-4251.1.patch
          0.9 kB
          Mark Wagner
        2. HIVE-4251.2.patch
          14 kB
          Mark Wagner

          Activity

            People

            • Assignee:
              mwagner Mark Wagner
              Reporter:
              mwagner Mark Wagner
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: