pentaho/mondrian — pull request #142 by mkambol (2013-09-23 18:20:48+00:00)
Title: [MONDRIAN-1703]  NPE when finding measure in aggregate table bitkeys

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.