This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val idx = idxMinus + 1 | |
val fd = hier.dimension | |
val uniqueName = MdxSelectorString(fd.name, hier.name) | |
val allMemberExpression = s"$uniqueName.[All]" | |
val (defaultMember, allMember) = hier.defaultMember match { | |
case AllMember => | |
if (hier.isCalculationGroup) { | |
(s"${hier.uniqueName}.&[${fd.calculationGroup.get.defaultMember.name}]", None) | |
} else { | |
(allMemberExpression, Some(allMemberExpression)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case mpv: MemberPropertyValue[_] => | |
calculationContext match { | |
case FilterCalculationContext(FilterFlatLevel(flatLevel)) => | |
(mpv.property, mpv.typed) match { | |
case (_: MemberNameProperty | _: MemberCaption, _) => | |
val v = resolveMDX(mpv.member) | |
v.physicalType match { | |
case _: VariableStringType | NullType => v | |
case _ => TypeConvertedValue(v, MaxStringType) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def handleExcelUnionForTopCountAndBottomCount(cube: Cube, queryAxes: Map[Int, Axis], targetLevel: FlatLevel) = { | |
logger.warn("ExcelUnionBothTopBottomCount applied") | |
// As we go down levels we have to build out the names and keys | |
case class RowLevel(fl: FlatLevel, nameIndices: Seq[Int], keyIndices: Seq[Seq[Int]]) | |
def getRowLevels(levels: IndexedSeq[FlatLevel], idx: Int, rowIdx: Int, prevRowLevel: Option[RowLevel]): Seq[RowLevel] = { | |
if (idx < levels.size) { | |
val (prevNameIndices, prevKeyIndices) = prevRowLevel.map { p => (p.nameIndices, p.keyIndices) }.getOrElse((Seq.empty, Seq.empty)) | |
val level = levels(idx) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def makeSelectColumn(gb: GroupByType): Option[SelectColumn] = { | |
gb match { | |
case GroupByIgnore => None | |
case _: GroupByColumnNumber => None | |
case gbv@GroupByValue(_: ConstantValue, _) if findGroupByTypeColumn(gbv).isEmpty => None | |
case _ => | |
val (exposed, expr) = | |
gb match { | |
case GroupByColumnName(name, _, Some(expression)) => (Some(name), expression) | |
case GroupByValue(_, expression) => (None, expression) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def makeSelectColumn(gb: GroupByType): Option[SelectColumn] = { | |
gb match { | |
case GroupByIgnore => None | |
case _: GroupByColumnNumber => None | |
case gbv@GroupByValue(_: ConstantValue, _) if findGroupByTypeColumn(gbv).isEmpty => None | |
case _ => | |
val (exposed, expr) = | |
gb match { | |
case GroupByColumnName(name, _, Some(expression)) => (Some(name), expression) | |
case GroupByValue(_, expression) => (None, expression) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AggregateLogical( | |
SelectedData( | |
ColumnData(SelectColumn(Some(c0),DimensionallyModifiedValue(AggregatedValue(AttributeValue(FlatAttribute(ef1dd654-da9a-42bc-77ef-ea4431bdeb4e: "salesamount1")),Sum),List(Child(Child(CurrentMember(FlatHierarchy(d525ca44-1aa7-4c19-bfa7-ed6e69040b00+1298889108: "Order Date Month Hierarchy")),false),false))),NoAggregation), NoAggregation, Some(c0)) | |
), | |
AuxiliaryData(), | |
AggregateLogical( | |
SelectedData( | |
DimensionallyModifiedData(ValueData(AggregatedValue(AttributeValue(FlatAttribute(ef1dd654-da9a-42bc-77ef-ea4431bdeb4e: "salesamount1")),Sum),NoAggregation,Set(RawAttribute(FlatAttribute(ef1dd654-da9a-42bc-77ef-ea4431bdeb4e: "salesamount1"),Sum,Some(c_36))),Some(c_37)),List(Child(Child(CurrentMember(FlatHierarchy(d525ca44-1aa7-4c19-bfa7-ed6e69040b00+1298889108: "Order Date Month Hierarchy")),false),false)),Min,Some(c_37)) | |
), | |
AuxiliaryData(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case MdxFunctions.DistinctCount.Applied(valueSet :: HNil) => | |
val resolvedVal = ConstantValue(5, IntType) | |
ComplexAggregatedValue(resolvedVal, resolveSetExpression(valueSet), core.DistinctCountExact) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
MIN(t_129.c0) AS c0, | |
MIN(t_129.c_39) AS c1, | |
t_129.c2 AS c2, | |
t_129.c3s0 AS c3s0 | |
FROM | |
( | |
SELECT | |
MIN(t_128.c0) AS c0, | |
MIN(t_128.c_39) AS c_39, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
MIN(t_101.c_44) AS c0, | |
t_101.c1 AS c1, | |
t_101.c2s0 AS c2s0 | |
FROM | |
( | |
SELECT | |
MIN(t_98.c_44) AS c_44, | |
COALESCE(t_100.c_45, t_98.c1) AS c1, | |
COALESCE(t_100.c_55, t_98.c2s0) AS c2s0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OrderCube( | |
AggregateLogical( | |
SelectedData( | |
ColumnData(SelectColumn(Some(c0),AttributeValue(FlatAttribute(62874bbe-7ead-48ac-4496-8c7758b5aaa8: "orderquantity1")),Sum), Sum, Some(c0)), | |
ColumnData(SelectColumn(Some(c1),DimensionallyModifiedValue(AggregatedValue(AttributeValue(FlatAttribute(62874bbe-7ead-48ac-4496-8c7758b5aaa8: "orderquantity1")),Sum),List(Child(CurrentMember(FlatHierarchy(9bf44374-c106-4ab3-9c6a-d68474e9b25f+3938: "Product Dimension")),true))),NoAggregation), NoAggregation, Some(c1)), | |
ColumnData(SelectColumn(Some(c2),AttributeValue(FlatAttribute(2ff18d3a-894a-4be1-6d5c-39d97245160a: "Product Line")),AggregateGrouped(true)), AggregateGrouped(true), Some(c2)), | |
ColumnData(SelectColumn(Some(c3s0),KeyValue(FlatKey(3b0e5176-ca31-4706-a508-092e3c17daa2)),AggregateGrouped(true)), AggregateGrouped(true), Some(c3s0)) | |
), | |
AuxiliaryData(), | |
UnionCubes( |
NewerOlder