Skip to content

Commit

Permalink
fix formatting (indentation)
Browse files Browse the repository at this point in the history
git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@458 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
pstoellberger committed Jun 27, 2011
1 parent 6304f01 commit 317eaf8
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 73 deletions.
30 changes: 15 additions & 15 deletions src/org/olap4j/query/Olap4jNodeConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -615,11 +615,11 @@ private static ParseTreeNode toHierarchyConsistentNode(
{
CallNode ancestorNode =
new CallNode(
null,
"Ancestor",
Syntax.Function,
currentMemberNode,
new LevelNode(null, currentLevel));
null,
"Ancestor",
Syntax.Function,
currentMemberNode,
new LevelNode(null, currentLevel));

List <ParseTreeNode> ancestorList =
new ArrayList<ParseTreeNode>();
Expand All @@ -639,11 +639,11 @@ private static ParseTreeNode toHierarchyConsistentNode(
}
CallNode ancestorSet = generateListSetCall(ancestorList);
CallNode inClause = new CallNode(
null,
"IN",
Syntax.Infix,
ancestorNode,
ancestorSet);
null,
"IN",
Syntax.Infix,
ancestorNode,
ancestorSet);
inConditions.add(inClause);
}
}
Expand All @@ -652,11 +652,11 @@ private static ParseTreeNode toHierarchyConsistentNode(
if (inConditions.size() > 1) {
for (int c = 1;c < inConditions.size();c++) {
chainedIn = new CallNode(
null,
"AND",
Syntax.Infix,
chainedIn,
inConditions.get(c));
null,
"AND",
Syntax.Infix,
chainedIn,
inConditions.get(c));
}
}

Expand Down
34 changes: 17 additions & 17 deletions testsrc/org/olap4j/ConnectionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2056,23 +2056,23 @@ public void testVirtualCubeCmBug() throws Exception {
measureVcNameSet.add(measure.getName());
}
assertEquals(
new HashSet<String>(
Arrays.asList(
"Sales Count",
"Store Cost",
"Store Sales",
"Unit Sales",
"Profit",
"Profit Growth",
"Store Invoice",
"Supply Time",
"Units Ordered",
"Units Shipped",
"Warehouse Cost",
"Warehouse Profit",
"Warehouse Sales",
"Average Warehouse Sale")),
measureVcNameSet);
new HashSet<String>(
Arrays.asList(
"Sales Count",
"Store Cost",
"Store Sales",
"Unit Sales",
"Profit",
"Profit Growth",
"Store Invoice",
"Supply Time",
"Units Ordered",
"Units Shipped",
"Warehouse Cost",
"Warehouse Profit",
"Warehouse Sales",
"Average Warehouse Sale")),
measureVcNameSet);
}

/**
Expand Down
82 changes: 41 additions & 41 deletions testsrc/org/olap4j/OlapTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1457,16 +1457,16 @@ public void testHierarchyConsistency() {
productDimension.include(productLevel);

productDimension.include(
Selection.Operator.MEMBER,
Selection.Operator.MEMBER,
nameList("Product", "Food", "Deli"));
productDimension.include(
Selection.Operator.MEMBER,
Selection.Operator.MEMBER,
nameList("Product", "Food", "Dairy"));
productDimension.include(
Selection.Operator.MEMBER,
nameList("Product", "Product Family", "Food"));
nameList("Product", "Product Family", "Food"));
productDimension.include(
Selection.Operator.MEMBER,
Selection.Operator.MEMBER,
nameList("Product", "All Products"));
QueryDimension timeDimension = query.getDimension("Time");
timeDimension.setHierarchyConsistent(true);
Expand Down Expand Up @@ -1496,48 +1496,48 @@ public void testHierarchyConsistency() {
CellSet results = query.execute();
String resultsString = TestContext.toString(results);
TestContext.assertEqualsVerbose(
"Axis #0:\n"
+ "{}\n"
+ "Axis #1:\n"
+ "{[Product].[All Products]}\n"
+ "{[Product].[Food]}\n"
+ "{[Product].[Food].[Deli]}\n"
+ "{[Product].[Food].[Dairy]}\n"
+ "{[Product].[Food].[Dairy].[Dairy]}\n"
+ "{[Product].[Food].[Deli].[Meat]}\n"
+ "{[Product].[Food].[Deli].[Side Dishes]}\n"
+ "Axis #2:\n"
+ "{[Time].[1997]}\n"
+ "{[Time].[1997].[Q3].[7]}\n"
+ "{[Time].[1997].[Q4].[11]}\n"
+ "Row #0: 266,773\n"
+ "Row #0: 191,940\n"
+ "Row #0: 12,037\n"
+ "Row #0: 12,885\n"
+ "Row #0: 12,885\n"
+ "Row #0: 9,433\n"
+ "Row #0: 2,604\n"
+ "Row #1: 23,763\n"
+ "Row #1: 17,036\n"
+ "Row #1: 1,050\n"
+ "Row #1: 1,229\n"
+ "Row #1: 1,229\n"
+ "Row #1: 847\n"
+ "Row #1: 203\n"
+ "Row #2: 25,270\n"
+ "Row #2: 18,278\n"
+ "Row #2: 1,312\n"
+ "Row #2: 1,232\n"
+ "Row #2: 1,232\n"
+ "Row #2: 1,033\n"
+ "Row #2: 279\n",
resultsString);
"Axis #0:\n"
+ "{}\n"
+ "Axis #1:\n"
+ "{[Product].[All Products]}\n"
+ "{[Product].[Food]}\n"
+ "{[Product].[Food].[Deli]}\n"
+ "{[Product].[Food].[Dairy]}\n"
+ "{[Product].[Food].[Dairy].[Dairy]}\n"
+ "{[Product].[Food].[Deli].[Meat]}\n"
+ "{[Product].[Food].[Deli].[Side Dishes]}\n"
+ "Axis #2:\n"
+ "{[Time].[1997]}\n"
+ "{[Time].[1997].[Q3].[7]}\n"
+ "{[Time].[1997].[Q4].[11]}\n"
+ "Row #0: 266,773\n"
+ "Row #0: 191,940\n"
+ "Row #0: 12,037\n"
+ "Row #0: 12,885\n"
+ "Row #0: 12,885\n"
+ "Row #0: 9,433\n"
+ "Row #0: 2,604\n"
+ "Row #1: 23,763\n"
+ "Row #1: 17,036\n"
+ "Row #1: 1,050\n"
+ "Row #1: 1,229\n"
+ "Row #1: 1,229\n"
+ "Row #1: 847\n"
+ "Row #1: 203\n"
+ "Row #2: 25,270\n"
+ "Row #2: 18,278\n"
+ "Row #2: 1,312\n"
+ "Row #2: 1,232\n"
+ "Row #2: 1,232\n"
+ "Row #2: 1,033\n"
+ "Row #2: 279\n",
resultsString);
query.validate();

query.getAxis(Axis.ROWS).addDimension(measuresDimension);
productDimension.clearInclusions();
productDimension.include(
Selection.Operator.MEMBER,
Selection.Operator.MEMBER,
nameList("Product", "Product Family", "Food"));

// Validate the generated MDX
Expand Down

0 comments on commit 317eaf8

Please sign in to comment.