Skip to content

Commit

Permalink
add BSZG & KEEP user case (apache#147)
Browse files Browse the repository at this point in the history
# Checklist

* 内部Jira: http://jira.selectdb.com:8090/browse/CIR-1957
* 修复PR:apache#18292
  * master:
  * 1.2-lts:
  * 1.2-lts: 
* Doris-master:
  * [x] 已修复
  * [ ] 未修复
  * [ ] 无问题
* Doris-1.2-lts:
  * [ ] 已修复
  * [x] 未修复
  * [ ] 无问题
* Doris-1.1-lts:
  * [ ] 已修复
  * [ ] 未修复
  * [x] 无问题


* 内部Jira: http://jira.selectdb.com:8090/browse/CIR-1843
* 修复PR:apache#17944
  * master: 
  * 1.2-lts:
  * 1.2-lts: 
* Doris-master:
  * [x] 已修复
  * [ ] 未修复
  * [ ] 无问题
* Doris-1.2-lts:
  * [x] 已修复
  * [] 未修复
  * [ ] 无问题
* Doris-1.1-lts:
  * [ ] 已修复
  * [ ] 未修复
  * [x] 无问题

---------

Co-authored-by: wudi <>
Co-authored-by: zy-kk <zhongykk@qq.com>
  • Loading branch information
JNSimba and zy-kkk authored Apr 4, 2023
1 parent ca52895 commit 2a8d3f8
Show file tree
Hide file tree
Showing 21 changed files with 3,194 additions and 0 deletions.
3 changes: 3 additions & 0 deletions regression-test/data/usercases/BSZG/sql/q1.out
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
-- !q1 --

1,000 changes: 1,000 additions & 0 deletions regression-test/data/usercases/KEEP/dwd_keep_content_homepage_entry_rec_ds.csv

Large diffs are not rendered by default.

1,000 changes: 1,000 additions & 0 deletions regression-test/data/usercases/KEEP/dwd_keep_not_clock_entry.csv

Large diffs are not rendered by default.

162 changes: 162 additions & 0 deletions regression-test/data/usercases/KEEP/sql/q1.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
-- This file is automatically generated. You should know what you did if you want to edit this
-- !q1 --
$& 445 151 310 20 36 0 118 22 48 0.3393258426966292 70 0.08089887640449438 0.0 0.2651685393258427
2019-05-04 3 0 3 \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0.0 0 0.0 0.0 0.0
2019-08-21 1 0 1 \N 0 0 0 0 0 0.0 0 0.0 0.0 0.0
2019-08-23 1 0 1 \N 0 0 0 0 0 0.0 0 0.0 0.0 0.0
2019-08-26 2 0 2 \N 0 0 0 0 0 0.0 0 0.0 0.0 0.0
2019-09-06 1 0 1 \N 0 0 0 0 0 0.0 0 0.0 0.0 0.0
2019-09-08 1 0 1 \N 0 0 0 0 0 0.0 0 0.0 0.0 0.0
2019-09-09 3 1 3 \N 0 0 1 0 0 0.3333333333333333 0 0.0 0.0 0.3333333333333333
2019-09-10 2 2 2 \N 2 0 0 0 0 1.0 0 1.0 0.0 0.0
2019-09-19 3 1 3 \N 1 0 0 0 1 0.3333333333333333 1 0.3333333333333333 0.0 0.0
2019-09-20 1 0 1 \N 0 0 0 0 1 0.0 1 0.0 0.0 0.0
2019-09-23 2 0 2 \N 0 0 0 0 1 0.0 1 0.0 0.0 0.0
2019-09-27 1 0 1 \N 0 0 0 0 1 0.0 1 0.0 0.0 0.0
2019-10-27 1 1 1 \N 1 0 0 0 0 1.0 0 1.0 0.0 0.0
2019-10-28 2 0 2 \N 0 0 0 0 0 0.0 0 0.0 0.0 0.0
2019-10-29 2 1 2 \N 0 0 1 0 0 0.5 0 0.0 0.0 0.5
2019-10-30 2 0 2 \N 0 0 0 0 0 0.0 0 0.0 0.0 0.0
2019-10-31 3 0 3 \N 0 0 0 0 0 0.0 0 0.0 0.0 0.0
2019-11-02 2 0 2 \N 0 0 0 0 0 0.0 0 0.0 0.0 0.0
2019-11-04 2 1 2 \N 1 0 0 0 0 0.5 0 0.5 0.0 0.0
2019-11-11 1 1 1 \N 1 0 0 0 0 1.0 0 1.0 0.0 0.0
2019-11-19 1 1 1 \N 0 0 1 0 0 1.0 0 0.0 0.0 1.0
2019-11-22 1 0 1 \N 0 0 0 0 0 0.0 0 0.0 0.0 0.0
2019-12-04 1 0 1 \N 0 0 0 0 0 0.0 0 0.0 0.0 0.0
2019-12-07 1 0 1 \N 0 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0
2020-10-19 1 0 1 \N 0 0 0 0 0 0.0 0 0.0 0.0 0.0
2020-11-03 1 0 1 \N 0 0 0 0 0 0.0 0 0.0 0.0 0.0
2020-11-07 1 0 1 \N 0 0 0 0 0 0.0 0 0.0 0.0 0.0
2020-11-23 1 0 1 \N 0 0 0 0 0 0.0 0 0.0 0.0 0.0
2020-11-29 1 1 1 \N 1 0 0 0 0 1.0 0 1.0 0.0 0.0
2020-12-04 1 0 1 \N 0 0 0 0 0 0.0 0 0.0 0.0 0.0
2020-12-06 1 0 1 \N 0 0 0 0 0 0.0 0 0.0 0.0 0.0
2020-12-25 1 0 1 \N 0 0 0 0 0 0.0 0 0.0 0.0 0.0
2020-12-27 1 0 1 \N 0 0 0 0 0 0.0 0 0.0 0.0 0.0
2021-01-01 6 3 6 \N 0 0 3 0 0 0.5 0 0.0 0.0 0.5
2021-01-02 2 0 2 \N 0 0 0 0 1 0.0 1 0.0 0.0 0.0
2021-01-03 4 3 4 \N 1 0 2 0 1 0.75 1 0.25 0.0 0.5
2021-01-04 5 4 5 \N 1 0 3 1 1 0.8 2 0.2 0.0 0.6
2021-01-05 7 4 7 \N 1 0 3 2 0 0.5714285714285714 2 0.14285714285714285 0.0 0.42857142857142855
2021-01-06 6 3 6 \N 0 0 3 0 0 0.5 0 0.0 0.0 0.5
2021-01-07 6 4 6 \N 0 0 4 1 1 0.6666666666666666 2 0.0 0.0 0.6666666666666666
2021-01-08 4 0 4 \N 0 0 0 0 1 0.0 1 0.0 0.0 0.0
2021-01-09 4 2 4 \N 0 0 2 0 0 0.5 0 0.0 0.0 0.5
2021-01-10 2 1 2 \N 1 0 0 0 0 0.5 0 0.5 0.0 0.0
2021-01-11 4 2 4 \N 0 0 2 0 0 0.5 0 0.0 0.0 0.5
2021-01-12 6 3 6 \N 0 0 3 0 0 0.5 0 0.0 0.0 0.5
2021-01-13 6 2 6 \N 0 0 2 2 1 0.3333333333333333 3 0.0 0.0 0.3333333333333333
2021-01-14 5 1 5 \N 0 0 1 2 0 0.2 2 0.0 0.0 0.2
2021-01-15 4 3 4 \N 0 0 3 0 2 0.75 2 0.0 0.0 0.75
2021-01-16 4 2 4 \N 1 0 1 0 1 0.5 1 0.25 0.0 0.25
2021-01-17 3 0 3 \N 0 0 0 0 1 0.0 1 0.0 0.0 0.0
2021-01-18 5 4 5 \N 0 0 4 1 0 0.8 1 0.0 0.0 0.8
2021-01-19 6 2 6 \N 1 0 1 0 3 0.3333333333333333 3 0.16666666666666666 0.0 0.16666666666666666
2021-01-20 4 1 4 \N 0 0 1 0 0 0.25 0 0.0 0.0 0.25
2021-01-21 2 0 2 \N 0 0 0 0 0 0.0 0 0.0 0.0 0.0
2021-01-22 12 4 12 \N 0 0 4 0 2 0.3333333333333333 2 0.0 0.0 0.3333333333333333
2021-01-23 4 2 4 \N 0 0 2 0 0 0.5 0 0.0 0.0 0.5
2021-01-24 5 1 5 \N 0 0 1 0 2 0.2 2 0.0 0.0 0.2
2021-01-25 5 3 5 \N 0 0 3 1 1 0.6 2 0.0 0.0 0.6
2021-01-26 6 3 6 \N 1 0 3 1 1 0.5 2 0.16666666666666666 0.0 0.5
2021-01-27 8 2 8 \N 0 0 2 0 0 0.25 0 0.0 0.0 0.25
2021-01-28 9 2 9 \N 0 0 2 1 0 0.2222222222222222 1 0.0 0.0 0.2222222222222222
2021-01-29 5 2 5 \N 0 0 2 0 1 0.4 1 0.0 0.0 0.4
2021-01-30 7 3 7 \N 1 0 2 0 1 0.42857142857142855 1 0.14285714285714285 0.0 0.2857142857142857
2021-01-31 2 1 2 \N 0 0 1 0 1 0.5 1 0.0 0.0 0.5
2021-02-01 11 4 11 \N 2 0 2 0 1 0.36363636363636365 1 0.18181818181818182 0.0 0.18181818181818182
2021-02-02 9 4 9 \N 1 0 3 0 0 0.4444444444444444 0 0.1111111111111111 0.0 0.3333333333333333
2021-02-03 10 3 9 \N 0 0 3 2 1 0.3 3 0.0 0.0 0.3
2021-02-04 5 1 5 \N 0 0 1 0 0 0.2 0 0.0 0.0 0.2
2021-02-05 6 2 6 \N 0 0 2 0 0 0.3333333333333333 0 0.0 0.0 0.3333333333333333
2021-02-06 7 5 6 \N 1 0 4 1 1 0.7142857142857143 2 0.14285714285714285 0.0 0.5714285714285714
2021-02-07 3 0 3 \N 0 0 0 0 1 0.0 1 0.0 0.0 0.0
2021-02-08 10 3 10 \N 0 0 3 0 0 0.3 0 0.0 0.0 0.3
2021-02-09 7 2 7 \N 0 0 2 0 0 0.2857142857142857 0 0.0 0.0 0.2857142857142857
2021-02-10 7 4 7 \N 1 0 4 1 1 0.5714285714285714 2 0.14285714285714285 0.0 0.5714285714285714
2021-02-11 7 3 7 \N 0 0 3 0 0 0.42857142857142855 0 0.0 0.0 0.42857142857142855
2021-02-12 5 1 5 \N 0 0 1 0 0 0.2 0 0.0 0.0 0.2
2021-02-13 5 3 5 \N 1 0 2 0 0 0.6 0 0.2 0.0 0.4
2021-02-14 6 1 6 \N 0 0 1 0 0 0.16666666666666666 0 0.0 0.0 0.16666666666666666
2021-02-15 2 2 2 \N 0 0 2 0 0 1.0 0 0.0 0.0 1.0
2021-02-16 4 1 4 \N 1 0 0 0 0 0.25 0 0.25 0.0 0.0
2021-02-17 4 2 4 \N 0 0 2 0 1 0.5 1 0.0 0.0 0.5
2021-02-18 7 3 7 \N 1 0 2 0 0 0.42857142857142855 0 0.14285714285714285 0.0 0.2857142857142857
2021-02-19 7 2 7 \N 0 0 2 2 1 0.2857142857142857 3 0.0 0.0 0.2857142857142857
2021-02-20 6 1 6 \N 1 0 0 0 0 0.16666666666666666 0 0.16666666666666666 0.0 0.0
2021-02-21 6 2 6 \N 1 0 1 0 0 0.3333333333333333 0 0.16666666666666666 0.0 0.16666666666666666
2021-02-22 8 4 8 \N 0 0 4 1 1 0.5 2 0.0 0.0 0.5
2021-02-23 6 2 6 \N 1 0 1 1 0 0.3333333333333333 1 0.16666666666666666 0.0 0.16666666666666666
2021-02-24 5 2 5 \N 0 0 2 1 1 0.4 2 0.0 0.0 0.4
2021-02-25 3 0 3 \N 0 0 0 0 0 0.0 0 0.0 0.0 0.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
CREATE TABLE `all_dim_financial_cube_date_load_market` (
`brand` varchar(200) NULL COMMENT '',
`ops_market` varchar(200) NULL COMMENT '',
`calendar_date` varchar(200) NULL COMMENT '',
`week_day_type` varchar(200) NULL COMMENT '',
`summary` varchar(1000) NULL COMMENT '',
`add_info` varchar(1000) NULL COMMENT '',
`weekday_type_delivery` varchar(200) NULL COMMENT '',
`promotion_info` varchar(1000) NULL COMMENT '',
`promotion_dine_in` varchar(200) NULL COMMENT '',
`promotion_delivery` varchar(200) NULL COMMENT '',
`modifiedTime` varchar(200) NULL COMMENT '',
`inserttime` varchar(200) NULL COMMENT '',
`reserve1` varchar(200) NULL COMMENT '',
`reserve2` varchar(200) NULL COMMENT '',
`reserve3` varchar(200) NULL COMMENT '',
`reserve4` varchar(200) NULL COMMENT '',
`reserve5` varchar(200) NULL COMMENT '',
`reserve6` varchar(200) NULL COMMENT '',
`reserve7` varchar(200) NULL COMMENT '',
`reserve8` varchar(200) NULL COMMENT '',
`reserve9` varchar(200) NULL COMMENT '',
`reserve10` varchar(200) NULL COMMENT '',
`last_update_date` varchar(200) NULL COMMENT ''
) ENGINE=OLAP
DUPLICATE KEY(`brand`, `ops_market`, `calendar_date`)
COMMENT ''
DISTRIBUTED BY HASH(`brand`, `ops_market`) BUCKETS 3
PROPERTIES (
"replication_allocation" = "tag.location.default: 1"
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
CREATE TABLE `all_dim_financial_cube_date_load_rsc` (
`calendar_date` varchar(200) NULL COMMENT '',
`week_detail` varchar(200) NULL COMMENT '',
`week` varchar(200) NULL COMMENT '',
`week_day_name` varchar(200) NULL COMMENT '',
`week_analysis` varchar(200) NULL COMMENT '',
`year` varchar(200) NULL COMMENT '',
`month` varchar(200) NULL COMMENT '',
`period` varchar(200) NULL COMMENT '',
`day_type1` varchar(200) NULL COMMENT '',
`day_type2` varchar(200) NULL COMMENT '',
`ly_calendar_date` varchar(200) NULL COMMENT '',
`ly_week_day_name` varchar(200) NULL COMMENT '',
`lly_calendar_date` varchar(200) NULL COMMENT '',
`lly_week_day_name` varchar(200) NULL COMMENT '',
`holiday_ph1` varchar(200) NULL,
`holiday_ph2` varchar(200) NULL,
`holiday_kfc1` varchar(200) NULL,
`holiday_kfc2` varchar(200) NULL,
`modifiedTime` varchar(200) NULL,
`inserttime` varchar(200) NULL,
`last_update_date` varchar(200) NULL COMMENT '',
`reserve1` varchar(200) NULL COMMENT '',
`reserve2` varchar(200) NULL COMMENT '',
`reserve3` varchar(200) NULL COMMENT '',
`reserve4` varchar(200) NULL COMMENT '',
`reserve5` varchar(200) NULL COMMENT ''
) ENGINE=OLAP
DUPLICATE KEY(`calendar_date`)
COMMENT ''
DISTRIBUTED BY HASH(`year`) BUCKETS 3
PROPERTIES (
"replication_allocation" = "tag.location.default: 1"
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CREATE TABLE `all_dim_financial_cube_mixlabel_load_result` (
`brand` varchar(50) NULL,
`StoreCode` varchar(100) NULL,
`ops_market` varchar(100) NULL,
`effect_date` varchar(100) NULL,
`events_list` array<varchar(10)> NULL,
`create_time` datetime NULL
) ENGINE=OLAP
DUPLICATE KEY(`brand`, `StoreCode`)
COMMENT ''
DISTRIBUTED BY HASH(`brand`, `StoreCode`) BUCKETS 3
PROPERTIES (
"replication_allocation" = "tag.location.default: 1"
);
Loading

0 comments on commit 2a8d3f8

Please sign in to comment.