diff --git a/03_ddl/012.gpdb.inventory.sql b/03_ddl/012.gpdb.inventory.sql index 8eed7210..cae227d7 100644 --- a/03_ddl/012.gpdb.inventory.sql +++ b/03_ddl/012.gpdb.inventory.sql @@ -7,5 +7,5 @@ CREATE TABLE tpcds.inventory ( WITH (:LARGE_STORAGE) :DISTRIBUTED_BY partition by range(inv_date_sk) -(start(2450815) INCLUSIVE end(2453005) INCLUSIVE every (100), +(start(2450815) INCLUSIVE end(2453005) INCLUSIVE every (1), default partition others); diff --git a/03_ddl/018.gpdb.store_returns.sql b/03_ddl/018.gpdb.store_returns.sql index cdbac222..2c196a49 100644 --- a/03_ddl/018.gpdb.store_returns.sql +++ b/03_ddl/018.gpdb.store_returns.sql @@ -23,5 +23,5 @@ CREATE TABLE tpcds.store_returns ( WITH (:MEDIUM_STORAGE) :DISTRIBUTED_BY partition by range(sr_returned_date_sk) -(start(2450815) INCLUSIVE end(2453005) INCLUSIVE every (100), +(start(2450815) INCLUSIVE end(2453005) INCLUSIVE every (1), default partition others); diff --git a/03_ddl/rollout.sh b/03_ddl/rollout.sh index b994f803..31add74a 100755 --- a/03_ddl/rollout.sh +++ b/03_ddl/rollout.sh @@ -13,8 +13,9 @@ SINGLE_USER_ITERATIONS=$5 #luka multiplying qiantity of partitions with EVERY=1 parameter in DDL -#EVERY for web_returns was "180" -EVERY="10" +#EVERY is used for web_returns, it was "180" in a classic TPC-DS RunningJon +# Change it less than 180 to create more partitions +EVERY="1" diff --git a/04_load/009.gpdb.warehouse.sql b/04_load/009.gpdb.warehouse.sql index 660903be..5ac29c38 100644 --- a/04_load/009.gpdb.warehouse.sql +++ b/04_load/009.gpdb.warehouse.sql @@ -1,2 +1,18 @@ TRUNCATE table tpcds.warehouse; INSERT INTO tpcds.warehouse SELECT * FROM ext_tpcds.warehouse; +insert into tpcds.warehouse select +777 as w_warehouse_sk +,'LUKAAAAAAAAAAAAA' as w_warehouse_id +,'Luka WH' as w_warehouse_name +,w_warehouse_sq_ft +,w_street_number +,w_street_name +,w_street_type +,w_suite_number +,w_city +,w_county +,w_state +,w_zip +,w_country +,w_gmt_offset +from tpcds.warehouse where w_warehouse_sk = 1; \ No newline at end of file diff --git a/04_load/018.gpdb.inventory.sql b/04_load/018.gpdb.inventory.sql index 5a67c92e..dda88393 100644 --- a/04_load/018.gpdb.inventory.sql +++ b/04_load/018.gpdb.inventory.sql @@ -1,2 +1,3 @@ TRUNCATE table tpcds.inventory; INSERT INTO tpcds.inventory SELECT * FROM ext_tpcds.inventory; +update tpcds.inventory set inv_warehouse_sk = 777 where inv_warehouse_sk < 10; \ No newline at end of file diff --git a/tpcds.sh b/tpcds.sh index 2e1d5f77..4df517d9 100755 --- a/tpcds.sh +++ b/tpcds.sh @@ -27,6 +27,11 @@ check_variables() echo "REPO_URL=\"https://github.com/ivanievlev/TPC-DS\"" >> $MYVAR new_variable=$(($new_variable + 1)) fi + local count=$(grep "REPO_BRANCH=" $MYVAR | wc -l) + if [ "$count" -eq "0" ]; then + echo "REPO_BRANCH=\"master\"" >> $MYVAR + new_variable=$(($new_variable + 1)) + fi local count=$(grep "ADMIN_USER=" $MYVAR | wc -l) if [ "$count" -eq "0" ]; then echo "ADMIN_USER=\"gpadmin\"" >> $MYVAR @@ -227,13 +232,13 @@ repo_init() echo "-------------------------------------------------------------------------" mkdir $INSTALL_DIR/$REPO chown $ADMIN_USER $INSTALL_DIR/$REPO - su -c "cd $INSTALL_DIR; GIT_SSL_NO_VERIFY=true; git clone --depth=1 $REPO_URL" $ADMIN_USER + su -c "cd $INSTALL_DIR; GIT_SSL_NO_VERIFY=true; git clone $REPO_URL; git checkout $REPO_BRANCH;" $ADMIN_USER fi else if [ "$internet_down" -eq "0" ]; then git config --global user.email "$ADMIN_USER@$HOSTNAME" git config --global user.name "$ADMIN_USER" - su -c "cd $INSTALL_DIR/$REPO; GIT_SSL_NO_VERIFY=true; git fetch --all; git reset --hard origin/master" $ADMIN_USER + su -c "cd $INSTALL_DIR/$REPO; GIT_SSL_NO_VERIFY=true; git checkout $REPO_BRANCH; git fetch --all; git reset --hard" $ADMIN_USER fi fi }