Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Duplicate
-
4.0.0
-
None
-
None
-
None
Description
If there is a partitioned Parquet table in Hive, and the data file in one of the partitions (not correctly) contains the partition column as well, filtering on the partition column will return no rows if the Parquet predicate pushdown is enabled. If the PPD is disabled, the rows will return correctly.
The reason why it doesn't work is that, if the PPD is switched on, Hive will send the predicate 'partition_column= ...' to parquet and a requested schema which doesn't contain the partition column. When the data is read from parquet, this column will be skipped, because the requested schema doesn't contain it, but it still tries to apply the filter predicate, so it will return an empty result set.
I think if the rows are returned correctly without PPD, they should be returned with PPD as well. Hive should omit the partition column from the Parquet predicate.
Attachments
Issue Links
- duplicates
-
HIVE-21599 Wrong results for partitioned Parquet table when files contain partition column
- Closed