@@ -11,7 +11,7 @@ import cronParser from 'cron-parser';
1111
1212import moment from 'moment-timezone' ;
1313import 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' ;
1515
1616import {
1717 buildSqlAndParams as nativeBuildSqlAndParams ,
@@ -576,29 +576,6 @@ export class BaseQuery {
576576 return false ;
577577 }
578578
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- }
602579 /**
603580 * Returns a pair of SQL query string and parameter values for the query.
604581 * @param {boolean } [exportAnnotatedSql] - returns annotated sql with not rendered params if true
@@ -651,10 +628,11 @@ export class BaseQuery {
651628 return res ;
652629 }
653630
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
655632 generateTimeSeries ( granularity , dateRange ) {
656- return timeSeries ( granularity , dateRange ) ;
633+ return timeSeriesBase ( granularity , dateRange ) ;
657634 }
635+
658636 get shouldReuseParams ( ) {
659637 return false ;
660638 }
@@ -1419,7 +1397,6 @@ export class BaseQuery {
14191397 )
14201398 ) . join ( ' AND ' ) ;
14211399
1422-
14231400 return this . overTimeSeriesSelect (
14241401 cumulativeMeasures ,
14251402 dateSeriesSql ,
0 commit comments