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

Remove file size sanity checking from compareTempOrDuplicateFiles

    XMLWordPrintableJSON

Details

    Description

      https://github.com/apache/hive/blob/cdd55aa319a3440963a886ebfff11cd2a240781d/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java#L1952-L2010
      compareTempOrDuplicateFiles uses a combination of attemptId and fileSize to determine which file(s) to keep.
      I've seen instances where this function throws an exception due to the fact that the newer attemptId file size is less than the older attemptId (thus failing the query).
      I think this assumption is faulty, due to various factors such as file compression and the order in which values are written. It may be prudent to trust that the newest attemptId is in fact the best choice.

      Attachments

        1. HIVE-23354.1.patch
          5 kB
          John Sherman
        2. HIVE-23354.2.patch
          11 kB
          John Sherman
        3. HIVE-23354.3.patch
          13 kB
          John Sherman
        4. HIVE-23354.4.patch
          16 kB
          John Sherman
        5. HIVE-23354.5.patch
          17 kB
          John Sherman
        6. HIVE-23354.6.patch
          17 kB
          John Sherman
        7. HIVE-23354.7.patch
          17 kB
          John Sherman

        Issue Links

          Activity

            People

              jfs John Sherman
              jfs John Sherman
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m