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

Dynamic partition sort optimization inserts record wrongly to partition when used with GroupBy


    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.14.0, 0.13.1
    • Fix Version/s: 0.14.0
    • Component/s: None
    • Labels:


      HIVE-6455 added dynamic partition sort optimization. It added startGroup() method to FileSink operator to look for changes in reduce key for creating partition directories. This method however is not reliable as the key called with startGroup() is different from the key called with processOp(). startGroup() is called with newly changed key whereas processOp() is called with previously aggregated key. This will result in processOp() writing the last row of previous group as the first row of next group. This happens only when used with group by operator.

      The fix is to not rely on startGroup() and do the partition directory creation in processOp() itself.


        1. HIVE-8151.1.patch
          143 kB
          Prasanth Jayachandran
        2. HIVE-8151.2.patch
          181 kB
          Prasanth Jayachandran
        3. HIVE-8151.3.patch
          317 kB
          Prasanth Jayachandran
        4. HIVE-8151.4.patch
          318 kB
          Prasanth Jayachandran
        5. HIVE-8151.5.patch
          320 kB
          Prasanth Jayachandran
        6. HIVE-8151.6.patch
          320 kB
          Prasanth Jayachandran
        7. HIVE-8151.7.patch
          332 kB
          Prasanth Jayachandran
        8. HIVE-8151.8.patch
          333 kB
          Prasanth Jayachandran
        9. HIVE-8151.9.patch
          345 kB
          Prasanth Jayachandran
        10. HIVE-8151.10.patch
          367 kB
          Prasanth Jayachandran

          Issue Links



              • Assignee:
                prasanth_j Prasanth Jayachandran
                prasanth_j Prasanth Jayachandran
              • Votes:
                0 Vote for this issue
                10 Start watching this issue


                • Created: