@@ -577,11 +577,6 @@ export class PreAggregations {
577
577
* for specified query, or its value for `refs` if specified.
578
578
*/
579
579
public static canUsePreAggregationForTransformedQueryFn ( transformedQuery : TransformedQuery , refs : PreAggregationReferences | null = null ) : CanUsePreAggregationFn {
580
- // TODO this needs to check not only members list, but their join paths as well:
581
- // query can have same members as pre-agg, but different calculated join path
582
- // `refs` will come from pre-agg references, and would contain full join paths
583
-
584
- // TODO remove this in favor of matching with join path
585
580
function trimmedReferences ( references : PreAggregationReferences ) : PreAggregationReferences {
586
581
const timeDimensionsTrimmed = references
587
582
. timeDimensions
@@ -643,7 +638,6 @@ export class PreAggregations {
643
638
* Determine whether pre-aggregation can be used or not.
644
639
*/
645
640
const canUsePreAggregationNotAdditive : CanUsePreAggregationFn = ( references : PreAggregationReferences ) : boolean => {
646
- // TODO remove this in favor of matching with join path
647
641
const referencesTrimmed = trimmedReferences ( references ) ;
648
642
649
643
const refTimeDimensions = backAlias ( sortTimeDimensions ( referencesTrimmed . timeDimensions ) ) ;
@@ -728,7 +722,6 @@ export class PreAggregations {
728
722
? transformedQuery . ownedTimeDimensionsAsIs . map ( expandTimeDimension )
729
723
: transformedQuery . ownedTimeDimensionsWithRollupGranularity . map ( expandTimeDimension ) ;
730
724
731
- // TODO remove this in favor of matching with join path
732
725
const referencesTrimmed = trimmedReferences ( references ) ;
733
726
734
727
// Even if there are no multiplied measures in the query (because no multiplier dimensions are requested)
@@ -1257,7 +1250,6 @@ export class PreAggregations {
1257
1250
) &&
1258
1251
! ! references . dimensions . find ( ( d ) => {
1259
1252
// `d` can contain full join path, so we should trim it
1260
- // TODO check full join path match here
1261
1253
const trimmedDimension = CubeSymbols . joinHintFromPath ( d ) . path ;
1262
1254
return this . query . cubeEvaluator . dimensionByPath ( trimmedDimension ) . primaryKey ;
1263
1255
} ) ,
@@ -1306,10 +1298,6 @@ export class PreAggregations {
1306
1298
}
1307
1299
1308
1300
private evaluateAllReferences ( cube : string , aggregation : PreAggregationDefinition , preAggregationName : string | null = null , context : EvaluateReferencesContext = { } ) : PreAggregationReferences {
1309
- // TODO build a join tree for all references, so they would always include full join path
1310
- // Even for preaggregation references without join path
1311
- // It is necessary to be able to match query and preaggregation based on full join tree
1312
-
1313
1301
const evaluateReferences = ( ) => {
1314
1302
const references = this . query . cubeEvaluator . evaluatePreAggregationReferences ( cube , aggregation ) ;
1315
1303
if ( ! context . inPreAggEvaluation ) {
0 commit comments