Skip to content

Commit 2a60452

Browse files
committed
in work
1 parent 0c3a255 commit 2a60452

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

packages/cubejs-schema-compiler/src/adapter/BaseQuery.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ import {
2121
getEnv,
2222
localTimestampToUtc,
2323
timeSeries as timeSeriesBase,
24-
timeSeriesFromCustomInterval
25-
} from '@cubejs-backend/shared';
24+
timeSeriesFromCustomInterval,
25+
parseSqlInterval } from '@cubejs-backend/shared';
2626

2727
import { CubeSymbols } from '../compiler/CubeSymbols';
2828
import { UserError } from '../compiler/UserError';
@@ -36,7 +36,6 @@ import { BaseTimeDimension } from './BaseTimeDimension';
3636
import { Granularity } from './Granularity';
3737
import { ParamAllocator } from './ParamAllocator';
3838
import { PreAggregations } from './PreAggregations';
39-
import { parseSqlInterval } from '@cubejs-backend/shared';
4039

4140
const DEFAULT_PREAGGREGATIONS_SCHEMA = 'stb_pre_aggregations';
4241

rust/cubesqlplanner/cubesqlplanner/src/physical_plan_builder/builder.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,9 @@ impl PhysicalPlanBuilder {
980980

981981
let templates = self.query_tools.plan_sql_templates();
982982

983-
let ts_date_range = if templates.supports_generated_time_series() && granularity_obj.is_predefined_granularity() {
983+
let ts_date_range = if templates.supports_generated_time_series()
984+
&& granularity_obj.is_predefined_granularity()
985+
{
984986
if let Some(date_range) = time_dimension_symbol
985987
.get_range_for_time_series(date_range, self.query_tools.timezone())?
986988
{

rust/cubesqlplanner/cubesqlplanner/src/plan/time_series.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,16 @@ impl TimeSeries {
4444
}
4545

4646
pub fn to_sql(&self, templates: &PlanSqlTemplates) -> Result<String, CubeError> {
47-
if templates.supports_generated_time_series() && self.granularity.is_predefined_granularity() {
48-
let interval_description = templates.base_tools().interval_and_minimal_time_unit(self.granularity.granularity_interval().clone())?;
47+
if templates.supports_generated_time_series()
48+
&& self.granularity.is_predefined_granularity()
49+
{
50+
let interval_description = templates
51+
.base_tools()
52+
.interval_and_minimal_time_unit(self.granularity.granularity_interval().clone())?;
4953
if interval_description.len() != 2 {
50-
return Err(CubeError::internal("Interval description must have 2 elements".to_string()));
54+
return Err(CubeError::internal(
55+
"Interval description must have 2 elements".to_string(),
56+
));
5157
}
5258
let interval = interval_description[0].clone();
5359
let minimal_time_unit = interval_description[1].clone();

rust/cubesqlplanner/cubesqlplanner/src/planner/sql_evaluator/collectors/multiplied_measures_collector.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,7 @@ impl TraversalVisitor for MultipliedMeasuresCollector {
122122
None
123123
}
124124
}
125-
MemberSymbol::MemberExpression(_) => {
126-
Some(())
127-
}
125+
MemberSymbol::MemberExpression(_) => Some(()),
128126
MemberSymbol::Dimension(_) => None,
129127
_ => None,
130128
};

0 commit comments

Comments
 (0)