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

HDFS path is encoded twice when inserting to a partitioned table using dynamic partitions.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.1.1
    • None
    • HiveServer2, Query Planning
    • None

    Description

      Tested on CDH 5.16.1 (Hive 1.1) and CDH 6.3 (Hive 2.2.1).

      When file merging is enabled, ie. hive.merge.mapfiles or hive.merge.mapredfiles is true (or in case of spark hive.merge.sparkfiles), under specific conditions (see: ConditionalResolverMergeFiles, option 3.) on insert commands to partitioned tables, if Hive merges some partition files in a second job and moves the ones that do not need to be merged from the first jobs result, then the ones that can be moved are moved twice. This seems to cause file paths to be encoded twice as well
      (FileUtils#escapePathName()) . For example, this can cause issues with partition values such as 'A:B' and 'C' to be encoded as 'A%3AB' for one partition path correctly and as 'C%253AD' for the other partition incorrectly.

      Attachments

        1. details.txt
          3 kB
          Urmas Tamassy

        Activity

          People

            Unassigned Unassigned
            pumt99 Urmas Tamassy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: