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
10 changed files
with
10,192 additions
and
0 deletions.
There are no files selected for viewing
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,3 @@ | ||
-- This file is automatically generated. You should know what you did if you want to edit this | ||
-- !q01 -- | ||
|
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,3 @@ | ||
-- This file is automatically generated. You should know what you did if you want to edit this | ||
-- !q02 -- | ||
|
3,253 changes: 3,253 additions & 0 deletions
3,253
regression-test/suites/usercases/WKHJ/ddl/data.sql
Large diffs are not rendered by default.
Oops, something went wrong.
2,731 changes: 2,731 additions & 0 deletions
2,731
regression-test/suites/usercases/WKHJ/ddl/data2.sql
Large diffs are not rendered by default.
Oops, something went wrong.
2,721 changes: 2,721 additions & 0 deletions
2,721
regression-test/suites/usercases/WKHJ/ddl/data3.sql
Large diffs are not rendered by default.
Oops, something went wrong.
1,304 changes: 1,304 additions & 0 deletions
1,304
regression-test/suites/usercases/WKHJ/ddl/data4.sql
Large diffs are not rendered by default.
Oops, something went wrong.
126 changes: 126 additions & 0 deletions
126
regression-test/suites/usercases/WKHJ/ddl/tb_td_oppo_ad_daily_report.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,126 @@ | ||
CREATE TABLE `tb_td_oppo_ad_daily_report` | ||
( | ||
`date` date NOT NULL COMMENT '', | ||
`ad_id` int(11) NOT NULL COMMENT '', | ||
`plan_id` int(11) NOT NULL COMMENT '', | ||
`ad_group_id` int(11) NOT NULL COMMENT '', | ||
`account_id` varchar(180) NOT NULL COMMENT '', | ||
`app_id` varchar(60) NULL COMMENT '', | ||
`delivery_type` int(11) NULL COMMENT '', | ||
`delivery_scene` int(11) NULL COMMENT '', | ||
`extension_flow` int(11) NULL COMMENT '', | ||
`extension_type` int(11) NULL COMMENT '', | ||
`flow_scene` int(11) NULL COMMENT '', | ||
`global_spec_id` int(11) NULL COMMENT '', | ||
`cost` int(11) NULL COMMENT '', | ||
`cash_cost` double NULL COMMENT '', | ||
`vir_cost` double NULL COMMENT '', | ||
`imp_cnt` int(11) NULL COMMENT '', | ||
`cli_cnt` int(11) NULL COMMENT '', | ||
`download_cnt` int(11) NULL COMMENT '', | ||
`new_pay_cnt` int(11) NULL COMMENT '', | ||
`total_pay` int(11) NULL COMMENT '', | ||
`inter_buy_pay` int(11) NULL COMMENT '', | ||
`register_cnt` int(11) NULL COMMENT '', | ||
`new_pay_user_cnt` int(11) NULL COMMENT '', | ||
`buy_user_income0` double NULL COMMENT '', | ||
`active_nums` int(11) NULL COMMENT '', | ||
`activate_nums` int(11) NULL COMMENT '', | ||
`total_pay_10per` int(11) NULL COMMENT '', | ||
`total_pay_50per` int(11) NULL COMMENT '', | ||
`pay_retention1` int(11) NULL COMMENT '', | ||
`pay_retention3` int(11) NULL COMMENT '', | ||
`pay_retention7` int(11) NULL COMMENT '', | ||
`pay_retention14` int(11) NULL COMMENT '', | ||
`pay_retention30` int(11) NULL COMMENT '', | ||
`cash_retention1` int(11) NULL COMMENT '', | ||
`cash_retention3` int(11) NULL COMMENT '', | ||
`cash_retention7` int(11) NULL COMMENT '', | ||
`inter_buy_roi1` double NULL COMMENT '', | ||
`inter_buy_roi3` double NULL COMMENT '', | ||
`inter_buy_roi7` double NULL COMMENT '', | ||
`inter_buy_roi30` double NULL COMMENT '', | ||
`inter_buy_ltv1` int(11) NULL COMMENT '', | ||
`inter_buy_ltv3` int(11) NULL COMMENT '', | ||
`inter_buy_ltv7` int(11) NULL COMMENT '', | ||
`inter_buy_ltv30` int(11) NULL COMMENT '', | ||
`new_user_roi1` double NULL COMMENT '', | ||
`new_user_roi3` double NULL COMMENT '', | ||
`new_user_roi7` double NULL COMMENT '', | ||
`new_user_roi30` double NULL COMMENT '', | ||
`new_user_ltv1` int(11) NULL COMMENT '', | ||
`new_user_ltv3` int(11) NULL COMMENT '', | ||
`new_user_ltv7` int(11) NULL COMMENT '', | ||
`new_user_ltv30` int(11) NULL COMMENT '', | ||
`quick_active_nums` int(11) NULL COMMENT '', | ||
`buy_user_income_his` int(11) NULL COMMENT '', | ||
`new_req_nums` int(11) NULL COMMENT '', | ||
`new_user_buy_roi_his` double NULL COMMENT '', | ||
`register_for_pay_retention` int(11) NULL COMMENT '', | ||
`ctime` int(11) NULL, | ||
`mtime` int(11) NULL, | ||
`op_type` varchar(6) NOT NULL DEFAULT "insert", | ||
`ts` bigint(20) NOT NULL DEFAULT "1388505600" COMMENT 'sequence列 更新时间戳, 默认值为20140101的unix_timestamp' | ||
) ENGINE=OLAP | ||
UNIQUE KEY(`date`, `ad_id`) | ||
COMMENT '广告分日数据表' | ||
PARTITION BY RANGE(`date`) | ||
(PARTITION p201912 VALUES [('0000-01-01'), ('2020-01-01')), | ||
PARTITION p202001 VALUES [('2020-01-01'), ('2020-02-01')), | ||
PARTITION p202002 VALUES [('2020-02-01'), ('2020-03-01')), | ||
PARTITION p202003 VALUES [('2020-03-01'), ('2020-04-01')), | ||
PARTITION p202004 VALUES [('2020-04-01'), ('2020-05-01')), | ||
PARTITION p202005 VALUES [('2020-05-01'), ('2020-06-01')), | ||
PARTITION p202006 VALUES [('2020-06-01'), ('2020-07-01')), | ||
PARTITION p202007 VALUES [('2020-07-01'), ('2020-08-01')), | ||
PARTITION p202008 VALUES [('2020-08-01'), ('2020-09-01')), | ||
PARTITION p202009 VALUES [('2020-09-01'), ('2020-10-01')), | ||
PARTITION p202010 VALUES [('2020-10-01'), ('2020-11-01')), | ||
PARTITION p202011 VALUES [('2020-11-01'), ('2020-12-01')), | ||
PARTITION p202012 VALUES [('2020-12-01'), ('2021-01-01')), | ||
PARTITION p202101 VALUES [('2021-01-01'), ('2021-02-01')), | ||
PARTITION p202102 VALUES [('2021-02-01'), ('2021-03-01')), | ||
PARTITION p202103 VALUES [('2021-03-01'), ('2021-04-01')), | ||
PARTITION p202104 VALUES [('2021-04-01'), ('2021-05-01')), | ||
PARTITION p202105 VALUES [('2021-05-01'), ('2021-06-01')), | ||
PARTITION p202106 VALUES [('2021-06-01'), ('2021-07-01')), | ||
PARTITION p202107 VALUES [('2021-07-01'), ('2021-08-01')), | ||
PARTITION p202108 VALUES [('2021-08-01'), ('2021-09-01')), | ||
PARTITION p202109 VALUES [('2021-09-01'), ('2021-10-01')), | ||
PARTITION p202110 VALUES [('2021-10-01'), ('2021-11-01')), | ||
PARTITION p202111 VALUES [('2021-11-01'), ('2021-12-01')), | ||
PARTITION p202112 VALUES [('2021-12-01'), ('2022-01-01')), | ||
PARTITION p202201 VALUES [('2022-01-01'), ('2022-02-01')), | ||
PARTITION p202202 VALUES [('2022-02-01'), ('2022-03-01')), | ||
PARTITION p202203 VALUES [('2022-03-01'), ('2022-04-01')), | ||
PARTITION p202204 VALUES [('2022-04-01'), ('2022-05-01')), | ||
PARTITION p202205 VALUES [('2022-05-01'), ('2022-06-01')), | ||
PARTITION p202206 VALUES [('2022-06-01'), ('2022-07-01')), | ||
PARTITION p202207 VALUES [('2022-07-01'), ('2022-08-01')), | ||
PARTITION p202208 VALUES [('2022-08-01'), ('2022-09-01')), | ||
PARTITION p202209 VALUES [('2022-09-01'), ('2022-10-01')), | ||
PARTITION p202210 VALUES [('2022-10-01'), ('2022-11-01')), | ||
PARTITION p202211 VALUES [('2022-11-01'), ('2022-12-01')), | ||
PARTITION p202212 VALUES [('2022-12-01'), ('2023-01-01')), | ||
PARTITION p202301 VALUES [('2023-01-01'), ('2023-02-01')), | ||
PARTITION p202302 VALUES [('2023-02-01'), ('2023-03-01')), | ||
PARTITION p202303 VALUES [('2023-03-01'), ('2023-04-01')), | ||
PARTITION p202304 VALUES [('2023-04-01'), ('2023-05-01')), | ||
PARTITION p202305 VALUES [('2023-05-01'), ('2023-06-01')), | ||
PARTITION p202306 VALUES [('2023-06-01'), ('2023-07-01')), | ||
PARTITION p202307 VALUES [('2023-07-01'), ('2023-08-01')), | ||
PARTITION p202308 VALUES [('2023-08-01'), ('2023-09-01')), | ||
PARTITION p202309 VALUES [('2023-09-01'), ('2023-10-01')), | ||
PARTITION p202310 VALUES [('2023-10-01'), ('2023-11-01')), | ||
PARTITION p202311 VALUES [('2023-11-01'), ('2023-12-01')), | ||
PARTITION p202312 VALUES [('2023-12-01'), ('2024-01-01'))) | ||
DISTRIBUTED BY HASH(`ad_id`) BUCKETS 4 | ||
PROPERTIES ( | ||
"replication_allocation" = "tag.location.default: 1", | ||
"bloom_filter_columns" = "date, ad_id", | ||
"in_memory" = "false", | ||
"storage_format" = "V2", | ||
"compression" = "ZSTD", | ||
"function_column.sequence_type" = "BIGINT", | ||
"disable_auto_compaction" = "false" | ||
); |
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 @@ | ||
// Licensed to the Apache Software Foundation (ASF) under one | ||
// or more contributor license agreements. See the NOTICE file | ||
// distributed with this work for additional information | ||
// regarding copyright ownership. The ASF licenses this file | ||
// to you under the Apache License, Version 2.0 (the | ||
// "License"); you may not use this file except in compliance | ||
// with the License. You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations | ||
// under the License. | ||
|
||
// The cases is copied from https://github.com/trinodb/trino/tree/master | ||
// /testing/trino-product-tests/src/main/resources/sql-tests/testcases/tpcds | ||
// and modified by Doris. | ||
suite("load") { | ||
def tables = | ||
[ | ||
"tb_td_oppo_ad_daily_report" | ||
] | ||
for (String table in tables) { | ||
sql """DROP TABLE IF EXISTS ${table}""" | ||
sql new File("""${context.file.parent}/ddl/${table}.sql""").text | ||
} | ||
sql new File("""${context.file.parent}/ddl/data.sql""").text | ||
sql new File("""${context.file.parent}/ddl/data2.sql""").text | ||
sql new File("""${context.file.parent}/ddl/data3.sql""").text | ||
sql new File("""${context.file.parent}/ddl/data4.sql""").text | ||
} | ||
|
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,8 @@ | ||
--12个过滤 | ||
SELECT | ||
ad_id | ||
FROM | ||
tb_td_oppo_ad_daily_report | ||
WHERE ad_id IN (416404617,416285050,416244930,416228342,416188531,416072148,415991746,415945651,415863042,415753841,415753161,409618182) | ||
AND (date between 20220701 AND 20220930) | ||
GROUP BY ad_id order by ad_id; |
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,8 @@ | ||
--12个过滤 | ||
SELECT | ||
ad_id | ||
FROM | ||
tb_td_oppo_ad_daily_report | ||
WHERE ad_id IN (416404617,416285050,416244930,416228342,416188531,416072148,415991746,415945651,415863042,415753841,415753161) | ||
AND (date between 20220701 AND 20220930) | ||
GROUP BY ad_id order by ad_id; |