You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by tm...@apache.org on 2021/03/03 00:38:44 UTC

[impala] 02/06: IMPALA-10547: Restore TPC-DS "reason" table missing from Kudu schema

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

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

commit 466c26047b13ea67b9bc3eef91d14d5c9c19db61
Author: David Rorke <dr...@cloudera.com>
AuthorDate: Wed Feb 24 16:41:53 2021 -0800

    IMPALA-10547: Restore TPC-DS "reason" table missing from Kudu schema
    
    Restore the missing "reason" table that was inadvertantly removed from the
    Kudu TPC-DS schema by a previous commit.
    
    Testing:
    - Manually run load-tpc-kudu.py and verify that it correctly creates the reason
      table.  Manually run TPC-DS query 9 which references the reason table.
    
    Change-Id: Ic9c83ecbb8ca07c082f6407842ca67ef81194751
    Reviewed-on: http://gerrit.cloudera.org:8080/17117
    Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
    Reviewed-by: Grant Henke <gr...@apache.org>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 testdata/datasets/tpcds/tpcds_kudu_template.sql | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/testdata/datasets/tpcds/tpcds_kudu_template.sql b/testdata/datasets/tpcds/tpcds_kudu_template.sql
index c0a8760..a4c48ed 100644
--- a/testdata/datasets/tpcds/tpcds_kudu_template.sql
+++ b/testdata/datasets/tpcds/tpcds_kudu_template.sql
@@ -760,6 +760,18 @@ TBLPROPERTIES ('kudu.master_addresses'='{kudu_master}:7051');
 
 INSERT INTO {target_db_name}.income_band SELECT * FROM {source_db_name}.income_band;
 
+---- REASON
+CREATE TABLE IF NOT EXISTS {target_db_name}.reason (
+  r_reason_sk BIGINT PRIMARY KEY,
+  r_reason_id STRING,
+  r_reason_desc STRING
+)
+PARTITION BY HASH (r_reason_sk) PARTITIONS {buckets}
+STORED AS KUDU
+TBLPROPERTIES ('kudu.master_addresses'='{kudu_master}:7051');
+
+INSERT INTO {target_db_name}.reason SELECT * FROM {source_db_name}.reason;
+
 ---- SHIP_MODE
 CREATE TABLE IF NOT EXISTS {target_db_name}.ship_mode (
   sm_ship_mode_sk BIGINT PRIMARY KEY,