Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

querying a partition table

avatar

Hello Exports

I have created a partition table as below

SET hive.exec.dynamic.partition=true; SET hive.exec.dynamic.partition.mode=nonstrict; CREATE EXTERNAL TABLE `table`( no of clomuns )) PARTITIONED BY (year INT,month INT,day INT) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS parquet LOCATION 'path';

While querying the tables with on of the partition column, I am getting the following error, for all other regular column it is working fine. Thanks.

0: jdbc:hive2:

//> select * from table where year=2015; Error: java.io.IOException: java.lang.IllegalArgumentException: Column [year] was not found in schema! (state=,code=0)

Can you please let me know what I am doing wrong here.

1 ACCEPTED SOLUTION

avatar

@manichinnari555, I noticed that the table was stored as Parquet. HIVE-11401 is a known bug in Hive filtering on a partition column in Parquet. There is no immediate plan to bring this patch into HDP, but a known workaround is to disable predicate pushdown by setting property hive.optimize.index.filter to false.

View solution in original post

3 REPLIES 3

avatar

@manichinnari555, I noticed that the table was stored as Parquet. HIVE-11401 is a known bug in Hive filtering on a partition column in Parquet. There is no immediate plan to bring this patch into HDP, but a known workaround is to disable predicate pushdown by setting property hive.optimize.index.filter to false.

avatar

@Chris Nauroth Many thanks for answering the question and you saved my day.

On the same note, I have another question. I have executed the query setting the property to flalse, do we need to set the property to flase every time we execute the query in production?

Or while creating the table I can set that to false?

Thanks again.

avatar
@manichinnari555, I'm glad to hear this helped. I believe setting at table creation time should be sufficient.