@@ -577,11 +577,6 @@ export class PreAggregations {
577577 * for specified query, or its value for `refs` if specified.
578578 */
579579 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
585580 function trimmedReferences ( references : PreAggregationReferences ) : PreAggregationReferences {
586581 const timeDimensionsTrimmed = references
587582 . timeDimensions
@@ -643,7 +638,6 @@ export class PreAggregations {
643638 * Determine whether pre-aggregation can be used or not.
644639 */
645640 const canUsePreAggregationNotAdditive : CanUsePreAggregationFn = ( references : PreAggregationReferences ) : boolean => {
646- // TODO remove this in favor of matching with join path
647641 const referencesTrimmed = trimmedReferences ( references ) ;
648642
649643 const refTimeDimensions = backAlias ( sortTimeDimensions ( referencesTrimmed . timeDimensions ) ) ;
@@ -728,7 +722,6 @@ export class PreAggregations {
728722 ? transformedQuery . ownedTimeDimensionsAsIs . map ( expandTimeDimension )
729723 : transformedQuery . ownedTimeDimensionsWithRollupGranularity . map ( expandTimeDimension ) ;
730724
731- // TODO remove this in favor of matching with join path
732725 const referencesTrimmed = trimmedReferences ( references ) ;
733726
734727 // Even if there are no multiplied measures in the query (because no multiplier dimensions are requested)
@@ -1257,7 +1250,6 @@ export class PreAggregations {
12571250 ) &&
12581251 ! ! references . dimensions . find ( ( d ) => {
12591252 // `d` can contain full join path, so we should trim it
1260- // TODO check full join path match here
12611253 const trimmedDimension = CubeSymbols . joinHintFromPath ( d ) . path ;
12621254 return this . query . cubeEvaluator . dimensionByPath ( trimmedDimension ) . primaryKey ;
12631255 } ) ,
@@ -1306,10 +1298,6 @@ export class PreAggregations {
13061298 }
13071299
13081300 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-
13131301 const evaluateReferences = ( ) => {
13141302 const references = this . query . cubeEvaluator . evaluatePreAggregationReferences ( cube , aggregation ) ;
13151303 if ( ! context . inPreAggEvaluation ) {
0 commit comments