forked from apache/doris
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
129 changed files
with
13,990 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
regression-test/suites/nereids_rules_p0/mv/tpcds/ddl/call_center.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
CREATE TABLE IF NOT EXISTS call_center ( | ||
cc_call_center_sk bigint, | ||
cc_call_center_id char(16), | ||
cc_rec_start_date date, | ||
cc_rec_end_date date, | ||
cc_closed_date_sk integer, | ||
cc_open_date_sk integer, | ||
cc_name varchar(50), | ||
cc_class varchar(50), | ||
cc_employees integer, | ||
cc_sq_ft integer, | ||
cc_hours char(20), | ||
cc_manager varchar(40), | ||
cc_mkt_id integer, | ||
cc_mkt_class char(50), | ||
cc_mkt_desc varchar(100), | ||
cc_market_manager varchar(40), | ||
cc_division integer, | ||
cc_division_name varchar(50), | ||
cc_company integer, | ||
cc_company_name char(50), | ||
cc_street_number char(10), | ||
cc_street_name varchar(60), | ||
cc_street_type char(15), | ||
cc_suite_number char(10), | ||
cc_city varchar(60), | ||
cc_county varchar(30), | ||
cc_state char(2), | ||
cc_zip char(10), | ||
cc_country varchar(20), | ||
cc_gmt_offset decimal(5,2), | ||
cc_tax_percentage decimal(5,2) | ||
) | ||
DUPLICATE KEY(cc_call_center_sk, cc_call_center_id) | ||
DISTRIBUTED BY HASH(cc_call_center_sk) BUCKETS 3 | ||
PROPERTIES ( | ||
"replication_num" = "1" | ||
) |
17 changes: 17 additions & 0 deletions
17
regression-test/suites/nereids_rules_p0/mv/tpcds/ddl/catalog_page.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
CREATE TABLE IF NOT EXISTS catalog_page ( | ||
cp_catalog_page_sk bigint, | ||
cp_catalog_page_id char(16), | ||
cp_start_date_sk integer, | ||
cp_end_date_sk integer, | ||
cp_department varchar(50), | ||
cp_catalog_number integer, | ||
cp_catalog_page_number integer, | ||
cp_description varchar(100), | ||
cp_type varchar(100) | ||
) | ||
DUPLICATE KEY(cp_catalog_page_sk, cp_catalog_page_id) | ||
DISTRIBUTED BY HASH(cp_catalog_page_sk) BUCKETS 3 | ||
PROPERTIES ( | ||
"replication_num" = "1" | ||
) | ||
|
34 changes: 34 additions & 0 deletions
34
regression-test/suites/nereids_rules_p0/mv/tpcds/ddl/catalog_returns.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
CREATE TABLE IF NOT EXISTS catalog_returns ( | ||
cr_returned_date_sk bigint, | ||
cr_returned_time_sk bigint, | ||
cr_item_sk bigint, | ||
cr_refunded_customer_sk bigint, | ||
cr_refunded_cdemo_sk bigint, | ||
cr_refunded_hdemo_sk bigint, | ||
cr_refunded_addr_sk bigint, | ||
cr_returning_customer_sk bigint, | ||
cr_returning_cdemo_sk bigint, | ||
cr_returning_hdemo_sk bigint, | ||
cr_returning_addr_sk bigint, | ||
cr_call_center_sk bigint, | ||
cr_catalog_page_sk bigint, | ||
cr_ship_mode_sk bigint, | ||
cr_warehouse_sk bigint, | ||
cr_reason_sk bigint, | ||
cr_order_number bigint, | ||
cr_return_quantity integer, | ||
cr_return_amount decimal(7,2), | ||
cr_return_tax decimal(7,2), | ||
cr_return_amt_inc_tax decimal(7,2), | ||
cr_fee decimal(7,2), | ||
cr_return_ship_cost decimal(7,2), | ||
cr_refunded_cash decimal(7,2), | ||
cr_reversed_charge decimal(7,2), | ||
cr_store_credit decimal(7,2), | ||
cr_net_loss decimal(7,2) | ||
) | ||
DUPLICATE KEY(cr_returned_date_sk, cr_returned_time_sk, cr_item_sk, cr_refunded_customer_sk) | ||
DISTRIBUTED BY HASH(cr_refunded_customer_sk) BUCKETS 3 | ||
PROPERTIES ( | ||
"replication_num" = "1" | ||
) |
42 changes: 42 additions & 0 deletions
42
regression-test/suites/nereids_rules_p0/mv/tpcds/ddl/catalog_sales.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
CREATE TABLE IF NOT EXISTS catalog_sales ( | ||
cs_sold_date_sk bigint, | ||
cs_sold_time_sk bigint, | ||
cs_ship_date_sk bigint, | ||
cs_bill_customer_sk bigint, | ||
cs_bill_cdemo_sk bigint, | ||
cs_bill_hdemo_sk bigint, | ||
cs_bill_addr_sk bigint, | ||
cs_ship_customer_sk bigint, | ||
cs_ship_cdemo_sk bigint, | ||
cs_ship_hdemo_sk bigint, | ||
cs_ship_addr_sk bigint, | ||
cs_call_center_sk bigint, | ||
cs_catalog_page_sk bigint, | ||
cs_ship_mode_sk bigint, | ||
cs_warehouse_sk bigint, | ||
cs_item_sk bigint, | ||
cs_promo_sk bigint, | ||
cs_order_number bigint, | ||
cs_quantity integer, | ||
cs_wholesale_cost decimal(7,2), | ||
cs_list_price decimal(7,2), | ||
cs_sales_price decimal(7,2), | ||
cs_ext_discount_amt decimal(7,2), | ||
cs_ext_sales_price decimal(7,2), | ||
cs_ext_wholesale_cost decimal(7,2), | ||
cs_ext_list_price decimal(7,2), | ||
cs_ext_tax decimal(7,2), | ||
cs_coupon_amt decimal(7,2), | ||
cs_ext_ship_cost decimal(7,2), | ||
cs_net_paid decimal(7,2), | ||
cs_net_paid_inc_tax decimal(7,2), | ||
cs_net_paid_inc_ship decimal(7,2), | ||
cs_net_paid_inc_ship_tax decimal(7,2), | ||
cs_net_profit decimal(7,2) | ||
) | ||
DUPLICATE KEY(cs_sold_date_sk, cs_sold_time_sk, cs_ship_date_sk, cs_bill_customer_sk) | ||
DISTRIBUTED BY HASH(cs_bill_customer_sk) BUCKETS 3 | ||
PROPERTIES ( | ||
"replication_num" = "1" | ||
) | ||
|
26 changes: 26 additions & 0 deletions
26
regression-test/suites/nereids_rules_p0/mv/tpcds/ddl/customer.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
CREATE TABLE IF NOT EXISTS customer ( | ||
c_customer_sk bigint, | ||
c_customer_id char(16), | ||
c_current_cdemo_sk bigint, | ||
c_current_hdemo_sk bigint, | ||
c_current_addr_sk bigint, | ||
c_first_shipto_date_sk bigint, | ||
c_first_sales_date_sk bigint, | ||
c_salutation char(10), | ||
c_first_name char(20), | ||
c_last_name char(30), | ||
c_preferred_cust_flag char(1), | ||
c_birth_day integer, | ||
c_birth_month integer, | ||
c_birth_year integer, | ||
c_birth_country varchar(20), | ||
c_login char(13), | ||
c_email_address char(50), | ||
c_last_review_date_sk bigint | ||
) | ||
DUPLICATE KEY(c_customer_sk, c_customer_id) | ||
DISTRIBUTED BY HASH(c_customer_id) BUCKETS 3 | ||
PROPERTIES ( | ||
"replication_num" = "1" | ||
) | ||
|
21 changes: 21 additions & 0 deletions
21
regression-test/suites/nereids_rules_p0/mv/tpcds/ddl/customer_address.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
CREATE TABLE IF NOT EXISTS customer_address ( | ||
ca_address_sk bigint, | ||
ca_address_id char(16), | ||
ca_street_number char(10), | ||
ca_street_name varchar(60), | ||
ca_street_type char(15), | ||
ca_suite_number char(10), | ||
ca_city varchar(60), | ||
ca_county varchar(30), | ||
ca_state char(2), | ||
ca_zip char(10), | ||
ca_country varchar(20), | ||
ca_gmt_offset decimal(5,2), | ||
ca_location_type char(20) | ||
) | ||
DUPLICATE KEY(ca_address_sk, ca_address_id) | ||
DISTRIBUTED BY HASH(ca_address_sk) BUCKETS 3 | ||
PROPERTIES ( | ||
"replication_num" = "1" | ||
) | ||
|
16 changes: 16 additions & 0 deletions
16
regression-test/suites/nereids_rules_p0/mv/tpcds/ddl/customer_demographics.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
CREATE TABLE IF NOT EXISTS customer_demographics ( | ||
cd_demo_sk bigint, | ||
cd_gender char(1), | ||
cd_marital_status char(1), | ||
cd_education_status char(20), | ||
cd_purchase_estimate integer, | ||
cd_credit_rating char(10), | ||
cd_dep_count integer, | ||
cd_dep_employed_count integer, | ||
cd_dep_college_count integer | ||
) | ||
DUPLICATE KEY(cd_demo_sk, cd_gender) | ||
DISTRIBUTED BY HASH(cd_gender) BUCKETS 3 | ||
PROPERTIES ( | ||
"replication_num" = "1" | ||
) |
35 changes: 35 additions & 0 deletions
35
regression-test/suites/nereids_rules_p0/mv/tpcds/ddl/date_dim.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
CREATE TABLE IF NOT EXISTS date_dim ( | ||
d_date_sk bigint, | ||
d_date_id char(16), | ||
d_date date, | ||
d_month_seq integer, | ||
d_week_seq integer, | ||
d_quarter_seq integer, | ||
d_year integer, | ||
d_dow integer, | ||
d_moy integer, | ||
d_dom integer, | ||
d_qoy integer, | ||
d_fy_year integer, | ||
d_fy_quarter_seq integer, | ||
d_fy_week_seq integer, | ||
d_day_name char(9), | ||
d_quarter_name char(6), | ||
d_holiday char(1), | ||
d_weekend char(1), | ||
d_following_holiday char(1), | ||
d_first_dom integer, | ||
d_last_dom integer, | ||
d_same_day_ly integer, | ||
d_same_day_lq integer, | ||
d_current_day char(1), | ||
d_current_week char(1), | ||
d_current_month char(1), | ||
d_current_quarter char(1), | ||
d_current_year char(1) | ||
) | ||
DUPLICATE KEY(d_date_sk, d_date_id) | ||
DISTRIBUTED BY HASH(d_date_id) BUCKETS 3 | ||
PROPERTIES ( | ||
"replication_num" = "1" | ||
) |
13 changes: 13 additions & 0 deletions
13
regression-test/suites/nereids_rules_p0/mv/tpcds/ddl/household_demographics.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
CREATE TABLE IF NOT EXISTS household_demographics ( | ||
hd_demo_sk bigint, | ||
hd_income_band_sk bigint, | ||
hd_buy_potential char(15), | ||
hd_dep_count integer, | ||
hd_vehicle_count integer | ||
) | ||
DUPLICATE KEY(hd_demo_sk, hd_income_band_sk) | ||
DISTRIBUTED BY HASH(hd_demo_sk) BUCKETS 3 | ||
PROPERTIES ( | ||
"replication_num" = "1" | ||
) | ||
|
11 changes: 11 additions & 0 deletions
11
regression-test/suites/nereids_rules_p0/mv/tpcds/ddl/income_band.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CREATE TABLE IF NOT EXISTS income_band ( | ||
ib_income_band_sk bigint, | ||
ib_lower_bound integer, | ||
ib_upper_bound integer | ||
) | ||
DUPLICATE KEY(ib_income_band_sk) | ||
DISTRIBUTED BY HASH(ib_income_band_sk) BUCKETS 3 | ||
PROPERTIES ( | ||
"replication_num" = "1" | ||
) | ||
|
12 changes: 12 additions & 0 deletions
12
regression-test/suites/nereids_rules_p0/mv/tpcds/ddl/inventory.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
CREATE TABLE IF NOT EXISTS inventory ( | ||
inv_date_sk bigint, | ||
inv_item_sk bigint, | ||
inv_warehouse_sk bigint, | ||
inv_quantity_on_hand integer | ||
) | ||
DUPLICATE KEY(inv_date_sk, inv_item_sk) | ||
DISTRIBUTED BY HASH(inv_warehouse_sk) BUCKETS 3 | ||
PROPERTIES ( | ||
"replication_num" = "1" | ||
) | ||
|
29 changes: 29 additions & 0 deletions
29
regression-test/suites/nereids_rules_p0/mv/tpcds/ddl/item.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
CREATE TABLE IF NOT EXISTS item ( | ||
i_item_sk bigint, | ||
i_item_id char(16), | ||
i_rec_start_date date, | ||
i_rec_end_date date, | ||
i_item_desc varchar(200), | ||
i_current_price decimal(7,2), | ||
i_wholesale_cost decimal(7,2), | ||
i_brand_id integer, | ||
i_brand char(50), | ||
i_class_id integer, | ||
i_class char(50), | ||
i_category_id integer, | ||
i_category char(50), | ||
i_manufact_id integer, | ||
i_manufact char(50), | ||
i_size char(20), | ||
i_formulation char(20), | ||
i_color char(20), | ||
i_units char(10), | ||
i_container char(10), | ||
i_manager_id integer, | ||
i_product_name char(50) | ||
) | ||
DUPLICATE KEY(i_item_sk, i_item_id) | ||
DISTRIBUTED BY HASH(i_item_sk) BUCKETS 3 | ||
PROPERTIES ( | ||
"replication_num" = "1" | ||
) |
27 changes: 27 additions & 0 deletions
27
regression-test/suites/nereids_rules_p0/mv/tpcds/ddl/promotion.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
CREATE TABLE IF NOT EXISTS promotion ( | ||
p_promo_sk bigint, | ||
p_promo_id char(16), | ||
p_start_date_sk bigint, | ||
p_end_date_sk bigint, | ||
p_item_sk bigint, | ||
p_cost decimal(15,2), | ||
p_response_targe integer, | ||
p_promo_name char(50), | ||
p_channel_dmail char(1), | ||
p_channel_email char(1), | ||
p_channel_catalog char(1), | ||
p_channel_tv char(1), | ||
p_channel_radio char(1), | ||
p_channel_press char(1), | ||
p_channel_event char(1), | ||
p_channel_demo char(1), | ||
p_channel_details varchar(100), | ||
p_purpose char(15), | ||
p_discount_active char(1) | ||
) | ||
DUPLICATE KEY(p_promo_sk, p_promo_id) | ||
DISTRIBUTED BY HASH(p_promo_sk) BUCKETS 3 | ||
PROPERTIES ( | ||
"replication_num" = "1" | ||
) | ||
|
11 changes: 11 additions & 0 deletions
11
regression-test/suites/nereids_rules_p0/mv/tpcds/ddl/reason.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CREATE TABLE IF NOT EXISTS reason ( | ||
r_reason_sk bigint, | ||
r_reason_id char(16), | ||
r_reason_desc char(100) | ||
) | ||
DUPLICATE KEY(r_reason_sk, r_reason_id) | ||
DISTRIBUTED BY HASH(r_reason_sk) BUCKETS 3 | ||
PROPERTIES ( | ||
"replication_num" = "1" | ||
) | ||
|
14 changes: 14 additions & 0 deletions
14
regression-test/suites/nereids_rules_p0/mv/tpcds/ddl/ship_mode.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
CREATE TABLE IF NOT EXISTS ship_mode ( | ||
sm_ship_mode_sk bigint, | ||
sm_ship_mode_id char(16), | ||
sm_type char(30), | ||
sm_code char(10), | ||
sm_carrier char(20), | ||
sm_contract char(20) | ||
) | ||
DUPLICATE KEY(sm_ship_mode_sk, sm_ship_mode_id) | ||
DISTRIBUTED BY HASH(sm_ship_mode_sk) BUCKETS 3 | ||
PROPERTIES ( | ||
"replication_num" = "1" | ||
) | ||
|
36 changes: 36 additions & 0 deletions
36
regression-test/suites/nereids_rules_p0/mv/tpcds/ddl/store.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
CREATE TABLE IF NOT EXISTS store ( | ||
s_store_sk bigint, | ||
s_store_id char(16), | ||
s_rec_start_date date, | ||
s_rec_end_date date, | ||
s_closed_date_sk bigint, | ||
s_store_name varchar(50), | ||
s_number_employees integer, | ||
s_floor_space integer, | ||
s_hours char(20), | ||
s_manager varchar(40), | ||
s_market_id integer, | ||
s_geography_class varchar(100), | ||
s_market_desc varchar(100), | ||
s_market_manager varchar(40), | ||
s_division_id integer, | ||
s_division_name varchar(50), | ||
s_company_id integer, | ||
s_company_name varchar(50), | ||
s_street_number varchar(10), | ||
s_street_name varchar(60), | ||
s_street_type char(15), | ||
s_suite_number char(10), | ||
s_city varchar(60), | ||
s_county varchar(30), | ||
s_state char(2), | ||
s_zip char(10), | ||
s_country varchar(20), | ||
s_gmt_offset decimal(5,2), | ||
s_tax_precentage decimal(5,2) | ||
) | ||
DUPLICATE KEY(s_store_sk, s_store_id) | ||
DISTRIBUTED BY HASH(s_store_id) BUCKETS 3 | ||
PROPERTIES ( | ||
"replication_num" = "1" | ||
) |
Oops, something went wrong.