You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by st...@apache.org on 2022/07/18 01:04:54 UTC

[impala] branch master updated (776483021 -> d029ae536)

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

stigahuang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git


    from 776483021 IMPALA-11430: Support custom hash schema for Kudu range tables
     new e1fea843e IMPALA-11433: Remove misleading bucketing info from DESCRIBE FORMATTED output for Iceberg tables
     new d029ae536 IMPALA-11426: [DOCS] Fix quotes not paired in doc 'impala_alter_table.xml'

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 docs/topics/impala_alter_table.xml                      |  4 ++--
 .../org/apache/impala/util/HiveMetadataFormatUtils.java | 17 ++++++++++-------
 .../queries/QueryTest/iceberg-create.test               | 11 +++++++++++
 3 files changed, 23 insertions(+), 9 deletions(-)


[impala] 02/02: IMPALA-11426: [DOCS] Fix quotes not paired in doc 'impala_alter_table.xml'

Posted by st...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit d029ae53676c8637bc4f56b80b331920c8289108
Author: yx91490 <yx...@126.com>
AuthorDate: Wed Jul 13 20:16:50 2022 +0800

    IMPALA-11426: [DOCS] Fix quotes not paired in doc 'impala_alter_table.xml'
    
    Change-Id: Ic29292cd3c6247fbf7c604d0618e5fbae53b2f01
    Reviewed-on: http://gerrit.cloudera.org:8080/18723
    Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 docs/topics/impala_alter_table.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/topics/impala_alter_table.xml b/docs/topics/impala_alter_table.xml
