+ " [CustomerDim].[CustomerName].&[XYZ]})'\n"
+ "SELECT\n"
+ "{[Measures].[Sales]} ON COLUMNS\n"
+ "FROM [cube]\n"
+ "WHERE ([CustomerDim].[CustomerName].[XL_QZX])";
final MdxParser parser = new DefaultMdxParserImpl();
SelectNode rootNode = parser.parseSelect(query);
TestContext.assertEqualsVerbose(
"WITH\n"
+ "MEMBER [CustomerDim].[CustomerName].[XL_QZX] AS\n"
+ " Aggregate({[CustomerDim].[CustomerName].&[ABC INT'L], [CustomerDim].[CustomerName].&[XYZ]})\n"
+ "SELECT\n"
+ "{[Measures].[Sales]} ON COLUMNS\n"
+ "FROM [cube]\n"
+ "WHERE ([CustomerDim].[CustomerName].[XL_QZX])",
rootNode.toString());
// Now named set
query =
"WITH SET Foo as Filter(Bar.Members, Instr(Name, \"'\") > 0)\n"
+ "SELECT FROM [Cube]";
rootNode = parser.parseSelect(query);
TestContext.assertEqualsVerbose(
"WITH\n"
+ "SET Foo AS\n"
+ " Filter(Bar.Members, (Instr(Name, \"'\") > 0))\n"
+ "SELECT\n"