deniskuzZ commented on code in PR #6184:
URL: https://github.com/apache/hive/pull/6184#discussion_r2613799228


##########
iceberg/iceberg-handler/src/test/results/positive/llap/iceberg_alter_locally_zordered_table.q.out:
##########
@@ -0,0 +1,370 @@
+PREHOOK: query: create table ice_orc_zorder (id int, name string, age int, 
city string) stored by iceberg stored as orc
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@ice_orc_zorder
+POSTHOOK: query: create table ice_orc_zorder (id int, name string, age int, 
city string) stored by iceberg stored as orc
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@ice_orc_zorder
+PREHOOK: query: describe formatted ice_orc_zorder
+PREHOOK: type: DESCTABLE
+PREHOOK: Input: default@ice_orc_zorder
+POSTHOOK: query: describe formatted ice_orc_zorder
+POSTHOOK: type: DESCTABLE
+POSTHOOK: Input: default@ice_orc_zorder
+# col_name             data_type               comment             
+id                     int                                         
+name                   string                                      
+age                    int                                         
+city                   string                                      
+                
+# Detailed Table Information            
+Database:              default                  
+#### A masked pattern was here ####
+Retention:             0                        
+#### A masked pattern was here ####
+Table Type:            EXTERNAL_TABLE           
+Table Parameters:               
+       COLUMN_STATS_ACCURATE   
{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"age\":\"true\",\"city\":\"true\",\"id\":\"true\",\"name\":\"true\"}}
+       EXTERNAL                TRUE                
+       bucketing_version       2                   
+       current-schema          
{\"type\":\"struct\",\"schema-id\":0,\"fields\":[{\"id\":1,\"name\":\"id\",\"required\":false,\"type\":\"int\"},{\"id\":2,\"name\":\"name\",\"required\":false,\"type\":\"string\"},{\"id\":3,\"name\":\"age\",\"required\":false,\"type\":\"int\"},{\"id\":4,\"name\":\"city\",\"required\":false,\"type\":\"string\"}]}
+       format-version          2                   
+       iceberg.orc.files.only  true                
+#### A masked pattern was here ####
+       numFiles                0                   
+       numRows                 0                   
+       parquet.compression     zstd                
+       rawDataSize             0                   
+       serialization.format    1                   
+       snapshot-count          0                   
+       storage_handler         
org.apache.iceberg.mr.hive.HiveIcebergStorageHandler
+       table_type              ICEBERG             
+       totalSize               #Masked#                   
+#### A masked pattern was here ####
+       uuid                    #Masked#
+       write.delete.mode       merge-on-read       
+       write.format.default    orc                 
+       write.merge.mode        merge-on-read       
+       write.update.mode       merge-on-read       
+                
+# Storage Information           
+SerDe Library:         org.apache.iceberg.mr.hive.HiveIcebergSerDe      
+InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
+OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
+Compressed:            No                       
+Sort Columns:          []                       
+PREHOOK: query: explain insert into ice_orc_zorder values (1, 'Alice', 30, 
'NYC'),(2, 'Bob', 25, 'LA'),(3, 'Charlie', 35, 'SF')
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@ice_orc_zorder
+POSTHOOK: query: explain insert into ice_orc_zorder values (1, 'Alice', 30, 
'NYC'),(2, 'Bob', 25, 'LA'),(3, 'Charlie', 35, 'SF')
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@ice_orc_zorder
+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: _dummy_table
+                  Row Limit Per Split: 1
+                  Statistics: Num rows: 1 Data size: 10 Basic stats: COMPLETE 
Column stats: COMPLETE
+                  Select Operator
+                    expressions: array(const struct(1,'Alice',30,'NYC'),const 
struct(2,'Bob',25,'LA'),const struct(3,'Charlie',35,'SF')) (type: 
array<struct<col1:int,col2:string,col3:int,col4:string>>)
+                    outputColumnNames: _col0
+                    Statistics: Num rows: 1 Data size: 64 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    UDTF Operator
+                      Statistics: Num rows: 1 Data size: 64 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      function name: inline
+                      Select Operator
+                        expressions: col1 (type: int), col2 (type: string), 
col3 (type: int), col4 (type: string)
+                        outputColumnNames: _col0, _col1, _col2, _col3
+                        Statistics: Num rows: 1 Data size: 8 Basic stats: 
COMPLETE Column stats: COMPLETE
+                        File Output Operator
+                          compressed: false
+                          Statistics: Num rows: 1 Data size: 8 Basic stats: 
COMPLETE Column stats: COMPLETE
+                          table:
+                              input format: 
org.apache.iceberg.mr.hive.HiveIcebergInputFormat
+                              output format: 
org.apache.iceberg.mr.hive.HiveIcebergOutputFormat
+                              serde: 
org.apache.iceberg.mr.hive.HiveIcebergSerDe
+                              name: default.ice_orc_zorder
+                        Select Operator
+                          expressions: _col0 (type: int), _col1 (type: 
string), _col2 (type: int), _col3 (type: string)
+                          outputColumnNames: id, name, age, city
+                          Statistics: Num rows: 1 Data size: 8 Basic stats: 
COMPLETE Column stats: COMPLETE
+                          Group By Operator
+                            aggregations: min(id), max(id), count(1), 
count(id), compute_bit_vector_hll(id), max(length(name)), 
avg(COALESCE(length(name),0)), count(name), compute_bit_vector_hll(name), 
min(age), max(age), count(age), compute_bit_vector_hll(age), max(length(city)), 
avg(COALESCE(length(city),0)), count(city), compute_bit_vector_hll(city)
+                            minReductionHashAggr: 0.4
+                            mode: hash
+                            outputColumnNames: _col0, _col1, _col2, _col3, 
_col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, 
_col14, _col15, _col16
+                            Statistics: Num rows: 1 Data size: 792 Basic 
stats: COMPLETE Column stats: COMPLETE
+                            Reduce Output Operator
+                              null sort order: 
+                              sort order: 
+                              Statistics: Num rows: 1 Data size: 792 Basic 
stats: COMPLETE Column stats: COMPLETE
+                              value expressions: _col0 (type: int), _col1 
(type: int), _col2 (type: bigint), _col3 (type: bigint), _col4 (type: binary), 
_col5 (type: int), _col6 (type: struct<count:bigint,sum:double,input:int>), 
_col7 (type: bigint), _col8 (type: binary), _col9 (type: int), _col10 (type: 
int), _col11 (type: bigint), _col12 (type: binary), _col13 (type: int), _col14 
(type: struct<count:bigint,sum:double,input:int>), _col15 (type: bigint), 
_col16 (type: binary)
+            Execution mode: llap
+            LLAP IO: no inputs
+        Reducer 2 
+            Execution mode: vectorized, llap
+            Reduce Operator Tree:
+              Group By Operator
+                aggregations: min(VALUE._col0), max(VALUE._col1), 
count(VALUE._col2), count(VALUE._col3), compute_bit_vector_hll(VALUE._col4), 
max(VALUE._col5), avg(VALUE._col6), count(VALUE._col7), 
compute_bit_vector_hll(VALUE._col8), min(VALUE._col9), max(VALUE._col10), 
count(VALUE._col11), compute_bit_vector_hll(VALUE._col12), max(VALUE._col13), 
avg(VALUE._col14), count(VALUE._col15), compute_bit_vector_hll(VALUE._col16)
+                mode: mergepartial
+                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, 
_col16
+                Statistics: Num rows: 1 Data size: 656 Basic stats: COMPLETE 
Column stats: COMPLETE
+                Select Operator
+                  expressions: 'LONG' (type: string), UDFToLong(_col0) (type: 
bigint), UDFToLong(_col1) (type: bigint), (_col2 - _col3) (type: bigint), 
COALESCE(ndv_compute_bit_vector(_col4),0) (type: bigint), _col4 (type: binary), 
'STRING' (type: string), UDFToLong(COALESCE(_col5,0)) (type: bigint), 
COALESCE(_col6,0) (type: double), (_col2 - _col7) (type: bigint), 
COALESCE(ndv_compute_bit_vector(_col8),0) (type: bigint), _col8 (type: binary), 
'LONG' (type: string), UDFToLong(_col9) (type: bigint), UDFToLong(_col10) 
(type: bigint), (_col2 - _col11) (type: bigint), 
COALESCE(ndv_compute_bit_vector(_col12),0) (type: bigint), _col12 (type: 
binary), 'STRING' (type: string), UDFToLong(COALESCE(_col13,0)) (type: bigint), 
COALESCE(_col14,0) (type: double), (_col2 - _col15) (type: bigint), 
COALESCE(ndv_compute_bit_vector(_col16),0) (type: bigint), _col16 (type: binary)
+                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, 
_col16, _col17, _col18, _col19, _col20, _col21, _col22, _col23
+                  Statistics: Num rows: 1 Data size: 1060 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  File Output Operator
+                    compressed: false
+                    Statistics: Num rows: 1 Data size: 1060 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    table:
+                        input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                        output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                        serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+
+  Stage: Stage-2
+    Dependency Collection
+
+  Stage: Stage-0
+    Move Operator
+      tables:
+          replace: false
+          table:
+              input format: org.apache.iceberg.mr.hive.HiveIcebergInputFormat
+              output format: org.apache.iceberg.mr.hive.HiveIcebergOutputFormat
+              serde: org.apache.iceberg.mr.hive.HiveIcebergSerDe
+              name: default.ice_orc_zorder
+
+  Stage: Stage-3
+    Stats Work
+      Basic Stats Work:
+      Column Stats Desc:
+          Columns: id, name, age, city
+          Column Types: int, string, int, string
+          Table: default.ice_orc_zorder
+
+PREHOOK: query: alter table ice_orc_zorder set WRITE ORDERED BY ZORDER (id, 
age)
+PREHOOK: type: ALTERTABLE_SET_WRITE_ORDER
+PREHOOK: Input: default@ice_orc_zorder
+PREHOOK: Output: default@ice_orc_zorder
+POSTHOOK: query: alter table ice_orc_zorder set WRITE ORDERED BY ZORDER (id, 
age)
+POSTHOOK: type: ALTERTABLE_SET_WRITE_ORDER
+POSTHOOK: Input: default@ice_orc_zorder
+POSTHOOK: Output: default@ice_orc_zorder
+PREHOOK: query: describe formatted ice_orc_zorder
+PREHOOK: type: DESCTABLE
+PREHOOK: Input: default@ice_orc_zorder
+POSTHOOK: query: describe formatted ice_orc_zorder
+POSTHOOK: type: DESCTABLE
+POSTHOOK: Input: default@ice_orc_zorder
+# col_name             data_type               comment             
+id                     int                                         
+name                   string                                      
+age                    int                                         
+city                   string                                      
+                
+# Detailed Table Information            
+Database:              default                  
+#### A masked pattern was here ####
+Retention:             0                        
+#### A masked pattern was here ####
+Table Type:            EXTERNAL_TABLE           
+Table Parameters:               
+       COLUMN_STATS_ACCURATE   
{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"age\":\"true\",\"city\":\"true\",\"id\":\"true\",\"name\":\"true\"}}
+       EXTERNAL                TRUE                
+       bucketing_version       2                   
+       current-schema          
{\"type\":\"struct\",\"schema-id\":0,\"fields\":[{\"id\":1,\"name\":\"id\",\"required\":false,\"type\":\"int\"},{\"id\":2,\"name\":\"name\",\"required\":false,\"type\":\"string\"},{\"id\":3,\"name\":\"age\",\"required\":false,\"type\":\"int\"},{\"id\":4,\"name\":\"city\",\"required\":false,\"type\":\"string\"}]}
+       format-version          2                   
+       iceberg.orc.files.only  true                
+#### A masked pattern was here ####
+       numFiles                0                   
+       numRows                 0                   
+       parquet.compression     zstd                
+#### A masked pattern was here ####
+       rawDataSize             0                   
+       serialization.format    1                   
+       snapshot-count          0                   
+       sort.columns            id,age              
+       sort.order              ZORDER              

Review Comment:
   👍 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to