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

Hive should not push partition columns to the Parquet predicate, even if the data file contains the partition column

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned Assign to me
            kuczoram Marta Kuczora
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment