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

ACID: Insert shuffle sort-merges on blank KEY

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.2.0
    • 2.3.0
    • Transactions
    • None

    Description

      The ACID insert codepath uses a sorted shuffle, while they key used for shuffle is always 0 bytes long.

      hive (sales_acid)> explain insert into sales values(1, 2, '3400-0000-0000-009', 1, null);
      
      STAGE PLANS:
        Stage: Stage-1
          Tez
            DagId: gopal_20160906172626_80261c4c-79cc-4e02-87fe-3133be404e55:2
            Edges:
              Reducer 2 <- Map 1 (SIMPLE_EDGE)
      ...
            Vertices:
              Map 1 
                  Map Operator Tree:
                      TableScan
                        alias: values__tmp__table__2
                        Statistics: Num rows: 1 Data size: 28 Basic stats: COMPLETE Column stats: NONE
                        Select Operator
                          expressions: tmp_values_col1 (type: string), tmp_values_col2 (type: string), tmp_values_col3 (type: string), tmp_values_col4 (type: string), tmp_values_col5 (type: string)
                          outputColumnNames: _col0, _col1, _col2, _col3, _col4
                          Statistics: Num rows: 1 Data size: 28 Basic stats: COMPLETE Column stats: NONE
                          Reduce Output Operator
                            sort order: 
                            Map-reduce partition columns: UDFToLong(_col1) (type: bigint)
                            Statistics: Num rows: 1 Data size: 28 Basic stats: COMPLETE Column stats: NONE
                            value expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string)
                  Execution mode: vectorized, llap
                  LLAP IO: no inputs
      

      Note the missing "+" / "-" in the Sort Order fields.

      Attachments

        1. HIVE-14707.26.patch
          437 kB
          Eugene Koifman
        2. HIVE-14707.25.patch
          392 kB
          Eugene Koifman
        3. HIVE-14707.24.patch
          368 kB
          Eugene Koifman
        4. HIVE-14707.23.patch
          368 kB
          Eugene Koifman
        5. HIVE-14707.22.patch
          364 kB
          Eugene Koifman
        6. HIVE-14707.21.patch
          351 kB
          Eugene Koifman
        7. HIVE-14707.20.patch
          351 kB
          Eugene Koifman
        8. HIVE-14707.19.patch
          342 kB
          Eugene Koifman
        9. HIVE-14707.19.patch
          341 kB
          Eugene Koifman
        10. HIVE-14707.18.patch
          341 kB
          Eugene Koifman
        11. HIVE-14707.17.patch
          340 kB
          Eugene Koifman
        12. HIVE-14707.16.patch
          340 kB
          Eugene Koifman
        13. HIVE-14707.14.patch
          338 kB
          Eugene Koifman
        14. HIVE-14707.13.patch
          328 kB
          Eugene Koifman
        15. HIVE-14707.11.patch
          305 kB
          Eugene Koifman
        16. HIVE-14707.10.patch
          291 kB
          Eugene Koifman
        17. HIVE-14707.09.patch
          272 kB
          Eugene Koifman
        18. HIVE-14707.08.patch
          78 kB
          Eugene Koifman
        19. HIVE-14707.06.patch
          48 kB
          Eugene Koifman
        20. HIVE-14707.05.patch
          41 kB
          Eugene Koifman
        21. HIVE-14707.04.patch
          17 kB
          Eugene Koifman
        22. HIVE-14707.03.patch
          5 kB
          Eugene Koifman
        23. HIVE-14707.02.patch
          5 kB
          Eugene Koifman
        24. HIVE-14707.01.patch
          4 kB
          Eugene Koifman

        Issue Links

          Activity

            People

              ekoifman Eugene Koifman
              gopalv Gopal Vijayaraghavan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: