This is an automated email from the ASF dual-hosted git repository.

pvary pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new 8f1a5b6854d HIVE-26334: Remove misleading bucketing info from DESCRIBE 
FORMATTED output for Iceberg tables (Peter Vary reviewed by Laszlo Pinter) 
(#3378)
8f1a5b6854d is described below

commit 8f1a5b6854daf5fb4814632f9356ef5fe7bb6964
Author: pvary <[email protected]>
AuthorDate: Wed Jun 22 15:24:05 2022 +0200

    HIVE-26334: Remove misleading bucketing info from DESCRIBE FORMATTED output 
for Iceberg tables (Peter Vary reviewed by Laszlo Pinter) (#3378)
---
 .../positive/alter_multi_part_table_to_iceberg.q.out   |  6 ------
 .../results/positive/alter_part_table_to_iceberg.q.out |  6 ------
 .../test/results/positive/alter_table_to_iceberg.q.out |  6 ------
 .../test/results/positive/create_iceberg_table.q.out   |  2 --
 .../create_iceberg_table_stored_as_fileformat.q.out    | 10 ----------
 .../create_iceberg_table_stored_by_iceberg.q.out       |  2 --
 ..._table_stored_by_iceberg_with_serdeproperties.q.out |  2 --
 .../test/results/positive/describe_iceberg_table.q.out |  8 --------
 .../positive/truncate_force_iceberg_table.q.out        |  4 ----
 .../test/results/positive/truncate_iceberg_table.q.out | 10 ----------
 .../positive/truncate_partitioned_iceberg_table.q.out  |  4 ----
 .../info/desc/formatter/TextDescTableFormatter.java    | 18 +++++++++++-------
 12 files changed, 11 insertions(+), 67 deletions(-)

diff --git 
a/iceberg/iceberg-handler/src/test/results/positive/alter_multi_part_table_to_iceberg.q.out
 
b/iceberg/iceberg-handler/src/test/results/positive/alter_multi_part_table_to_iceberg.q.out
index fa26ad2a650..5f7af3f68cf 100644
--- 
a/iceberg/iceberg-handler/src/test/results/positive/alter_multi_part_table_to_iceberg.q.out
+++ 
b/iceberg/iceberg-handler/src/test/results/positive/alter_multi_part_table_to_iceberg.q.out
@@ -213,8 +213,6 @@ SerDe Library:              
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: select * from tbl_orc order by a
 PREHOOK: type: QUERY
@@ -462,8 +460,6 @@ SerDe Library:              
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: select * from tbl_parquet order by a
 PREHOOK: type: QUERY
@@ -711,8 +707,6 @@ SerDe Library:              
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: select * from tbl_avro order by a
 PREHOOK: type: QUERY
diff --git 
a/iceberg/iceberg-handler/src/test/results/positive/alter_part_table_to_iceberg.q.out
 
b/iceberg/iceberg-handler/src/test/results/positive/alter_part_table_to_iceberg.q.out
index caab6dfa829..ca580ca464b 100644
--- 
a/iceberg/iceberg-handler/src/test/results/positive/alter_part_table_to_iceberg.q.out
+++ 
b/iceberg/iceberg-handler/src/test/results/positive/alter_part_table_to_iceberg.q.out
@@ -168,8 +168,6 @@ SerDe Library:              
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: select * from tbl_orc order by a
 PREHOOK: type: QUERY
@@ -366,8 +364,6 @@ SerDe Library:              
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: select * from tbl_parquet order by a
 PREHOOK: type: QUERY
@@ -564,8 +560,6 @@ SerDe Library:              
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: select * from tbl_avro order by a
 PREHOOK: type: QUERY
diff --git 
a/iceberg/iceberg-handler/src/test/results/positive/alter_table_to_iceberg.q.out
 
b/iceberg/iceberg-handler/src/test/results/positive/alter_table_to_iceberg.q.out
index 2910a52311d..bde0774838b 100644
--- 
a/iceberg/iceberg-handler/src/test/results/positive/alter_table_to_iceberg.q.out
+++ 
b/iceberg/iceberg-handler/src/test/results/positive/alter_table_to_iceberg.q.out
@@ -124,8 +124,6 @@ SerDe Library:              
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: select * from tbl_orc order by a
 PREHOOK: type: QUERY
@@ -274,8 +272,6 @@ SerDe Library:              
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: select * from tbl_parquet order by a
 PREHOOK: type: QUERY
@@ -424,8 +420,6 @@ SerDe Library:              
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: select * from tbl_avro order by a
 PREHOOK: type: QUERY
diff --git 
a/iceberg/iceberg-handler/src/test/results/positive/create_iceberg_table.q.out 
b/iceberg/iceberg-handler/src/test/results/positive/create_iceberg_table.q.out
index f540f2d233b..5df4e76e51f 100644
--- 
a/iceberg/iceberg-handler/src/test/results/positive/create_iceberg_table.q.out
+++ 
b/iceberg/iceberg-handler/src/test/results/positive/create_iceberg_table.q.out
@@ -45,8 +45,6 @@ SerDe Library:        
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: DROP TABLE ice_t
 PREHOOK: type: DROPTABLE
diff --git 
a/iceberg/iceberg-handler/src/test/results/positive/create_iceberg_table_stored_as_fileformat.q.out
 
b/iceberg/iceberg-handler/src/test/results/positive/create_iceberg_table_stored_as_fileformat.q.out
index f7c2d7024ec..fe76a31b224 100644
--- 
a/iceberg/iceberg-handler/src/test/results/positive/create_iceberg_table_stored_as_fileformat.q.out
+++ 
b/iceberg/iceberg-handler/src/test/results/positive/create_iceberg_table_stored_as_fileformat.q.out
@@ -50,8 +50,6 @@ SerDe Library:        
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: DROP TABLE ice_orc
 PREHOOK: type: DROPTABLE
@@ -113,8 +111,6 @@ SerDe Library:              
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: DROP TABLE ice_parquet
 PREHOOK: type: DROPTABLE
@@ -176,8 +172,6 @@ SerDe Library:              
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: DROP TABLE ice_avro
 PREHOOK: type: DROPTABLE
@@ -239,8 +233,6 @@ SerDe Library:              
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: DROP TABLE ice_t
 PREHOOK: type: DROPTABLE
@@ -299,8 +291,6 @@ SerDe Library:              
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: DROP TABLE ice_t
 PREHOOK: type: DROPTABLE
diff --git 
a/iceberg/iceberg-handler/src/test/results/positive/create_iceberg_table_stored_by_iceberg.q.out
 
b/iceberg/iceberg-handler/src/test/results/positive/create_iceberg_table_stored_by_iceberg.q.out
index f540f2d233b..5df4e76e51f 100644
--- 
a/iceberg/iceberg-handler/src/test/results/positive/create_iceberg_table_stored_by_iceberg.q.out
+++ 
b/iceberg/iceberg-handler/src/test/results/positive/create_iceberg_table_stored_by_iceberg.q.out
@@ -45,8 +45,6 @@ SerDe Library:        
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: DROP TABLE ice_t
 PREHOOK: type: DROPTABLE
diff --git 
a/iceberg/iceberg-handler/src/test/results/positive/create_iceberg_table_stored_by_iceberg_with_serdeproperties.q.out
 
b/iceberg/iceberg-handler/src/test/results/positive/create_iceberg_table_stored_by_iceberg_with_serdeproperties.q.out
index 5f7bb9fdca1..59603b64115 100644
--- 
a/iceberg/iceberg-handler/src/test/results/positive/create_iceberg_table_stored_by_iceberg_with_serdeproperties.q.out
+++ 
b/iceberg/iceberg-handler/src/test/results/positive/create_iceberg_table_stored_by_iceberg_with_serdeproperties.q.out
@@ -46,8 +46,6 @@ SerDe Library:        
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: DROP TABLE ice_t
 PREHOOK: type: DROPTABLE
diff --git 
a/iceberg/iceberg-handler/src/test/results/positive/describe_iceberg_table.q.out
 
b/iceberg/iceberg-handler/src/test/results/positive/describe_iceberg_table.q.out
index 79bbc150a3f..99936486cb8 100644
--- 
a/iceberg/iceberg-handler/src/test/results/positive/describe_iceberg_table.q.out
+++ 
b/iceberg/iceberg-handler/src/test/results/positive/describe_iceberg_table.q.out
@@ -85,8 +85,6 @@ SerDe Library:        
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: DESCRIBE FORMATTED ice_t_transform
 PREHOOK: type: DESCTABLE
@@ -140,8 +138,6 @@ SerDe Library:              
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: DESCRIBE FORMATTED ice_t_transform_prop
 PREHOOK: type: DESCTABLE
@@ -196,8 +192,6 @@ SerDe Library:              
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: DESCRIBE FORMATTED ice_t_identity_part
 PREHOOK: type: DESCTABLE
@@ -240,8 +234,6 @@ SerDe Library:              
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: DESCRIBE FORMATTED ice_t i
 PREHOOK: type: DESCTABLE
diff --git 
a/iceberg/iceberg-handler/src/test/results/positive/truncate_force_iceberg_table.q.out
 
b/iceberg/iceberg-handler/src/test/results/positive/truncate_force_iceberg_table.q.out
index 764aae5f8f3..79c5f540b9d 100644
--- 
a/iceberg/iceberg-handler/src/test/results/positive/truncate_force_iceberg_table.q.out
+++ 
b/iceberg/iceberg-handler/src/test/results/positive/truncate_force_iceberg_table.q.out
@@ -109,8 +109,6 @@ SerDe Library:              
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: truncate test_truncate force
 PREHOOK: type: TRUNCATETABLE
@@ -176,8 +174,6 @@ SerDe Library:              
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: drop table if exists test_truncate
 PREHOOK: type: DROPTABLE
diff --git 
a/iceberg/iceberg-handler/src/test/results/positive/truncate_iceberg_table.q.out
 
b/iceberg/iceberg-handler/src/test/results/positive/truncate_iceberg_table.q.out
index d4c95a2fa88..a66b376f9bc 100644
--- 
a/iceberg/iceberg-handler/src/test/results/positive/truncate_iceberg_table.q.out
+++ 
b/iceberg/iceberg-handler/src/test/results/positive/truncate_iceberg_table.q.out
@@ -109,8 +109,6 @@ SerDe Library:              
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: truncate test_truncate
 PREHOOK: type: TRUNCATETABLE
@@ -176,8 +174,6 @@ SerDe Library:              
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: insert into test_truncate values (1, 
'one'),(2,'two'),(3,'three'),(4,'four'),(5,'five')
 PREHOOK: type: QUERY
@@ -241,8 +237,6 @@ SerDe Library:              
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: truncate test_truncate
 PREHOOK: type: TRUNCATETABLE
@@ -308,8 +302,6 @@ SerDe Library:              
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: insert into test_truncate values (1, 
'one'),(2,'two'),(3,'three'),(4,'four'),(5,'five')
 PREHOOK: type: QUERY
@@ -391,8 +383,6 @@ SerDe Library:              
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: drop table if exists test_truncate
 PREHOOK: type: DROPTABLE
diff --git 
a/iceberg/iceberg-handler/src/test/results/positive/truncate_partitioned_iceberg_table.q.out
 
b/iceberg/iceberg-handler/src/test/results/positive/truncate_partitioned_iceberg_table.q.out
index a3baf702afb..82923c519de 100644
--- 
a/iceberg/iceberg-handler/src/test/results/positive/truncate_partitioned_iceberg_table.q.out
+++ 
b/iceberg/iceberg-handler/src/test/results/positive/truncate_partitioned_iceberg_table.q.out
@@ -121,8 +121,6 @@ SerDe Library:              
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: select * from test_truncate
 PREHOOK: type: QUERY
@@ -215,8 +213,6 @@ SerDe Library:              
org.apache.iceberg.mr.hive.HiveIcebergSerDe
 InputFormat:           org.apache.iceberg.mr.hive.HiveIcebergInputFormat       
 
 OutputFormat:          org.apache.iceberg.mr.hive.HiveIcebergOutputFormat      
 
 Compressed:            No                       
-Num Buckets:           0                        
-Bucket Columns:        []                       
 Sort Columns:          []                       
 PREHOOK: query: drop table if exists test_truncate
 PREHOOK: type: DROPTABLE
diff --git 
a/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/info/desc/formatter/TextDescTableFormatter.java
 
b/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/info/desc/formatter/TextDescTableFormatter.java
index fe088f0dbe0..53273b9810c 100644
--- 
a/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/info/desc/formatter/TextDescTableFormatter.java
+++ 
b/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/info/desc/formatter/TextDescTableFormatter.java
@@ -199,7 +199,7 @@ class TextDescTableFormatter extends DescTableFormatter {
       throws IOException, UnsupportedEncodingException {
     String formattedTableInfo = null;
     if (partition != null) {
-      formattedTableInfo = getPartitionInformation(partition);
+      formattedTableInfo = getPartitionInformation(table, partition);
     } else {
       formattedTableInfo = getTableInformation(table, isOutputPadded);
     }
@@ -216,7 +216,7 @@ class TextDescTableFormatter extends DescTableFormatter {
     getTableMetaDataInformation(tableInfo, table, isOutputPadded);
 
     tableInfo.append(LINE_DELIM).append("# Storage 
Information").append(LINE_DELIM);
-    getStorageDescriptorInfo(tableInfo, table.getTTable().getSd());
+    getStorageDescriptorInfo(tableInfo, table, table.getTTable().getSd());
 
     if (table.isView() || table.isMaterializedView()) {
       String viewInfoTitle = "# " + (table.isView() ? "" : "Materialized ") + 
"View Information";
@@ -227,14 +227,14 @@ class TextDescTableFormatter extends DescTableFormatter {
     return tableInfo.toString();
   }
 
-  private String getPartitionInformation(Partition partition) {
+  private String getPartitionInformation(Table table, Partition partition) {
     StringBuilder tableInfo = new StringBuilder(DEFAULT_STRINGBUILDER_SIZE);
     tableInfo.append(LINE_DELIM).append("# Detailed Partition 
Information").append(LINE_DELIM);
     getPartitionMetaDataInformation(tableInfo, partition);
 
     if (partition.getTable().getTableType() != TableType.VIRTUAL_VIEW) {
       tableInfo.append(LINE_DELIM).append("# Storage 
Information").append(LINE_DELIM);
-      getStorageDescriptorInfo(tableInfo, partition.getTPartition().getSd());
+      getStorageDescriptorInfo(tableInfo, table, 
partition.getTPartition().getSd());
     }
 
     return tableInfo.toString();
@@ -267,13 +267,17 @@ class TextDescTableFormatter extends DescTableFormatter {
     }
   }
 
-  private void getStorageDescriptorInfo(StringBuilder tableInfo, 
StorageDescriptor storageDesc) {
+  private void getStorageDescriptorInfo(StringBuilder tableInfo, Table table, 
StorageDescriptor storageDesc) {
     formatOutput("SerDe Library:", 
storageDesc.getSerdeInfo().getSerializationLib(), tableInfo);
     formatOutput("InputFormat:", storageDesc.getInputFormat(), tableInfo);
     formatOutput("OutputFormat:", storageDesc.getOutputFormat(), tableInfo);
     formatOutput("Compressed:", storageDesc.isCompressed() ? "Yes" : "No", 
tableInfo);
-    formatOutput("Num Buckets:", String.valueOf(storageDesc.getNumBuckets()), 
tableInfo);
-    formatOutput("Bucket Columns:", storageDesc.getBucketCols().toString(), 
tableInfo);
+    if (!table.isNonNative() || table.getStorageHandler() == null ||
+        !table.getStorageHandler().supportsPartitionTransform()) {
+      // The Iceberg partition transform already contains the bucketing 
information, and these are not relevant there
+      formatOutput("Num Buckets:", 
String.valueOf(storageDesc.getNumBuckets()), tableInfo);
+      formatOutput("Bucket Columns:", storageDesc.getBucketCols().toString(), 
tableInfo);
+    }
     formatOutput("Sort Columns:", storageDesc.getSortCols().toString(), 
tableInfo);
 
     if (storageDesc.isStoredAsSubDirectories()) {

Reply via email to