Skip to content

Commit 11e09c1

Browse files
committed
refactor(cubesql): Use Default struct update for V1LoadRequestQuery in test_cube_join
1 parent deee594 commit 11e09c1

File tree

1 file changed

+13
-50
lines changed

1 file changed

+13
-50
lines changed

rust/cubesql/cubesql/src/compile/test/test_cube_join.rs

Lines changed: 13 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,8 @@ async fn powerbi_join() {
4545
measures: Some(vec!["Logs.agentCount".to_string()]),
4646
dimensions: Some(vec!["KibanaSampleDataEcommerce.customer_gender".to_string()]),
4747
segments: Some(vec![]),
48-
time_dimensions: None,
4948
order: Some(vec![]),
50-
limit: None,
51-
offset: None,
52-
filters: None,
53-
ungrouped: None,
49+
..Default::default()
5450
}
5551
);
5652
}
@@ -119,12 +115,8 @@ async fn powerbi_transitive_join() {
119115
measures: Some(vec!["KibanaSampleDataEcommerce.count".to_string()]),
120116
dimensions: Some(vec!["Logs.content".to_string()]),
121117
segments: Some(vec![]),
122-
time_dimensions: None,
123118
order: Some(vec![]),
124-
limit: None,
125-
offset: None,
126-
filters: None,
127-
ungrouped: None,
119+
..Default::default()
128120
}
129121
);
130122
}
@@ -175,12 +167,9 @@ async fn test_join_three_cubes() {
175167
"Logs.content".to_string(),
176168
]),
177169
segments: Some(vec![]),
178-
time_dimensions: None,
179170
order: Some(vec![]),
180-
limit: None,
181-
offset: None,
182-
filters: None,
183171
ungrouped: Some(true),
172+
..Default::default()
184173
}
185174
)
186175
}
@@ -219,16 +208,14 @@ async fn test_join_three_cubes_split() {
219208
date_range: None
220209
}]),
221210
order: Some(vec![]),
222-
limit: None,
223-
offset: None,
224211
filters: Some(vec![V1LoadRequestQueryFilterItem {
225212
member: Some("Logs.read".to_string()),
226213
operator: Some("equals".to_string()),
227214
values: Some(vec!["true".to_string()]),
228215
or: None,
229216
and: None
230217
}]),
231-
ungrouped: None,
218+
..Default::default()
232219
}
233220
)
234221
}
@@ -257,13 +244,10 @@ async fn test_join_two_subqueries_with_filter_order_limit() {
257244
measures: Some(vec!["KibanaSampleDataEcommerce.count".to_string(),]),
258245
dimensions: Some(vec!["Logs.read".to_string(),]),
259246
segments: Some(vec![]),
260-
time_dimensions: None,
261247
order: Some(vec![vec![
262248
"KibanaSampleDataEcommerce.customer_gender".to_string(),
263249
"asc".to_string(),
264250
]]),
265-
limit: None,
266-
offset: None,
267251
filters: Some(vec![
268252
V1LoadRequestQueryFilterItem {
269253
member: Some("KibanaSampleDataEcommerce.customer_gender".to_string()),
@@ -280,7 +264,7 @@ async fn test_join_two_subqueries_with_filter_order_limit() {
280264
and: None
281265
}
282266
]),
283-
ungrouped: None,
267+
..Default::default()
284268
}
285269
)
286270
}
@@ -319,8 +303,6 @@ async fn test_join_three_subqueries_with_filter_order_limit_and_split() {
319303
"KibanaSampleDataEcommerce.customer_gender".to_string(),
320304
"asc".to_string(),
321305
]]),
322-
limit: None,
323-
offset: None,
324306
filters: Some(vec![
325307
V1LoadRequestQueryFilterItem {
326308
member: Some("KibanaSampleDataEcommerce.customer_gender".to_string()),
@@ -337,7 +319,7 @@ async fn test_join_three_subqueries_with_filter_order_limit_and_split() {
337319
and: None
338320
}
339321
]),
340-
ungrouped: None,
322+
..Default::default()
341323
}
342324
)
343325
}
@@ -366,13 +348,10 @@ async fn test_join_subquery_and_table_with_filter_order_limit() {
366348
measures: Some(vec!["KibanaSampleDataEcommerce.count".to_string(),]),
367349
dimensions: Some(vec!["Logs.read".to_string(),]),
368350
segments: Some(vec![]),
369-
time_dimensions: None,
370351
order: Some(vec![vec![
371352
"KibanaSampleDataEcommerce.customer_gender".to_string(),
372353
"asc".to_string(),
373354
]]),
374-
limit: None,
375-
offset: None,
376355
filters: Some(vec![
377356
V1LoadRequestQueryFilterItem {
378357
member: Some("KibanaSampleDataEcommerce.customer_gender".to_string()),
@@ -389,7 +368,7 @@ async fn test_join_subquery_and_table_with_filter_order_limit() {
389368
and: None
390369
}
391370
]),
392-
ungrouped: None,
371+
..Default::default()
393372
}
394373
)
395374
}
@@ -428,8 +407,6 @@ async fn test_join_two_subqueries_and_table_with_filter_order_limit_and_split()
428407
"KibanaSampleDataEcommerce.customer_gender".to_string(),
429408
"asc".to_string(),
430409
]]),
431-
limit: None,
432-
offset: None,
433410
filters: Some(vec![
434411
V1LoadRequestQueryFilterItem {
435412
member: Some("KibanaSampleDataEcommerce.customer_gender".to_string()),
@@ -446,7 +423,7 @@ async fn test_join_two_subqueries_and_table_with_filter_order_limit_and_split()
446423
and: None
447424
}
448425
]),
449-
ungrouped: None,
426+
..Default::default()
450427
}
451428
)
452429
}
@@ -491,8 +468,6 @@ async fn test_join_two_subqueries_filter_push_down() {
491468
"KibanaSampleDataEcommerce.count".to_string(),
492469
"asc".to_string(),
493470
]]),
494-
limit: None,
495-
offset: None,
496471
filters: Some(vec![
497472
V1LoadRequestQueryFilterItem {
498473
member: Some("KibanaSampleDataEcommerce.customer_gender".to_string()),
@@ -509,7 +484,7 @@ async fn test_join_two_subqueries_filter_push_down() {
509484
and: None
510485
}
511486
]),
512-
ungrouped: None,
487+
..Default::default()
513488
}
514489
)
515490
}
@@ -628,10 +603,7 @@ async fn test_join_cubes_with_postprocessing() {
628603
date_range: None,
629604
}]),
630605
order: Some(vec![]),
631-
limit: None,
632-
offset: None,
633-
filters: None,
634-
ungrouped: None,
606+
..Default::default()
635607
}),
636608
true
637609
);
@@ -641,12 +613,9 @@ async fn test_join_cubes_with_postprocessing() {
641613
measures: Some(vec![]),
642614
dimensions: Some(vec!["Logs.read".to_string()]),
643615
segments: Some(vec![]),
644-
time_dimensions: None,
645616
order: Some(vec![]),
646-
limit: None,
647-
offset: None,
648-
filters: None,
649617
ungrouped: Some(true),
618+
..Default::default()
650619
}),
651620
true
652621
)
@@ -690,10 +659,7 @@ async fn test_join_cubes_with_postprocessing_and_no_cubejoinfield() {
690659
date_range: None,
691660
}]),
692661
order: Some(vec![]),
693-
limit: None,
694-
offset: None,
695-
filters: None,
696-
ungrouped: None,
662+
..Default::default()
697663
}),
698664
true
699665
);
@@ -703,12 +669,9 @@ async fn test_join_cubes_with_postprocessing_and_no_cubejoinfield() {
703669
measures: Some(vec![]),
704670
dimensions: Some(vec!["Logs.id".to_string(), "Logs.read".to_string(),]),
705671
segments: Some(vec![]),
706-
time_dimensions: None,
707672
order: Some(vec![]),
708-
limit: None,
709-
offset: None,
710-
filters: None,
711673
ungrouped: Some(true),
674+
..Default::default()
712675
}),
713676
true
714677
)

0 commit comments

Comments
 (0)