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

automatically infer existing partitions of table from HDFS files.

Log workAgile BoardRank to TopRank to BottomVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments


    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 0.3.0, 0.4.0
    • Fix Version/s: None
    • Component/s: Metastore, Query Processor
    • Labels:


      Initially partition list for a table is inferred from HDFS directory structure instead of looking into metastore (partitions are created using 'alter table ... add partition'). but this automatic inferring was removed to favor the later approach during checking-in metastore checker feature and also to facilitate external partitions.

      Joydeep and Frederick mentioned that it would simple for users to create the HDFS directory and let Hive infer rather than explicitly add a partition. But doing that raises following...

      1) External partitions – so we have to mix both approaches and partition list is merged list of inferred partitions and registered partitions. and duplicates have to be resolved.
      2) Partition level schemas can't supported. Which schema to chose for the inferred partitions? the table schema when the inferred partition is created or the latest tale schema? how do we know the table schema when the inferred partitions is created?
      3) If partitions have to be registered the partitions can be disabled without actually deleting the data. this feature is not supported and may not be that useful but nevertheless this can't be supported with inferred partitions
      4) Indexes are being added. So if partitions are not registered then indexes for such partitions can not be maintained automatically.

      I would like to know what is the general thinking about this among users of Hive. If inferred partitions are preferred then can we live with restricted functionality that this imposes?


        1. HIVE-493.patch
          10 kB
          Cyrus Katrak
        2. HIVE-493-2.patch
          8 kB
          Cyrus Katrak

        Issue Links


          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users



              • Created:

                Issue deployment