Skip to content

Commit 10c227b

Browse files
committed
fill daterange for all time dimension items in query
1 parent 64b8a39 commit 10c227b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

rust/cubesql/cubesql/src/compile/rewrite/converter.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1823,16 +1823,16 @@ impl LanguageToLogicalPlanConverter {
18231823
let values =
18241824
match_data_node!(node_by_id, params[2], FilterMemberValues);
18251825
if !is_in_or && op == "inDateRange" {
1826-
let existing_time_dimension =
1827-
query_time_dimensions.iter_mut().find_map(|td| {
1826+
let existing_time_dimensions: Vec<_> =
1827+
query_time_dimensions.iter_mut().filter_map(|td| {
18281828
if td.dimension == member && td.date_range.is_none() {
18291829
td.date_range = Some(json!(values));
18301830
Some(td)
18311831
} else {
18321832
None
18331833
}
1834-
});
1835-
if existing_time_dimension.is_none() {
1834+
}).collect();
1835+
if existing_time_dimensions.len() == 0 {
18361836
let dimension = V1LoadRequestQueryTimeDimension {
18371837
dimension: member.to_string(),
18381838
granularity: None,

0 commit comments

Comments
 (0)