Skip to content

Commit

Permalink
fix yaml tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aceforeverd committed Jun 17, 2022
1 parent 1e720c6 commit 6da78e9
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 58 deletions.
29 changes: 19 additions & 10 deletions cases/function/fz_ddl/test_myhug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,24 @@ cases:
- [reqId2, 1609894068191, uUserId2, NULL, uSex2, zSex2, zChannel2, uPlayGame2, uHasJoinedGroup2, 1.0, 2.0, 3.0, 4.0]
- [NULL, 1609894068191, uUserIdNull, zUserIdNull, uSexNull, zSexNull, zChannelNull, uPlayGameNull, uHasJoinedGroupNull, 1.0, 2.0, 3.0, 4.0]
expect:
schema: |
reqId_1:string, flattenRequest_reqId_original_0:string, flattenRequest_eventTime_original_1:timestamp, flattenRequest_uUserId_original_2:string, flattenRequest_zUserId_original_3:string, flattenRequest_uSex_combine_77:string, flattenRequest_zSex_original_8:string, flattenRequest_zChannel_original_14:string, flattenRequest_uPlayGame_original_67:string, flattenRequest_uHasJoinedGroup_original_46:string, flattenRequest_uWatchMorning_original_60:double, flattenRequest_uWatchEvening_original_62:double, flattenRequest_uWatchAvgLength_original_63:double, flattenRequest_zSWihsperNum_original_23:double,
flattenRequest_uWatchAvgLength_window_sum_76:double, flattenRequest_uWatchMorning_window_avg_78:double, flattenRequest_uWatchEvening_window_avg_79:double, flattenRequest_zSWihsperNum_window_sum_80:double, flattenRequest_uWatchAvgLength_window_avg_81:double, flattenRequest_zUserId_window_count_82:bigint, flattenRequest_zUserId_window_count_83:bigint, flattenRequest_zUserId_window_count_84:bigint, flattenRequest_zUserId_window_count_85:bigint, flattenRequest_uUserId_window_count_86:bigint, flattenRequest_uUserId_window_count_87:bigint, flattenRequest_uUserId_window_count_88:bigint, flattenRequest_uUserId_window_count_89:bigint, flattenRequest_uUserId_window_count_90:bigint, flattenRequest_uUserId_window_count_91:bigint, flattenRequest_uUserId_window_count_92:bigint, reqId_74:string, action_actionValue_multi_direct_73:double, reqId_75:string, bo_hislabel_fWatchedTimeLen_multi_max_74:double, bo_hislabel_fWatchedTimeLen_multi_avg_75:double
schema: >
reqId_1:string, flattenRequest_reqId_original_0:string, flattenRequest_eventTime_original_1:timestamp, flattenRequest_uUserId_original_2:string,
flattenRequest_zUserId_original_3:string, flattenRequest_uSex_combine_77:string, flattenRequest_zSex_original_8:string,
flattenRequest_zChannel_original_14:string, flattenRequest_uPlayGame_original_67:string, flattenRequest_uHasJoinedGroup_original_46:string,
flattenRequest_uWatchMorning_original_60:double, flattenRequest_uWatchEvening_original_62:double, flattenRequest_uWatchAvgLength_original_63:double,
flattenRequest_zSWihsperNum_original_23:double, flattenRequest_uWatchAvgLength_window_sum_76:double, flattenRequest_uWatchMorning_window_avg_78:double,
flattenRequest_uWatchEvening_window_avg_79:double, flattenRequest_zSWihsperNum_window_sum_80:double, flattenRequest_uWatchAvgLength_window_avg_81:double,
flattenRequest_zUserId_window_count_82:bigint, flattenRequest_zUserId_window_count_83:bigint, flattenRequest_zUserId_window_count_84:bigint,
flattenRequest_zUserId_window_count_85:bigint, flattenRequest_uUserId_window_count_86:bigint, flattenRequest_uUserId_window_count_87:bigint,
flattenRequest_uUserId_window_count_88:bigint, flattenRequest_uUserId_window_count_89:bigint, flattenRequest_uUserId_window_count_90:bigint,
flattenRequest_uUserId_window_count_91:bigint, flattenRequest_uUserId_window_count_92:bigint, reqId_74:string, action_actionValue_multi_direct_73:double,
reqId_75:string, bo_hislabel_fWatchedTimeLen_multi_max_74:double, bo_hislabel_fWatchedTimeLen_multi_avg_75:double
rows:
- [ reqId1, reqId1, 1609894067191, uUserId1, zUserId1, uSex1, zSex1, zChannel1, uPlayGame1, uHasJoinedGroup1,
1.000000, 2.000000, 3.000000, 4.000000,
33.000000, 1.000000, 2.000000, 404.000000, 3.000000,
101, 101, 11, 11, 101, 101, 101, 101, 101, 101, 101,
reqId1, 1.1, reqId1, NULL, nan ]
reqId1, 1.1, reqId1, NULL, NULL ]
- [ reqId2, reqId2, 1609894068191, uUserId2, zUserId2, uSex2, zSex2, zChannel2, uPlayGame2, uHasJoinedGroup2,
1.000000, 2.000000, 3.000000, 4.000000,
33.000000, 1.000000, 2.000000, 404.000000, 3.000000,
Expand All @@ -172,7 +181,7 @@ cases:
1.000000, 2.000000, 3.000000, 4.000000,
33.000000, 1.000000, 2.000000, 404.000000, 3.000000,
NULL, NULL, NULL, NULL, 1, 1, 101, 101, 101, 101, 101,
reqId2, NULL, reqId2, NULL, nan ]
reqId2, NULL, reqId2, NULL, NULL ]
- [ NULL, NULL, 1609894068191, uUserIdNull, zUserIdNull, uSexNull, zSexNull, zChannelNull, uPlayGameNull, uHasJoinedGroupNull,
1.000000, 2.000000, 3.000000, 4.000000,
33.000000, 1.000000, 2.000000, 404.000000, 3.000000,
Expand Down Expand Up @@ -297,8 +306,8 @@ cases:
expect:
schema: reqId_1:string, reqId_74:string, action_actionValue_multi_direct_73:double, reqId_75:string, bo_hislabel_fWatchedTimeLen_multi_sum_73:double, bo_hislabel_fWatchedTimeLen_multi_max_74:double, bo_hislabel_fWatchedTimeLen_multi_avg_75:double
rows:
- [ reqId1, reqId1, 1.1, reqId1, 0.0, NULL, nan ] # should be -inf -> NULL, nan -> NULL
- [ reqId2, reqId2, NULL, reqId2, 100.0, 1.0, 1.0 ]
- [ NULL, NULL, 3.3, NULL, 0.0, NULL, nan]
- [ reqId2, reqId2, NULL, reqId2, 0.0, NULL, nan ] # should be -inf -> NULL, nan -> NULL
- [ reqId2, reqId2, NULL, reqId2, 100.0, 1.0, 1.0 ]
- [ reqId1, reqId1, 1.1, reqId1, NULL, NULL, NULL ]
- [ reqId2, reqId2, NULL, reqId2, 100.0, 1.0, 1.0 ]
- [ NULL, NULL, 3.3, NULL, NULL, NULL, NULL]
- [ reqId2, reqId2, NULL, reqId2, NULL, NULL, NULL ]
- [ reqId2, reqId2, NULL, reqId2, 100.0, 1.0, 1.0 ]
6 changes: 3 additions & 3 deletions cases/function/join/test_lastjoin_complex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ cases:
- [1,"aa",20,32,32,1]
- [2,"aa",21,32,64,2]
- [3,"aa",22,32,64,2]
- [4,"bb",23,null,0,0]
- [5,"bb",24,null,0,0]
- [4,"bb",23,NULL,NULL,0]
- [5,"bb",24,NULL,NULL,0]
- id: 2
desc: lastjoin+窗口+union
tags: ["TODO","暂时不支持 lastjoin window + union共存"]
Expand Down Expand Up @@ -1192,4 +1192,4 @@ cases:
columns: [ "c1 string","v1 bigint" ]
rows:
- [ "aa",13 ]
- [ "cc",151 ]
- [ "cc",151 ]
8 changes: 4 additions & 4 deletions cases/function/window/test_maxsize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ cases:
order: id
columns: ["id int","c1 string","w1_c4_sum bigint"]
rows:
- [1,"aa",0]
- [1,"aa", NULL]
- [2,"aa",30]
- [3,"aa",61]
- [4,"aa",93]
Expand All @@ -178,9 +178,9 @@ cases:
order: id
columns: ["id int","c1 string","w1_c4_sum bigint"]
rows:
- [1,"aa",0]
- [2,"aa",0]
- [3,"aa",0]
- [1,"aa", NULL]
- [2,"aa", NULL]
- [3,"aa", NULL]
-
id: 8
desc: 两个pk,都大于maxsize
Expand Down
4 changes: 2 additions & 2 deletions cases/function/window/test_window_row.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -863,11 +863,11 @@ cases:
order: c3
columns: ["c1 string","c3 int","w1_c4_sum bigint"]
rows:
- ["aa",20,0]
- ["aa",20,NULL]
- ["aa",21,30]
- ["aa",22,61]
- ["aa",23,63]
- ["bb",24,0]
- ["bb",24,NULL]
-
id: 39
desc: rows 0-2
Expand Down
24 changes: 12 additions & 12 deletions cases/function/window/test_window_row_range.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -703,13 +703,13 @@ cases:
order: c3
columns: [ "c1 string", "c3 int", "c7 timestamp", "w1_c4_sum double" ]
rows:
- [ "aa", 1, 1590738990000, 0.0 ]
- [ "aa", 1, 1590738990000, NULL ]
- [ "aa", 2, 1590738991000, 1.0 ]
- [ "aa", 3, 1590738992000, 2.0 ]
- [ "aa", 4, 1590738993000, 3.0 ]
- [ "aa", 5, 1590738994000, 3.0 ]
- [ "aa", 6, 1590738995000, 3.0 ]
- [ "aa", 7, 1590738999000, 0.0 ]
- [ "aa", 7, 1590738999000, NULL ]
- [ "aa", 8, 1590739001000, 1.0 ]
- [ "aa", 9, 1590739002000, 2.0 ]
- id: 24-2
Expand Down Expand Up @@ -746,13 +746,13 @@ cases:
order: c3
columns: [ "c1 string", "c3 int", "c7 timestamp", "w1_c4_sum double" ]
rows:
- [ "aa", 1, 1590738990000, 0.0 ]
- [ "aa", 1, 1590738990000, NULL ]
- [ "aa", 2, 1590738991000, 1.0 ]
- [ "aa", 3, 1590738992000, 2.0 ]
- [ "aa", 4, 1590738993000, 2.0 ]
- [ "aa", 5, 1590738994000, 2.0 ]
- [ "aa", 6, 1590738995000, 2.0 ]
- [ "aa", 7, 1590738999000, 0.0 ]
- [ "aa", 7, 1590738999000, NULL ]
- [ "aa", 8, 1590739001000, 1.0 ]
- [ "aa", 9, 1590739002000, 2.0 ]
- id: 25
Expand Down Expand Up @@ -976,8 +976,8 @@ cases:
order: c3
columns: [ "c1 string", "c3 int", "c7 timestamp", "w1_c4_sum double", "w2_c4_sum double" ]
rows:
- [ "aa", 1, 1590738990000, 1.0, 0.0 ]
- [ "aa", 2, 1590738991000, 2.0, 0.0 ]
- [ "aa", 1, 1590738990000, 1.0, NULL ]
- [ "aa", 2, 1590738991000, 2.0, NULL ]
- [ "aa", 3, 1590738992000, 3.0, 1.0 ]
- [ "aa", 4, 1590738993000, 4.0, 2.0 ]
- [ "aa", 5, 1590738994000, 4.0, 3.0 ]
Expand Down Expand Up @@ -1387,11 +1387,11 @@ cases:
order: c3
columns: ["c1 string","c3 int","w1_c4_sum bigint"]
rows:
- ["aa",20,0]
- ["aa",20,NULL]
- ["aa",21,30]
- ["aa",22,61]
- ["aa",23,63]
- ["bb",24,0]
- ["bb",24,NULL]
-
id: 47
desc: timestamp为order by-2s-0s
Expand Down Expand Up @@ -1459,11 +1459,11 @@ cases:
order: c3
columns: ["c1 string","c3 int","w1_c4_sum bigint"]
rows:
- ["aa",20,0]
- ["aa",20, NULL]
- ["aa",21,30]
- ["aa",22,61]
- ["aa",23,93]
- ["bb",24,0]
- ["bb",24, NULL]
-
id: 50
desc: timestamp为order by-前后单位不一样
Expand All @@ -1483,8 +1483,8 @@ cases:
order: c3
columns: ["c1 string","c3 int","w1_c4_sum bigint"]
rows:
- ["aa",20,0]
- ["aa",20,NULL]
- ["aa",21,30]
- ["aa",22,61]
- ["aa",23,93]
- ["bb",24,0]
- ["bb",24,NULL]
54 changes: 27 additions & 27 deletions cases/query/window_query.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -500,12 +500,12 @@ cases:
schema: id:int, pk1:string, col1:int, std_ts:timestamp, w1_col1_sum:int, w2_col1_sum:int, w3_col1_sum:int
order: id
data: |
1, A, 1, 1590115420000, 1, 1, 0
2, B, 1, 1590115420000, 1, 1, 0
3, A, 2, 1590115430000, 3, 3, 0
4, B, 2, 1590115430000, 3, 3, 0
5, A, 3, 1590115440000, 5, 6, 0
6, B, 3, 1590115440000, 5, 6, 0
1, A, 1, 1590115420000, 1, 1, NULL
2, B, 1, 1590115420000, 1, 1, NULL
3, A, 2, 1590115430000, 3, 3, NULL
4, B, 2, 1590115430000, 3, 3, NULL
5, A, 3, 1590115440000, 5, 6, NULL
6, B, 3, 1590115440000, 5, 6, NULL
7, A, 4, 1590115450000, 7, 9, 1
8, B, 4, 1590115450000, 7, 9, 1
9, A, 5, 1590115460000, 9, 12, 3
Expand Down Expand Up @@ -550,10 +550,10 @@ cases:
schema: id:int, pk1:string, col1:int, std_ts:timestamp, w1_col1_sum:int, w2_col1_sum:int, w3_col1_sum:int
order: id
data: |
1, A, 1, 1590115420000, 1, 1, 0
2, B, 1, 1590115420000, 1, 1, 0
3, A, 2, 1590115430000, 3, 3, 0
4, B, 2, 1590115430000, 3, 3, 0
1, A, 1, 1590115420000, 1, 1, NULL
2, B, 1, 1590115420000, 1, 1, NULL
3, A, 2, 1590115430000, 3, 3, NULL
4, B, 2, 1590115430000, 3, 3, NULL
5, A, 3, 1590115440000, 5, 6, 1
6, B, 3, 1590115440000, 5, 6, 1
7, A, 4, 1590115450000, 7, 9, 3
Expand Down Expand Up @@ -599,12 +599,12 @@ cases:
schema: id:int, pk1:string, col1:int, std_ts:timestamp, w1_col1_sum:int, w2_col1_sum:int, w3_col1_sum:int, w4_col1_sum:int, w5_col1_sum:int
order: id
data: |
1, A, 1, 1590115420000, 1, 1, 1, 0, 0
2, B, 1, 1590115420000, 1, 1, 1, 0, 0
3, A, 2, 1590115430000, 3, 3, 3, 0, 0
4, B, 2, 1590115430000, 3, 3, 3, 0, 0
5, A, 3, 1590115440000, 5, 6, 6, 1, 0
6, B, 3, 1590115440000, 5, 6, 6, 1, 0
1, A, 1, 1590115420000, 1, 1, 1, NULL, NULL
2, B, 1, 1590115420000, 1, 1, 1, NULL, NULL
3, A, 2, 1590115430000, 3, 3, 3, NULL, NULL
4, B, 2, 1590115430000, 3, 3, 3, NULL, NULL
5, A, 3, 1590115440000, 5, 6, 6, 1, NULL
6, B, 3, 1590115440000, 5, 6, 6, 1, NULL
7, A, 4, 1590115450000, 7, 9, 10, 3, 1
8, B, 4, 1590115450000, 7, 9, 10, 3, 1
9, A, 5, 1590115460000, 9, 12, 14, 5, 3
Expand Down Expand Up @@ -639,8 +639,8 @@ cases:
schema: id:int, pk1:string, col1:int, std_ts:timestamp, w1_col1_sum:int
order: id
data: |
1, A, 1, 1590115420000, 0
2, B, 1, 1590115420000, 0
1, A, 1, 1590115420000, NULL
2, B, 1, 1590115420000, NULL
3, A, 2, 1590115430000, 1
4, B, 2, 1590115430000, 1
5, A, 3, 1590115440000, 3
Expand Down Expand Up @@ -674,8 +674,8 @@ cases:
schema: id:int, pk1:string, col1:int, std_ts:timestamp, w1_col1_sum:int
order: id
data: |
1, A, 1, 1590115420000, 0
2, B, 1, 1590115420000, 0
1, A, 1, 1590115420000, NULL
2, B, 1, 1590115420000, NULL
3, A, 2, 1590115430000, 1
4, B, 2, 1590115430000, 1
5, A, 3, 1590115440000, 3
Expand Down Expand Up @@ -735,12 +735,12 @@ cases:
schema: id:int, pk1:string, col1:int, std_ts:timestamp, w1_col1_sum:int, w2_col1_sum:int, w3_col1_sum:int, w4_col1_sum:int, w5_col1_sum:int
order: id
data: |
1, A, 1, 1590115420000, 1, 1, 1, 0, 0
2, B, 1, 1590115420000, 1, 1, 1, 0, 0
3, A, 2, 1590115430000, 3, 3, 3, 0, 0
4, B, 2, 1590115430000, 3, 3, 3, 0, 0
5, A, 3, 1590115440000, 5, 6, 6, 1, 0
6, B, 3, 1590115440000, 5, 6, 6, 1, 0
1, A, 1, 1590115420000, 1, 1, 1, NULL, NULL
2, B, 1, 1590115420000, 1, 1, 1, NULL, NULL
3, A, 2, 1590115430000, 3, 3, 3, NULL, NULL
4, B, 2, 1590115430000, 3, 3, 3, NULL, NULL
5, A, 3, 1590115440000, 5, 6, 6, 1, NULL
6, B, 3, 1590115440000, 5, 6, 6, 1, NULL
7, A, 4, 1590115450000, 7, 9, 10, 3, 1
8, B, 4, 1590115450000, 7, 9, 10, 3, 1
9, A, 5, 1590115460000, 9, 12, 14, 5, 3
Expand Down Expand Up @@ -777,4 +777,4 @@ cases:
- ["1", "DDDD", 55, 4]
- ["1", "CCC", 55, 3]
expect:
success: true
success: true

0 comments on commit 6da78e9

Please sign in to comment.