Hive
  1. Hive
  2. HIVE-3289

sort merge join may not work silently

    Details

    • Release Note:
      This patch adds the configuration property 'hive.enforce.sortmergebucketmapjoin', which is set to false by default.

      Description

      The user does not know, if the sort-merge join is working or not.

      create table table_asc(key int, value string) CLUSTERED BY (key) SORTED BY (key asc)
      INTO 1 BUCKETS STORED AS RCFILE;
      create table table_desc(key int, value string) CLUSTERED BY (key) SORTED BY (key desc)
      INTO 1 BUCKETS STORED AS RCFILE;

      set hive.enforce.sorting = true;

      insert overwrite table table_asc select key, value from src;
      insert overwrite table table_desc select key, value from src;

      set hive.optimize.bucketmapjoin = true;
      set hive.optimize.bucketmapjoin.sortedmerge = true;
      set hive.input.format = org.apache.hadoop.hive.ql.io.BucketizedHiveInputFormat;

      explain
      select /+mapjoin(a)/ * from table_asc a join table_desc b on a.key = b.key;
      select /+mapjoin(a)/ * from table_asc a join table_desc b on a.key = b.key;

      explain
      select /+mapjoin(b)/ * from table_asc a join table_desc b on a.key = b.key;
      select /+mapjoin(b)/ * from table_asc a join table_desc b on a.key = b.key;

      In the above test, the sort-merge join is not obeyed as expected.
      If you user explicitly asked for sort-merge join, and it is not being
      obeyed, the operation should fail.

        Issue Links

          Activity

          Namit Jain created issue -
          Navis made changes -
          Field Original Value New Value
          Link This issue is related to HIVE-3270 [ HIVE-3270 ]
          Namit Jain made changes -
          Assignee Namit Jain [ namit ]
          Namit Jain made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Carl Steinbach made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Namit Jain made changes -
          Attachment hive.3289.1.patch [ 12537978 ]
          Namit Jain made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Carl Steinbach made changes -
          Component/s Configuration [ 12312591 ]
          Component/s Query Processor [ 12312586 ]
          Carl Steinbach made changes -
          Release Note This patch adds the configuration property 'hive.enforce.sortmergebucketmapjoin', which is set to false by default.
          Carl Steinbach made changes -
          Link This issue relates HIVE-3322 [ HIVE-3322 ]
          Kevin Wilfong made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Kevin Wilfong made changes -
          Fix Version/s 0.10.0 [ 12320745 ]
          Affects Version/s 0.10.0 [ 12320745 ]
          Ashutosh Chauhan made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Gavin made changes -
          Link This issue relates to HIVE-3322 [ HIVE-3322 ]
          Gavin made changes -
          Link This issue relates to HIVE-3322 [ HIVE-3322 ]

            People

            • Assignee:
              Namit Jain
              Reporter:
              Namit Jain
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development