pentaho/mondrian — pull request #139 by mkambol (2013-09-17 17:22:27+00:00)
Title: [MONDRIAN-1703]  Determination of the aggStar in SqlTupleReader is independent of the determination...

...of the measures present in a native filter. This left open the possibility that one or more measures could be missing from the aggregate table that was selected, since only one of the measures is set in context.
E.g. filter (, measure.[a] > measure.[b]) can be natively evaluated only if the columns for both measure [a] and [b] are present in the agg table.
To side step the issue, this fix omits the having constraint if we determine that a measure is not present.
(cherry picked from commit b0b54cf)