Skip to content

Commit

Permalink
MONDRIAN: javadoc improvement for 11180. Also correct a comment in mo…
Browse files Browse the repository at this point in the history
…ndrian.properties file.

[git-p4: depot-paths = "//open/mondrian/": change = 11184]
  • Loading branch information
Rushan Chen committed Jun 17, 2008
1 parent 11d055f commit a94c88c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 13 deletions.
4 changes: 2 additions & 2 deletions mondrian.properties
Expand Up @@ -322,8 +322,8 @@ mondrian.rolap.iterationLimit=0
# mondrian.rolap.RolapResult.useImplicitMembers=true

###############################################################################
# If true, a division having a non-null numerator and a null denominator
# evaluates to Infinity. If false, the same division results in Null.
# If false(default), a division having a non-null numerator and a null denominator
# evaluates to Infinity. If true, the same division results in Null.
# mondrian.olap.NullDenominatorProducesNull=false

################################################################################
Expand Down
32 changes: 21 additions & 11 deletions src/main/mondrian/olap/ConnectionBase.java
Expand Up @@ -64,18 +64,22 @@ public Query parseQuery(String query, boolean load) {
}

/**
* Parses a query, with specified function table and the mode for strict
* Parses a query, with specified function table and the mode for strict
* validation(if true then invalid members are not ignored).
*
* This method is only used in testing and bu clients that need to support customized
* parser behavior. That is why this method is not part of the Connection interface.
* <p>This method is only used in testing and by clients that need to
* support customized parser behavior. That is why this method is not part
* of the Connection interface.
*
* @param mdxQuery
* @param funTable
* @param strictValidation
* @return Query if parsing is successful
* @param query MDX query that requires special parsing
* @param funTable Customized function table to use in parsing
* @param strictValidation If true, do not ignore invalid members
* @return Query the corresponding Query object if parsing is successful
* @throws MondrianException if parsing fails
* @see mondrian.olap.CustomizedParserTest
*/
public Query parseQuery(String query, FunTable funTable, boolean strictValidation) {
public Query parseQuery(String query, FunTable funTable,
boolean strictValidation) {
return parseQuery(query, funTable, false, strictValidation);
}

Expand All @@ -94,11 +98,15 @@ public Exp parseExpression(String expr) {
Exp q = parser.parseExpression(this, expr, debug, funTable);
return q;
} catch (Throwable exception) {
throw MondrianResource.instance().FailedToParseQuery.ex(expr, exception);
throw
MondrianResource.instance().FailedToParseQuery.ex(
expr,
exception);
}
}

private Query parseQuery(String query, FunTable cftab, boolean load, boolean strictValidation) {
private Query parseQuery(String query, FunTable cftab, boolean load,
boolean strictValidation) {
Parser parser = new Parser();
boolean debug = false;
final FunTable funTable;
Expand All @@ -118,7 +126,9 @@ private Query parseQuery(String query, FunTable cftab, boolean load, boolean str
}

try {
Query q = parser.parseInternal(this, query, debug, funTable, load, strictValidation);
Query q =
parser.parseInternal(this, query, debug, funTable, load,
strictValidation);
return q;
} catch (Throwable e) {
throw MondrianResource.instance().FailedToParseQuery.ex(query, e);
Expand Down

0 comments on commit a94c88c

Please sign in to comment.