http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/llap/bucket_num_reducers.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucket_num_reducers.q.out 
b/ql/src/test/results/clientpositive/llap/bucket_num_reducers.q.out
new file mode 100644
index 0000000..f217142
--- /dev/null
+++ b/ql/src/test/results/clientpositive/llap/bucket_num_reducers.q.out
@@ -0,0 +1,202 @@
+PREHOOK: query: CREATE TABLE bucket_nr(key int, value string) CLUSTERED BY 
(key) INTO 50 BUCKETS
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@bucket_nr
+POSTHOOK: query: CREATE TABLE bucket_nr(key int, value string) CLUSTERED BY 
(key) INTO 50 BUCKETS
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@bucket_nr
+PREHOOK: query: explain extended insert overwrite table bucket_nr
+  select * from src
+PREHOOK: type: QUERY
+POSTHOOK: query: explain extended insert overwrite table bucket_nr
+  select * from src
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-2 depends on stages: Stage-1
+  Stage-0 depends on stages: Stage-2
+  Stage-3 depends on stages: Stage-0
+
+STAGE PLANS:
+  Stage: Stage-1
+    Tez
+#### A masked pattern was here ####
+      Edges:
+        Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE)
+#### A masked pattern was here ####
+      Vertices:
+        Map 1 
+            Map Operator Tree:
+                TableScan
+                  alias: src
+                  Statistics: Num rows: 500 Data size: 89000 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  GatherStats: false
+                  Select Operator
+                    expressions: key (type: string), value (type: string)
+                    outputColumnNames: _col0, _col1
+                    Statistics: Num rows: 500 Data size: 89000 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    Reduce Output Operator
+                      null sort order: 
+                      sort order: 
+                      Map-reduce partition columns: UDFToInteger(_col0) (type: 
int)
+                      Statistics: Num rows: 500 Data size: 89000 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      tag: -1
+                      value expressions: _col0 (type: string), _col1 (type: 
string)
+                      auto parallelism: false
+            Execution mode: llap
+            LLAP IO: no inputs
+            Path -> Alias:
+#### A masked pattern was here ####
+            Path -> Partition:
+#### A masked pattern was here ####
+                Partition
+                  base file name: src
+                  input format: org.apache.hadoop.mapred.TextInputFormat
+                  output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                  properties:
+                    COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
+                    bucket_count -1
+                    bucketing_version 2
+                    column.name.delimiter ,
+                    columns key,value
+                    columns.comments 'default','default'
+                    columns.types string:string
+#### A masked pattern was here ####
+                    name default.src
+                    numFiles 1
+                    numRows 500
+                    rawDataSize 5312
+                    serialization.ddl struct src { string key, string value}
+                    serialization.format 1
+                    serialization.lib 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                    totalSize 5812
+#### A masked pattern was here ####
+                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                
+                    input format: org.apache.hadoop.mapred.TextInputFormat
+                    output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                    properties:
+                      COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
+                      bucket_count -1
+                      bucketing_version 2
+                      column.name.delimiter ,
+                      columns key,value
+                      columns.comments 'default','default'
+                      columns.types string:string
+#### A masked pattern was here ####
+                      name default.src
+                      numFiles 1
+                      numRows 500
+                      rawDataSize 5312
+                      serialization.ddl struct src { string key, string value}
+                      serialization.format 1
+                      serialization.lib 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                      totalSize 5812
+#### A masked pattern was here ####
+                    serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                    name: default.src
+                  name: default.src
+            Truncated Path -> Alias:
+              /src [src]
+        Reducer 2 
+            Execution mode: llap
+            Needs Tagging: false
+            Reduce Operator Tree:
+              Select Operator
+                expressions: UDFToInteger(VALUE._col0) (type: int), 
VALUE._col1 (type: string)
+                outputColumnNames: _col0, _col1
+                Statistics: Num rows: 500 Data size: 47500 Basic stats: 
COMPLETE Column stats: COMPLETE
+                File Output Operator
+                  compressed: false
+                  GlobalTableId: 1
+#### A masked pattern was here ####
+                  NumFilesPerFileSink: 5
+                  Statistics: Num rows: 500 Data size: 47500 Basic stats: 
COMPLETE Column stats: COMPLETE
+#### A masked pattern was here ####
+                  table:
+                      input format: org.apache.hadoop.mapred.TextInputFormat
+                      output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                      properties:
+                        COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
+                        bucket_count 50
+                        bucket_field_name key
+                        bucketing_version 2
+                        column.name.delimiter ,
+                        columns key,value
+                        columns.comments 
+                        columns.types int:string
+#### A masked pattern was here ####
+                        name default.bucket_nr
+                        numFiles 0
+                        numRows 0
+                        rawDataSize 0
+                        serialization.ddl struct bucket_nr { i32 key, string 
value}
+                        serialization.format 1
+                        serialization.lib 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                        totalSize 0
+#### A masked pattern was here ####
+                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                      name: default.bucket_nr
+                  TotalFiles: 50
+                  GatherStats: true
+                  MultiFileSpray: true
+
+  Stage: Stage-2
+    Dependency Collection
+
+  Stage: Stage-0
+    Move Operator
+      tables:
+          replace: true
+#### A masked pattern was here ####
+          table:
+              input format: org.apache.hadoop.mapred.TextInputFormat
+              output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+              properties:
+                COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
+                bucket_count 50
+                bucket_field_name key
+                bucketing_version 2
+                column.name.delimiter ,
+                columns key,value
+                columns.comments 
+                columns.types int:string
+#### A masked pattern was here ####
+                name default.bucket_nr
+                numFiles 0
+                numRows 0
+                rawDataSize 0
+                serialization.ddl struct bucket_nr { i32 key, string value}
+                serialization.format 1
+                serialization.lib 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                totalSize 0
+#### A masked pattern was here ####
+              serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+              name: default.bucket_nr
+
+  Stage: Stage-3
+    Stats Work
+      Basic Stats Work:
+#### A masked pattern was here ####
+
+PREHOOK: query: insert overwrite table bucket_nr
+select * from src
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@bucket_nr
+POSTHOOK: query: insert overwrite table bucket_nr
+select * from src
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@bucket_nr
+POSTHOOK: Lineage: bucket_nr.key EXPRESSION [(src)src.FieldSchema(name:key, 
type:string, comment:default), ]
+POSTHOOK: Lineage: bucket_nr.value SIMPLE [(src)src.FieldSchema(name:value, 
type:string, comment:default), ]
+PREHOOK: query: drop table bucket_nr
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@bucket_nr
+PREHOOK: Output: default@bucket_nr
+POSTHOOK: query: drop table bucket_nr
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@bucket_nr
+POSTHOOK: Output: default@bucket_nr

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/llap/bucket_num_reducers2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucket_num_reducers2.q.out 
b/ql/src/test/results/clientpositive/llap/bucket_num_reducers2.q.out
new file mode 100644
index 0000000..d0ca23c
--- /dev/null
+++ b/ql/src/test/results/clientpositive/llap/bucket_num_reducers2.q.out
@@ -0,0 +1,242 @@
+PREHOOK: query: CREATE TABLE test_table(key int, value string) CLUSTERED BY 
(key) INTO 3 BUCKETS
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@test_table
+POSTHOOK: query: CREATE TABLE test_table(key int, value string) CLUSTERED BY 
(key) INTO 3 BUCKETS
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@test_table
+PREHOOK: query: explain extended insert overwrite table test_table
+  select * from src
+PREHOOK: type: QUERY
+POSTHOOK: query: explain extended insert overwrite table test_table
+  select * from src
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-2 depends on stages: Stage-1
+  Stage-0 depends on stages: Stage-2
+  Stage-3 depends on stages: Stage-0
+
+STAGE PLANS:
+  Stage: Stage-1
+    Tez
+#### A masked pattern was here ####
+      Edges:
+        Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE)
+#### A masked pattern was here ####
+      Vertices:
+        Map 1 
+            Map Operator Tree:
+                TableScan
+                  alias: src
+                  Statistics: Num rows: 500 Data size: 89000 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  GatherStats: false
+                  Select Operator
+                    expressions: key (type: string), value (type: string)
+                    outputColumnNames: _col0, _col1
+                    Statistics: Num rows: 500 Data size: 89000 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    Reduce Output Operator
+                      null sort order: 
+                      sort order: 
+                      Map-reduce partition columns: UDFToInteger(_col0) (type: 
int)
+                      Statistics: Num rows: 500 Data size: 89000 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      tag: -1
+                      value expressions: _col0 (type: string), _col1 (type: 
string)
+                      auto parallelism: false
+            Execution mode: vectorized, llap
+            LLAP IO: no inputs
+            Path -> Alias:
+#### A masked pattern was here ####
+            Path -> Partition:
+#### A masked pattern was here ####
+                Partition
+                  base file name: src
+                  input format: org.apache.hadoop.mapred.TextInputFormat
+                  output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                  properties:
+                    COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
+                    bucket_count -1
+                    bucketing_version 2
+                    column.name.delimiter ,
+                    columns key,value
+                    columns.comments 'default','default'
+                    columns.types string:string
+#### A masked pattern was here ####
+                    name default.src
+                    numFiles 1
+                    numRows 500
+                    rawDataSize 5312
+                    serialization.ddl struct src { string key, string value}
+                    serialization.format 1
+                    serialization.lib 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                    totalSize 5812
+#### A masked pattern was here ####
+                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                
+                    input format: org.apache.hadoop.mapred.TextInputFormat
+                    output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                    properties:
+                      COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
+                      bucket_count -1
+                      bucketing_version 2
+                      column.name.delimiter ,
+                      columns key,value
+                      columns.comments 'default','default'
+                      columns.types string:string
+#### A masked pattern was here ####
+                      name default.src
+                      numFiles 1
+                      numRows 500
+                      rawDataSize 5312
+                      serialization.ddl struct src { string key, string value}
+                      serialization.format 1
+                      serialization.lib 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                      totalSize 5812
+#### A masked pattern was here ####
+                    serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                    name: default.src
+                  name: default.src
+            Truncated Path -> Alias:
+              /src [src]
+        Reducer 2 
+            Execution mode: llap
+            Needs Tagging: false
+            Reduce Operator Tree:
+              Select Operator
+                expressions: UDFToInteger(VALUE._col0) (type: int), 
VALUE._col1 (type: string)
+                outputColumnNames: _col0, _col1
+                Statistics: Num rows: 500 Data size: 47500 Basic stats: 
COMPLETE Column stats: COMPLETE
+                File Output Operator
+                  compressed: false
+                  GlobalTableId: 1
+#### A masked pattern was here ####
+                  NumFilesPerFileSink: 3
+                  Statistics: Num rows: 500 Data size: 47500 Basic stats: 
COMPLETE Column stats: COMPLETE
+#### A masked pattern was here ####
+                  table:
+                      input format: org.apache.hadoop.mapred.TextInputFormat
+                      output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                      properties:
+                        COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
+                        bucket_count 3
+                        bucket_field_name key
+                        bucketing_version 2
+                        column.name.delimiter ,
+                        columns key,value
+                        columns.comments 
+                        columns.types int:string
+#### A masked pattern was here ####
+                        name default.test_table
+                        numFiles 0
+                        numRows 0
+                        rawDataSize 0
+                        serialization.ddl struct test_table { i32 key, string 
value}
+                        serialization.format 1
+                        serialization.lib 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                        totalSize 0
+#### A masked pattern was here ####
+                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                      name: default.test_table
+                  TotalFiles: 3
+                  GatherStats: true
+                  MultiFileSpray: true
+                Select Operator
+                  expressions: _col0 (type: int), _col1 (type: string)
+                  outputColumnNames: key, value
+                  Statistics: Num rows: 500 Data size: 47500 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Group By Operator
+                    aggregations: compute_stats(key, 'hll'), 
compute_stats(value, 'hll')
+                    mode: complete
+                    outputColumnNames: _col0, _col1
+                    Statistics: Num rows: 1 Data size: 864 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    Select Operator
+                      expressions: _col0 (type: 
struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>),
 _col1 (type: 
struct<columntype:string,maxlength:bigint,avglength:double,countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>)
+                      outputColumnNames: _col0, _col1
+                      Statistics: Num rows: 1 Data size: 864 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      File Output Operator
+                        compressed: false
+                        GlobalTableId: 0
+#### A masked pattern was here ####
+                        NumFilesPerFileSink: 1
+                        Statistics: Num rows: 1 Data size: 864 Basic stats: 
COMPLETE Column stats: COMPLETE
+#### A masked pattern was here ####
+                        table:
+                            input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                            output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                            properties:
+                              columns _col0,_col1
+                              columns.types 
struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>:struct<columntype:string,maxlength:bigint,avglength:double,countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>
+                              escape.delim \
+                              
hive.serialization.extend.additional.nesting.levels true
+                              serialization.escape.crlf true
+                              serialization.format 1
+                              serialization.lib 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                            serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                        TotalFiles: 1
+                        GatherStats: false
+                        MultiFileSpray: false
+
+  Stage: Stage-2
+    Dependency Collection
+
+  Stage: Stage-0
+    Move Operator
+      tables:
+          replace: true
+#### A masked pattern was here ####
+          table:
+              input format: org.apache.hadoop.mapred.TextInputFormat
+              output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+              properties:
+                COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
+                bucket_count 3
+                bucket_field_name key
+                bucketing_version 2
+                column.name.delimiter ,
+                columns key,value
+                columns.comments 
+                columns.types int:string
+#### A masked pattern was here ####
+                name default.test_table
+                numFiles 0
+                numRows 0
+                rawDataSize 0
+                serialization.ddl struct test_table { i32 key, string value}
+                serialization.format 1
+                serialization.lib 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                totalSize 0
+#### A masked pattern was here ####
+              serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+              name: default.test_table
+
+  Stage: Stage-3
+    Stats Work
+      Basic Stats Work:
+#### A masked pattern was here ####
+      Column Stats Desc:
+          Columns: key, value
+          Column Types: int, string
+          Table: default.test_table
+          Is Table Level Stats: true
+
+PREHOOK: query: insert overwrite table test_table
+select * from src
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@test_table
+POSTHOOK: query: insert overwrite table test_table
+select * from src
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@test_table
+POSTHOOK: Lineage: test_table.key EXPRESSION [(src)src.FieldSchema(name:key, 
type:string, comment:default), ]
+POSTHOOK: Lineage: test_table.value SIMPLE [(src)src.FieldSchema(name:value, 
type:string, comment:default), ]
+PREHOOK: query: drop table test_table
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@test_table
+PREHOOK: Output: default@test_table
+POSTHOOK: query: drop table test_table
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@test_table
+POSTHOOK: Output: default@test_table

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/llap/bucket_num_reducers_acid2.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/bucket_num_reducers_acid2.q.out 
b/ql/src/test/results/clientpositive/llap/bucket_num_reducers_acid2.q.out
new file mode 100644
index 0000000..8a4b54a
--- /dev/null
+++ b/ql/src/test/results/clientpositive/llap/bucket_num_reducers_acid2.q.out
@@ -0,0 +1,84 @@
+PREHOOK: query: drop table if exists bucket_nr_acid2
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table if exists bucket_nr_acid2
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table bucket_nr_acid2 (a int, b int) clustered by (a) 
into 4 buckets stored as orc TBLPROPERTIES ('transactional'='true')
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@bucket_nr_acid2
+POSTHOOK: query: create table bucket_nr_acid2 (a int, b int) clustered by (a) 
into 4 buckets stored as orc TBLPROPERTIES ('transactional'='true')
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@bucket_nr_acid2
+PREHOOK: query: insert into bucket_nr_acid2 values(0,1),(1,1)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@bucket_nr_acid2
+POSTHOOK: query: insert into bucket_nr_acid2 values(0,1),(1,1)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@bucket_nr_acid2
+POSTHOOK: Lineage: bucket_nr_acid2.a SCRIPT []
+POSTHOOK: Lineage: bucket_nr_acid2.b SCRIPT []
+PREHOOK: query: insert into bucket_nr_acid2 values(2,2),(3,2)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@bucket_nr_acid2
+POSTHOOK: query: insert into bucket_nr_acid2 values(2,2),(3,2)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@bucket_nr_acid2
+POSTHOOK: Lineage: bucket_nr_acid2.a SCRIPT []
+POSTHOOK: Lineage: bucket_nr_acid2.b SCRIPT []
+PREHOOK: query: insert into bucket_nr_acid2 values(0,3),(1,3)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@bucket_nr_acid2
+POSTHOOK: query: insert into bucket_nr_acid2 values(0,3),(1,3)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@bucket_nr_acid2
+POSTHOOK: Lineage: bucket_nr_acid2.a SCRIPT []
+POSTHOOK: Lineage: bucket_nr_acid2.b SCRIPT []
+PREHOOK: query: insert into bucket_nr_acid2 values(2,4),(3,4)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@bucket_nr_acid2
+POSTHOOK: query: insert into bucket_nr_acid2 values(2,4),(3,4)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@bucket_nr_acid2
+POSTHOOK: Lineage: bucket_nr_acid2.a SCRIPT []
+POSTHOOK: Lineage: bucket_nr_acid2.b SCRIPT []
+PREHOOK: query: update bucket_nr_acid2 set b = -1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@bucket_nr_acid2
+PREHOOK: Output: default@bucket_nr_acid2
+POSTHOOK: query: update bucket_nr_acid2 set b = -1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@bucket_nr_acid2
+POSTHOOK: Output: default@bucket_nr_acid2
+PREHOOK: query: select * from bucket_nr_acid2 order by a, b
+PREHOOK: type: QUERY
+PREHOOK: Input: default@bucket_nr_acid2
+#### A masked pattern was here ####
+POSTHOOK: query: select * from bucket_nr_acid2 order by a, b
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@bucket_nr_acid2
+#### A masked pattern was here ####
+0      -1
+0      -1
+1      -1
+1      -1
+2      -1
+2      -1
+3      -1
+3      -1
+PREHOOK: query: drop table bucket_nr_acid2
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@bucket_nr_acid2
+PREHOOK: Output: default@bucket_nr_acid2
+POSTHOOK: query: drop table bucket_nr_acid2
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@bucket_nr_acid2
+POSTHOOK: Output: default@bucket_nr_acid2

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/llap/bucketmapjoin1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucketmapjoin1.q.out 
b/ql/src/test/results/clientpositive/llap/bucketmapjoin1.q.out
index 61db738..bbd689a 100644
--- a/ql/src/test/results/clientpositive/llap/bucketmapjoin1.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucketmapjoin1.q.out
@@ -439,6 +439,7 @@ STAGE PLANS:
                   properties:
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -460,6 +461,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -540,6 +542,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -587,6 +590,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -668,6 +672,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -859,6 +864,7 @@ STAGE PLANS:
                   properties:
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -880,6 +886,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -960,6 +967,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1007,6 +1015,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -1088,6 +1097,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/llap/bucketmapjoin2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucketmapjoin2.q.out 
b/ql/src/test/results/clientpositive/llap/bucketmapjoin2.q.out
index d6f541d..633e6b8 100644
--- a/ql/src/test/results/clientpositive/llap/bucketmapjoin2.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucketmapjoin2.q.out
@@ -176,6 +176,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -254,6 +255,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -301,6 +303,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -382,6 +385,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -602,6 +606,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -680,6 +685,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -727,6 +733,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -808,6 +815,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -1045,6 +1053,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1123,6 +1132,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1171,6 +1181,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1219,6 +1230,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -1300,6 +1312,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/llap/bucketmapjoin3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucketmapjoin3.q.out 
b/ql/src/test/results/clientpositive/llap/bucketmapjoin3.q.out
index e37a618..e73c2af 100644
--- a/ql/src/test/results/clientpositive/llap/bucketmapjoin3.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucketmapjoin3.q.out
@@ -200,6 +200,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -278,6 +279,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -325,6 +327,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -406,6 +409,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -626,6 +630,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -704,6 +709,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -751,6 +757,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -832,6 +839,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/llap/bucketmapjoin4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucketmapjoin4.q.out 
b/ql/src/test/results/clientpositive/llap/bucketmapjoin4.q.out
index c8deac4..23ef650 100644
--- a/ql/src/test/results/clientpositive/llap/bucketmapjoin4.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucketmapjoin4.q.out
@@ -175,6 +175,7 @@ STAGE PLANS:
                   properties:
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -196,6 +197,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -251,6 +253,7 @@ STAGE PLANS:
                   properties:
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -272,6 +275,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -321,6 +325,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -402,6 +407,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -585,6 +591,7 @@ STAGE PLANS:
                   properties:
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -606,6 +613,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -661,6 +669,7 @@ STAGE PLANS:
                   properties:
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -682,6 +691,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -731,6 +741,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -812,6 +823,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE 
{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/llap/bucketmapjoin7.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucketmapjoin7.q.out 
b/ql/src/test/results/clientpositive/llap/bucketmapjoin7.q.out
index 1e87e1a..ad740c841 100644
--- a/ql/src/test/results/clientpositive/llap/bucketmapjoin7.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucketmapjoin7.q.out
@@ -134,6 +134,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -209,6 +210,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/llap/bucketpruning1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucketpruning1.q.out 
b/ql/src/test/results/clientpositive/llap/bucketpruning1.q.out
index 83070e6..f54f328 100644
--- a/ql/src/test/results/clientpositive/llap/bucketpruning1.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucketpruning1.q.out
@@ -34,7 +34,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: (key = 1) (type: boolean)
-                  buckets included: [1,] of 16
+                  buckets included: [13,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE 
Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -96,7 +96,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: (key = 16) (type: boolean)
-                  buckets included: [0,] of 16
+                  buckets included: [3,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE 
Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -158,7 +158,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: (key = 17) (type: boolean)
-                  buckets included: [1,] of 16
+                  buckets included: [12,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE 
Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -220,7 +220,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: (key = 17) (type: boolean)
-                  buckets included: [1,] of 16
+                  buckets included: [12,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE 
Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -282,7 +282,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: (key = 11) (type: boolean)
-                  buckets included: [11,] of 16
+                  buckets included: [5,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE 
Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -344,7 +344,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: ((key = 1) and (ds = '2008-04-08')) (type: 
boolean)
-                  buckets included: [1,] of 16
+                  buckets included: [13,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE 
Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -406,7 +406,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: ((key = 1) and (ds = '2008-04-08') and (value = 
'One')) (type: boolean)
-                  buckets included: [1,] of 16
+                  buckets included: [13,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE 
Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -468,7 +468,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: ((value = 'One') and (key = 1) and (ds = 
'2008-04-08')) (type: boolean)
-                  buckets included: [1,] of 16
+                  buckets included: [13,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE 
Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -530,7 +530,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: (key) IN (2, 3) (type: boolean)
-                  buckets included: [2,3,] of 16
+                  buckets included: [4,6,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE 
Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -592,7 +592,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: ((key) IN (2, 3) and (ds = '2008-04-08')) (type: 
boolean)
-                  buckets included: [2,3,] of 16
+                  buckets included: [4,6,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE 
Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -654,7 +654,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: ((key) IN (2, 3) and (ds = '2008-04-08') and 
(value = 'One')) (type: boolean)
-                  buckets included: [2,3,] of 16
+                  buckets included: [4,6,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE 
Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -716,7 +716,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: ((key) IN (2, 3) and (value = 'One') and (ds = 
'2008-04-08')) (type: boolean)
-                  buckets included: [2,3,] of 16
+                  buckets included: [4,6,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE 
Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -900,7 +900,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: (key = -15) (type: boolean)
-                  buckets included: [1,15,] of 16
+                  buckets included: [6,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE 
Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -962,6 +962,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: (key) IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 
13, 14, 15, 16, 17) (type: boolean)
+                  buckets included: [1,3,4,5,6,8,11,12,13,15,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE 
Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -1023,6 +1024,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: ((key) IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
12, 13, 14, 15, 16, 17) and (ds = '2008-04-08')) (type: boolean)
+                  buckets included: [1,3,4,5,6,8,11,12,13,15,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE 
Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -1084,6 +1086,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: ((key) IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
12, 13, 14, 15, 16, 17) and (ds = '2008-04-08') and (value = 'One')) (type: 
boolean)
+                  buckets included: [1,3,4,5,6,8,11,12,13,15,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE 
Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -1145,6 +1148,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: ((key) IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
12, 13, 14, 15, 16, 17) and (value = 'One') and (ds = '2008-04-08')) (type: 
boolean)
+                  buckets included: [1,3,4,5,6,8,11,12,13,15,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE 
Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_2.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_2.q.out 
b/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_2.q.out
index 49827b4..35dc60e 100644
--- a/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_2.q.out
@@ -252,18 +252,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
 2      val_2val_2      1
-4      val_4val_4      1
-8      val_8val_8      1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -274,6 +263,16 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+4      val_4val_4      1
 5      val_5val_5      1
 5      val_5val_5      1
 5      val_5val_5      1
@@ -283,6 +282,7 @@ POSTHOOK: Input: default@test_table3@ds=1
 5      val_5val_5      1
 5      val_5val_5      1
 5      val_5val_5      1
+8      val_8val_8      1
 9      val_9val_9      1
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '1')
@@ -462,6 +462,18 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+2      val_2val_2      1
+2      val_2val_2      1
+PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@test_table3
+PREHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
+POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_table3
+POSTHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
 0      val_0val_0      1
 0      val_0val_0      1
 0      val_0val_0      1
@@ -480,22 +492,8 @@ POSTHOOK: Input: default@test_table3@ds=1
 0      val_0val_0      1
 0      val_0val_0      1
 0      val_0val_0      1
-2      val_2val_2      1
-2      val_2val_2      1
 4      val_4val_4      1
 4      val_4val_4      1
-8      val_8val_8      1
-8      val_8val_8      1
-PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
-PREHOOK: type: QUERY
-PREHOOK: Input: default@test_table3
-PREHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
-POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@test_table3
-POSTHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
 5      val_5val_5      1
 5      val_5val_5      1
 5      val_5val_5      1
@@ -514,6 +512,8 @@ POSTHOOK: Input: default@test_table3@ds=1
 5      val_5val_5      1
 5      val_5val_5      1
 5      val_5val_5      1
+8      val_8val_8      1
+8      val_8val_8      1
 9      val_9val_9      1
 9      val_9val_9      1
 PREHOOK: query: EXPLAIN
@@ -694,6 +694,18 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+2      val_2val_2      1
+2      val_2val_2      1
+PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@test_table3
+PREHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
+POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_table3
+POSTHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
 0      val_0val_0      1
 0      val_0val_0      1
 0      val_0val_0      1
@@ -712,22 +724,8 @@ POSTHOOK: Input: default@test_table3@ds=1
 0      val_0val_0      1
 0      val_0val_0      1
 0      val_0val_0      1
-2      val_2val_2      1
-2      val_2val_2      1
 4      val_4val_4      1
 4      val_4val_4      1
-8      val_8val_8      1
-8      val_8val_8      1
-PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
-PREHOOK: type: QUERY
-PREHOOK: Input: default@test_table3
-PREHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
-POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@test_table3
-POSTHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
 5      val_5val_5      1
 5      val_5val_5      1
 5      val_5val_5      1
@@ -746,6 +744,8 @@ POSTHOOK: Input: default@test_table3@ds=1
 5      val_5val_5      1
 5      val_5val_5      1
 5      val_5val_5      1
+8      val_8val_8      1
+8      val_8val_8      1
 9      val_9val_9      1
 9      val_9val_9      1
 PREHOOK: query: EXPLAIN
@@ -936,18 +936,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
 2      val_2val_2      1
-4      val_4val_4      1
-8      val_8val_8      1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -958,6 +947,16 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+4      val_4val_4      1
 5      val_5val_5      1
 5      val_5val_5      1
 5      val_5val_5      1
@@ -967,6 +966,7 @@ POSTHOOK: Input: default@test_table3@ds=1
 5      val_5val_5      1
 5      val_5val_5      1
 5      val_5val_5      1
+8      val_8val_8      1
 9      val_9val_9      1
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '1')
@@ -1156,18 +1156,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0      val_0val_0val_0val_0    1
-0      val_0val_0val_0val_0    1
-0      val_0val_0val_0val_0    1
-0      val_0val_0val_0val_0    1
-0      val_0val_0val_0val_0    1
-0      val_0val_0val_0val_0    1
-0      val_0val_0val_0val_0    1
-0      val_0val_0val_0val_0    1
-0      val_0val_0val_0val_0    1
 2      val_2val_2val_2val_2    1
-4      val_4val_4val_4val_4    1
-8      val_8val_8val_8val_8    1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -1178,6 +1167,16 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0      val_0val_0val_0val_0    1
+0      val_0val_0val_0val_0    1
+0      val_0val_0val_0val_0    1
+0      val_0val_0val_0val_0    1
+0      val_0val_0val_0val_0    1
+0      val_0val_0val_0val_0    1
+0      val_0val_0val_0val_0    1
+0      val_0val_0val_0val_0    1
+0      val_0val_0val_0val_0    1
+4      val_4val_4val_4val_4    1
 5      val_5val_5val_5val_5    1
 5      val_5val_5val_5val_5    1
 5      val_5val_5val_5val_5    1
@@ -1187,6 +1186,7 @@ POSTHOOK: Input: default@test_table3@ds=1
 5      val_5val_5val_5val_5    1
 5      val_5val_5val_5val_5    1
 5      val_5val_5val_5val_5    1
+8      val_8val_8val_8val_8    1
 9      val_9val_9val_9val_9    1
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '1')
@@ -1376,17 +1376,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-4      val_2val_2      1
-8      val_4val_4      1
 10     val_5val_5      1
 10     val_5val_5      1
 10     val_5val_5      1
@@ -1396,8 +1385,6 @@ POSTHOOK: Input: default@test_table3@ds=1
 10     val_5val_5      1
 10     val_5val_5      1
 10     val_5val_5      1
-16     val_8val_8      1
-18     val_9val_9      1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -1408,3 +1395,16 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+4      val_2val_2      1
+8      val_4val_4      1
+16     val_8val_8      1
+18     val_9val_9      1

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_6.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_6.q.out 
b/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_6.q.out
index 56e93ac..9e80eab 100644
--- a/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_6.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_6.q.out
@@ -231,16 +231,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
-PREHOOK: type: QUERY
-PREHOOK: Input: default@test_table3
-PREHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
-POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@test_table3
-POSTHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
 0      1       val_0val_0      1
 0      1       val_0val_0      1
 0      1       val_0val_0      1
@@ -252,6 +242,17 @@ POSTHOOK: Input: default@test_table3@ds=1
 0      1       val_0val_0      1
 2      3       val_2val_2      1
 4      5       val_4val_4      1
+8      9       val_8val_8      1
+PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@test_table3
+PREHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
+POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_table3
+POSTHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
 5      6       val_5val_5      1
 5      6       val_5val_5      1
 5      6       val_5val_5      1
@@ -261,7 +262,6 @@ POSTHOOK: Input: default@test_table3@ds=1
 5      6       val_5val_5      1
 5      6       val_5val_5      1
 5      6       val_5val_5      1
-8      9       val_8val_8      1
 9      10      val_9val_9      1
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '1')
@@ -452,16 +452,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
-PREHOOK: type: QUERY
-PREHOOK: Input: default@test_table3
-PREHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
-POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@test_table3
-POSTHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
 0      1       val_0val_0      1
 0      1       val_0val_0      1
 0      1       val_0val_0      1
@@ -473,6 +463,17 @@ POSTHOOK: Input: default@test_table3@ds=1
 0      1       val_0val_0      1
 2      3       val_2val_2      1
 4      5       val_4val_4      1
+8      9       val_8val_8      1
+PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@test_table3
+PREHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
+POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_table3
+POSTHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
 5      6       val_5val_5      1
 5      6       val_5val_5      1
 5      6       val_5val_5      1
@@ -482,7 +483,6 @@ POSTHOOK: Input: default@test_table3@ds=1
 5      6       val_5val_5      1
 5      6       val_5val_5      1
 5      6       val_5val_5      1
-8      9       val_8val_8      1
 9      10      val_9val_9      1
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '1')
@@ -979,16 +979,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
-PREHOOK: type: QUERY
-PREHOOK: Input: default@test_table3
-PREHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
-POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@test_table3
-POSTHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
 0      1       val_0val_0      1
 0      1       val_0val_0      1
 0      1       val_0val_0      1
@@ -1000,6 +990,17 @@ POSTHOOK: Input: default@test_table3@ds=1
 0      1       val_0val_0      1
 2      3       val_2val_2      1
 4      5       val_4val_4      1
+8      9       val_8val_8      1
+PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@test_table3
+PREHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
+POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_table3
+POSTHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
 5      6       val_5val_5      1
 5      6       val_5val_5      1
 5      6       val_5val_5      1
@@ -1009,7 +1010,6 @@ POSTHOOK: Input: default@test_table3@ds=1
 5      6       val_5val_5      1
 5      6       val_5val_5      1
 5      6       val_5val_5      1
-8      9       val_8val_8      1
 9      10      val_9val_9      1
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '1')
@@ -1212,16 +1212,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
-PREHOOK: type: QUERY
-PREHOOK: Input: default@test_table3
-PREHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
-POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@test_table3
-POSTHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
 0      1       val_0val_0      1
 0      1       val_0val_0      1
 0      1       val_0val_0      1
@@ -1233,6 +1223,17 @@ POSTHOOK: Input: default@test_table3@ds=1
 0      1       val_0val_0      1
 2      3       val_2val_2      1
 4      5       val_4val_4      1
+8      9       val_8val_8      1
+PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@test_table3
+PREHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
+POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_table3
+POSTHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
 5      6       val_5val_5      1
 5      6       val_5val_5      1
 5      6       val_5val_5      1
@@ -1242,7 +1243,6 @@ POSTHOOK: Input: default@test_table3@ds=1
 5      6       val_5val_5      1
 5      6       val_5val_5      1
 5      6       val_5val_5      1
-8      9       val_8val_8      1
 9      10      val_9val_9      1
 PREHOOK: query: CREATE TABLE test_table4 (key INT, key2 INT, value STRING) 
PARTITIONED BY (ds STRING)
 CLUSTERED BY (key, key2) SORTED BY (key DESC, key2 DESC) INTO 2 BUCKETS

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_7.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_7.q.out 
b/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_7.q.out
index da28ae4..34890e0 100644
--- a/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_7.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_7.q.out
@@ -232,15 +232,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -251,6 +242,15 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
 5      val_5val_5      1
 5      val_5val_5      1
 5      val_5val_5      1
@@ -448,15 +448,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -467,6 +458,15 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
 5      val_5val_5      1
 5      val_5val_5      1
 5      val_5val_5      1
@@ -668,15 +668,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
-0      val_0val_0      1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s 
where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -687,6 +678,15 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
+0      val_0val_0      1
 5      val_5val_5      1
 5      val_5val_5      1
 5      val_5val_5      1

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/llap/cbo_rp_views.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/cbo_rp_views.q.out 
b/ql/src/test/results/clientpositive/llap/cbo_rp_views.q.out
index 25ea4cf..44e5501 100644
--- a/ql/src/test/results/clientpositive/llap/cbo_rp_views.q.out
+++ b/ql/src/test/results/clientpositive/llap/cbo_rp_views.q.out
@@ -50,9 +50,9 @@ POSTHOOK: Input: default@cbo_t1
 POSTHOOK: Input: default@cbo_t1@dt=2014
 POSTHOOK: Input: default@v1
 #### A masked pattern was here ####
-1
 NULL
 1
+1
 PREHOOK: query: select count(v1.c_int)  from v1 join cbo_t2 on v1.c_int = 
cbo_t2.c_int
 PREHOOK: type: QUERY
 PREHOOK: Input: default@cbo_t1

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/llap/cbo_views.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/cbo_views.q.out 
b/ql/src/test/results/clientpositive/llap/cbo_views.q.out
index 25ea4cf..44e5501 100644
--- a/ql/src/test/results/clientpositive/llap/cbo_views.q.out
+++ b/ql/src/test/results/clientpositive/llap/cbo_views.q.out
@@ -50,9 +50,9 @@ POSTHOOK: Input: default@cbo_t1
 POSTHOOK: Input: default@cbo_t1@dt=2014
 POSTHOOK: Input: default@v1
 #### A masked pattern was here ####
-1
 NULL
 1
+1
 PREHOOK: query: select count(v1.c_int)  from v1 join cbo_t2 on v1.c_int = 
cbo_t2.c_int
 PREHOOK: type: QUERY
 PREHOOK: Input: default@cbo_t1

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/llap/check_constraint.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/check_constraint.q.out 
b/ql/src/test/results/clientpositive/llap/check_constraint.q.out
index f06dcd1..d763a44 100644
--- a/ql/src/test/results/clientpositive/llap/check_constraint.q.out
+++ b/ql/src/test/results/clientpositive/llap/check_constraint.q.out
@@ -39,6 +39,7 @@ Retention:            0
 #### A masked pattern was here ####
 Table Type:            MANAGED_TABLE            
 Table Parameters:               
+       bucketing_version       2                   
        transactional           true                
        transactional_properties        default             
 #### A masked pattern was here ####
@@ -206,6 +207,7 @@ Retention:                  0
 #### A masked pattern was here ####
 Table Type:            MANAGED_TABLE            
 Table Parameters:               
+       bucketing_version       2                   
 #### A masked pattern was here ####
                 
 # Storage Information           
@@ -423,6 +425,7 @@ Retention:                  0
 #### A masked pattern was here ####
 Table Type:            MANAGED_TABLE            
 Table Parameters:               
+       bucketing_version       2                   
 #### A masked pattern was here ####
                 
 # Storage Information           
@@ -573,6 +576,7 @@ Retention:                  0
 Table Type:            MANAGED_TABLE            
 Table Parameters:               
        COLUMN_STATS_ACCURATE   {\"BASIC_STATS\":\"true\"}
+       bucketing_version       2                   
        numFiles                0                   
        totalSize               0                   
 #### A masked pattern was here ####
@@ -732,6 +736,7 @@ Retention:                  0
 #### A masked pattern was here ####
 Table Type:            MANAGED_TABLE            
 Table Parameters:               
+       bucketing_version       2                   
 #### A masked pattern was here ####
                 
 # Storage Information           
@@ -877,6 +882,7 @@ Retention:                  0
 #### A masked pattern was here ####
 Table Type:            MANAGED_TABLE            
 Table Parameters:               
+       bucketing_version       2                   
 #### A masked pattern was here ####
                 
 # Storage Information           
@@ -1101,6 +1107,7 @@ Retention:                0
 #### A masked pattern was here ####
 Table Type:            MANAGED_TABLE            
 Table Parameters:               
+       bucketing_version       2                   
 #### A masked pattern was here ####
                 
 # Storage Information           
@@ -1256,6 +1263,7 @@ Retention:                0
 #### A masked pattern was here ####
 Table Type:            MANAGED_TABLE            
 Table Parameters:               
+       bucketing_version       2                   
        transactional           true                
        transactional_properties        default             
 #### A masked pattern was here ####
@@ -1611,16 +1619,16 @@ POSTHOOK: query: select * from acid_uami
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@acid_uami
 #### A masked pattern was here ####
-8      8.00    val_8
-4      4.00    val_4
 2      2.00    val_2
-0      0.00    val_0
-0      0.00    val_0
-0      0.00    val_0
 9      9.00    val_9
+8      8.00    val_8
 5      5.00    val_5
 5      5.00    val_5
 5      5.00    val_5
+4      4.00    val_4
+0      0.00    val_0
+0      0.00    val_0
+0      0.00    val_0
 10     10.00   val_10
 0      0.00    val_0
 0      0.00    val_0
@@ -1757,16 +1765,16 @@ POSTHOOK: query: select * from acid_uami
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@acid_uami
 #### A masked pattern was here ####
-114    114.00  val_114
-104    104.00  val_104
-100    100.00  val_100
-10     10.00   val_10
-0      0.00    val_0
 113    113.00  val_113
+105    105.00  val_105
+10     10.00   val_10
+114    114.00  val_114
 111    111.00  val_111
 11     11.00   val_11
-105    105.00  val_105
+104    104.00  val_104
 103    103.00  val_103
+100    100.00  val_100
+0      0.00    val_0
 PREHOOK: query: truncate table acid_uami
 PREHOOK: type: TRUNCATETABLE
 PREHOOK: Output: default@acid_uami
@@ -2109,6 +2117,7 @@ Retention:                0
 #### A masked pattern was here ####
 Table Type:            MANAGED_TABLE            
 Table Parameters:               
+       bucketing_version       2                   
        transactional           true                
        transactional_properties        default             
 #### A masked pattern was here ####
@@ -2817,6 +2826,7 @@ Retention:                0
 #### A masked pattern was here ####
 Table Type:            MANAGED_TABLE            
 Table Parameters:               
+       bucketing_version       2                   
        transactional           true                
        transactional_properties        default             
 #### A masked pattern was here ####
@@ -2866,6 +2876,7 @@ Retention:                0
 #### A masked pattern was here ####
 Table Type:            MANAGED_TABLE            
 Table Parameters:               
+       bucketing_version       2                   
        transactional           true                
        transactional_properties        default             
 #### A masked pattern was here ####
@@ -3014,6 +3025,7 @@ Retention:                0
 #### A masked pattern was here ####
 Table Type:            MANAGED_TABLE            
 Table Parameters:               
+       bucketing_version       2                   
        transactional           true                
        transactional_properties        default             
 #### A masked pattern was here ####
@@ -3373,6 +3385,7 @@ Retention:                0
 #### A masked pattern was here ####
 Table Type:            MANAGED_TABLE            
 Table Parameters:               
+       bucketing_version       2                   
 #### A masked pattern was here ####
        transactional           true                
        transactional_properties        insert_only         
@@ -3429,6 +3442,7 @@ Retention:                0
 #### A masked pattern was here ####
 Table Type:            MANAGED_TABLE            
 Table Parameters:               
+       bucketing_version       2                   
        transactional           true                
        transactional_properties        insert_only         
 #### A masked pattern was here ####
@@ -3551,6 +3565,7 @@ Retention:                0
 #### A masked pattern was here ####
 Table Type:            MANAGED_TABLE            
 Table Parameters:               
+       bucketing_version       2                   
        numFiles                1                   
        totalSize               5                   
        transactional           true                

Reply via email to