File tree Expand file tree Collapse file tree 4 files changed +15
-10
lines changed
packages/cubejs-schema-compiler/src/adapter
rust/cubesqlplanner/cubesqlplanner/src
planner/sql_evaluator/collectors Expand file tree Collapse file tree 4 files changed +15
-10
lines changed Original file line number Diff line number Diff 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
2727import { CubeSymbols } from '../compiler/CubeSymbols' ;
2828import { UserError } from '../compiler/UserError' ;
@@ -36,7 +36,6 @@ import { BaseTimeDimension } from './BaseTimeDimension';
3636import { Granularity } from './Granularity' ;
3737import { ParamAllocator } from './ParamAllocator' ;
3838import { PreAggregations } from './PreAggregations' ;
39- import { parseSqlInterval } from '@cubejs-backend/shared' ;
4039
4140const DEFAULT_PREAGGREGATIONS_SCHEMA = 'stb_pre_aggregations' ;
4241
Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff 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 ( ) ;
Original file line number Diff line number Diff 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 } ;
You can’t perform that action at this time.
0 commit comments