@@ -403,6 +403,11 @@ export class PreAggregations {
403
403
filterDimensionsSingleValueEqual =
404
404
allValuesEq1 ( filterDimensionsSingleValueEqual ) ? new Set ( filterDimensionsSingleValueEqual ?. keys ( ) ) : null ;
405
405
406
+
407
+ console . log ( 'transformQueryToCanUseForm query.timeDimensions' , query . timeDimensions ) ;
408
+ console . log ( 'transformQueryToCanUseForm ownedTimeDimensions' , ownedTimeDimensions ) ;
409
+ console . log ( 'transformQueryToCanUseForm timeDimensions' , timeDimensions ) ;
410
+
406
411
return {
407
412
sortedDimensions,
408
413
sortedTimeDimensions,
@@ -575,12 +580,20 @@ export class PreAggregations {
575
580
// TODO remove this in favor of matching with join path
576
581
const referencesTrimmed = trimmedReferences ( references ) ;
577
582
583
+ console . log ( 'canUsePreAggregationNotAdditive transformedQuery.timeDimensions' , transformedQuery . timeDimensions ) ;
584
+
585
+
578
586
const refTimeDimensions = backAlias ( sortTimeDimensions ( referencesTrimmed . timeDimensions ) ) ;
579
587
const qryTimeDimensions = references . allowNonStrictDateRangeMatch
580
588
? transformedQuery . timeDimensions
581
589
: transformedQuery . sortedTimeDimensions ;
582
590
const backAliasMeasures = backAlias ( referencesTrimmed . measures ) ;
583
591
const backAliasDimensions = backAlias ( referencesTrimmed . dimensions ) ;
592
+
593
+ console . log ( 'canUsePreAggregationNotAdditive qryTimeDimensions' , qryTimeDimensions ) ;
594
+ console . log ( 'canUsePreAggregationNotAdditive refTimeDimensions' , refTimeDimensions ) ;
595
+ console . log ( 'canUsePreAggregationNotAdditive TD equals' , R . equals ( qryTimeDimensions , refTimeDimensions ) ) ;
596
+
584
597
return ( (
585
598
transformedQuery . hasNoTimeDimensionsWithoutGranularity
586
599
) && (
@@ -609,10 +622,18 @@ export class PreAggregations {
609
622
* @param {string } granularity Granularity
610
623
* @returns {Array<string> }
611
624
*/
612
- const expandGranularity = ( dimension , granularity ) => (
613
- transformedQuery . granularityHierarchies [ `${ dimension } .${ granularity } ` ] ||
614
- [ granularity ]
615
- ) ;
625
+ const expandGranularity = ( dimension , granularity ) => {
626
+ console . log ( "expandGranularity dimension" , dimension ) ;
627
+ console . log ( "expandGranularity granularity" , granularity ) ;
628
+ console . log ( "expandGranularity granularityHierarchies" , transformedQuery . granularityHierarchies [
629
+ `${ dimension } .${ granularity } `
630
+ ] ) ;
631
+ return (
632
+ transformedQuery . granularityHierarchies [
633
+ `${ dimension } .${ granularity } `
634
+ ] || [ granularity ]
635
+ ) ;
636
+ } ;
616
637
617
638
/**
618
639
* Determine whether time dimensions match to the window granularity or not.
0 commit comments