index 8798025ce..3c64ce99d 100644
--- a/docs/topics/impala_alter_table.xml
+++ b/docs/topics/impala_alter_table.xml
@@ -102,7 +102,7 @@ ALTER TABLE <varname>name</varname> [PARTITION (<varname>partition_spec</varname
   | SERDEPROPERTIES (<varname>serde_properties</varname>) }
 
 <ph rev="2.6.0 IMPALA-3369">ALTER TABLE <varname>name</varname> <varname>colname</varname>
-  ('<varname>statsKey</varname>'='<varname>val</varname>, ...)
+  ('<varname>statsKey</varname>'='<varname>val</varname>', ...)
 
 statsKey ::= numDVs | numNulls | avgSize | maxSize</ph>
 
@@ -1096,7 +1096,7 @@ alter table sales_data add partition (zipcode = cast(9021 * 10 as string));</cod
           the metastore database that Impala uses to refer to the table. To change which
           underlying Kudu table is associated with an Impala table name, you must change the
           <codeph>TBLPROPERTIES</codeph> property of the table: <codeph>SET
-          TBLPROPERTIES('kudu.table_name'='<varname>kudu_tbl_name</varname>)</codeph>. You can
+          TBLPROPERTIES('kudu.table_name'='<varname>kudu_tbl_name</varname>')</codeph>. You can
           only change underlying Kudu tables for the external tables.
         </li>
       </ul>


[impala] 01/02: IMPALA-11433: Remove misleading bucketing info from DESCRIBE FORMATTED output for Iceberg tables

Posted by st...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit e1fea843ea2654d3acfef152e1a073dbef91aa9c
Author: LPL <li...@sensorsdata.cn>
AuthorDate: Fri Jul 15 19:31:07 2022 +0800

    IMPALA-11433: Remove misleading bucketing info from DESCRIBE FORMATTED output for Iceberg tables
    
    The DESCRIBE FORMATTED output show this even for bucketed Iceberg
    tables:
    
    | Num Buckets:      | 0     | NULL |
    | Bucket Columns:   | []    | NULL |
    
    We should remove them, and the user should rely on the information in
    the '# Partition Transform Information' block instead.
    
    Testing:
     - add e2e tests
     - tested in a real cluster
    
    Change-Id: Idc156c932780f0f12c935a1a60ff6606d59bb1da
    Reviewed-on: http://gerrit.cloudera.org:8080/18735
    Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 .../org/apache/impala/util/HiveMetadataFormatUtils.java | 17 ++++++++++-------
 .../queries/QueryTest/iceberg-create.test               | 11 +++++++++++
 2 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/fe/src/main/java/org/apache/impala/util/HiveMetadataFormatUtils.java b/fe/src/main/java/org/apache/impala/util/HiveMetadataFormatUtils.java
index 6af28b2c5..58b262b18 100644
--- a/fe/src/main/java/org/apache/impala/util/HiveMetadataFormatUtils.java
+++ b/fe/src/main/java/org/apache/impala/util/HiveMetadataFormatUtils.java
@@ -45,9 +45,10 @@ import org.apache.hadoop.hive.metastore.api.LongColumnStatsData;
 import org.apache.hadoop.hive.metastore.api.StorageDescriptor;
 import org.apache.hadoop.hive.metastore.api.StringColumnStatsData;
 import org.apache.hadoop.hive.metastore.api.Table;
-import org.apache.hadoop.hive.ql.metadata.PrimaryKeyInfo;
 import org.apache.hadoop.hive.ql.metadata.ForeignKeyInfo;
+import org.apache.hadoop.hive.ql.metadata.PrimaryKeyInfo;
 import org.apache.hadoop.hive.serde2.io.DateWritable;
+import org.apache.impala.catalog.IcebergTable;
 
 /**
  * Most of the code in this class is copied from Hive 2.1.1. This is used so that
@@ -514,7 +515,7 @@ public class HiveMetadataFormatUtils {
 
     // Storage information.
     tableInfo.append(LINE_DELIM).append("# Storage Information").append(LINE_DELIM);
-    getStorageDescriptorInfo(tableInfo, table.getSd());
+    getStorageDescriptorInfo(tableInfo, table);
 
     if (TableType.VIRTUAL_VIEW.equals(TableType.valueOf(table.getTableType()))) {
       tableInfo.append(LINE_DELIM).append("# View Information").append(LINE_DELIM);
@@ -632,16 +633,18 @@ public class HiveMetadataFormatUtils {
     return "UNKNOWN";
   }
 
-  private static void getStorageDescriptorInfo(StringBuilder tableInfo,
-      StorageDescriptor storageDesc) {
-
+  private static void getStorageDescriptorInfo(StringBuilder tableInfo, Table table) {
+    StorageDescriptor storageDesc = table.getSd();
     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 (!IcebergTable.isIcebergTable(table)) {
+      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()) {// optional parameter
       formatOutput("Stored As SubDirectories:", "Yes", tableInfo);
diff --git a/testdata/workloads/functional-query/queries/QueryTest/iceberg-create.test b/testdata/workloads/functional-query/queries/QueryTest/iceberg-create.test
index a4a7223a0..630809892 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/iceberg-create.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/iceberg-create.test
@@ -450,6 +450,9 @@ describe formatted ice_part_hadoop_tbl;
 'col_truncate','TRUNCATE[2]','NULL'
 'col_bucket','BUCKET[2]','NULL'
 'col_identity','IDENTITY','NULL'
+---- RESULTS: VERIFY_IS_NOT_IN
+'Num Buckets:        ','0                   ','NULL'
+'Bucket Columns:     ','[]                  ','NULL'
 ---- TYPES
 string, string, string
 ====
@@ -490,6 +493,9 @@ describe formatted ice_part_hadoop_catalog;
 'col_truncate','TRUNCATE[2]','NULL'
 'col_bucket','BUCKET[2]','NULL'
 'col_identity','IDENTITY','NULL'
+---- RESULTS: VERIFY_IS_NOT_IN
+'Num Buckets:        ','0                   ','NULL'
+'Bucket Columns:     ','[]                  ','NULL'
 ---- TYPES
 string, string, string
 ====
@@ -527,6 +533,9 @@ describe formatted ice_part_catalogs;
 'col_truncate','TRUNCATE[2]','NULL'
 'col_bucket','BUCKET[2]','NULL'
 'col_identity','IDENTITY','NULL'
+---- RESULTS: VERIFY_IS_NOT_IN
+'Num Buckets:        ','0                   ','NULL'
+'Bucket Columns:     ','[]                  ','NULL'
 ---- TYPES
 string, string, string
 ====
@@ -540,6 +549,8 @@ describe formatted ice_non_partition;
 ---- RESULTS: VERIFY_IS_NOT_IN
 '# Partition Transform Information','NULL','NULL'
 '# col_name            ','transform_type      ','NULL'
+'Num Buckets:        ','0                   ','NULL'
+'Bucket Columns:     ','[]                  ','NULL'
 ---- TYPES
 string, string, string
 ====