@@ -11,7 +11,7 @@ import cronParser from 'cron-parser';
11
11
12
12
import moment from 'moment-timezone' ;
13
13
import inflection from 'inflection' ;
14
- import { FROM_PARTITION_RANGE , inDbTimeZone , MAX_SOURCE_ROW_LIMIT , QueryAlias , getEnv , timeSeries } from '@cubejs-backend/shared' ;
14
+ import { FROM_PARTITION_RANGE , inDbTimeZone , MAX_SOURCE_ROW_LIMIT , QueryAlias , getEnv , timeSeries as timeSeriesBase } from '@cubejs-backend/shared' ;
15
15
16
16
import {
17
17
buildSqlAndParams as nativeBuildSqlAndParams ,
@@ -576,29 +576,6 @@ export class BaseQuery {
576
576
return false ;
577
577
}
578
578
579
- buildSqlAndParamsTest ( exportAnnotatedSql ) {
580
- if ( ! this . options . preAggregationQuery && ! this . options . disableExternalPreAggregations && this . externalQueryClass ) {
581
- if ( this . externalPreAggregationQuery ( ) ) { // TODO performance
582
- return this . externalQuery ( ) . buildSqlAndParams ( exportAnnotatedSql ) ;
583
- }
584
- }
585
- const js_res = this . compilers . compiler . withQuery (
586
- this ,
587
- ( ) => this . cacheValue (
588
- [ 'buildSqlAndParams' , exportAnnotatedSql ] ,
589
- ( ) => this . paramAllocator . buildSqlAndParams (
590
- this . buildParamAnnotatedSql ( ) ,
591
- exportAnnotatedSql ,
592
- this . shouldReuseParams
593
- ) ,
594
- { cache : this . queryCache }
595
- )
596
- ) ;
597
- const rust = this . buildSqlAndParamsRust ( exportAnnotatedSql ) ;
598
- console . log ( 'js result: ' , js_res [ 0 ] ) ;
599
- console . log ( 'rust result: ' , rust [ 0 ] ) ;
600
- return js_res ;
601
- }
602
579
/**
603
580
* Returns a pair of SQL query string and parameter values for the query.
604
581
* @param {boolean } [exportAnnotatedSql] - returns annotated sql with not rendered params if true
@@ -651,10 +628,11 @@ export class BaseQuery {
651
628
return res ;
652
629
}
653
630
654
- //FIXME helper for native generator, maybe should be moved entire to rust
631
+ // FIXME helper for native generator, maybe should be moved entire to rust
655
632
generateTimeSeries ( granularity , dateRange ) {
656
- return timeSeries ( granularity , dateRange ) ;
633
+ return timeSeriesBase ( granularity , dateRange ) ;
657
634
}
635
+
658
636
get shouldReuseParams ( ) {
659
637
return false ;
660
638
}
@@ -1419,7 +1397,6 @@ export class BaseQuery {
1419
1397
)
1420
1398
) . join ( ' AND ' ) ;
1421
1399
1422
-
1423
1400
return this . overTimeSeriesSelect (
1424
1401
cumulativeMeasures ,
1425
1402
dateSeriesSql ,
0 commit comments