Skip to content

Commit 434e1c6

Browse files
committed
fix td match for allow_non_strict_date_range_match case
1 parent b625de4 commit 434e1c6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

rust/cubesqlplanner/cubesqlplanner/src/logical_plan/optimizers/pre_aggregation/dimension_matcher.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,11 @@ impl<'a> DimensionMatcher<'a> {
185185
add_to_matched_dimension: bool,
186186
) -> Result<MatchState, CubeError> {
187187
let granularity = if self.pre_aggregation.allow_non_strict_date_range_match {
188-
time_dimension.granularity().clone()
188+
if let Some(granularity) = time_dimension.granularity_obj() {
189+
granularity.min_granularity()?
190+
} else {
191+
time_dimension.granularity().clone()
192+
}
189193
} else {
190194
time_dimension.rollup_granularity(self.query_tools.clone())?
191195
};

0 commit comments

Comments
 (0)