From: Julian H. <jh...@pe...> - 2010-07-26 15:44:30
|
> > Paul wrote: > > > > I don't really know if the standard states that unique > names should follow > > the schema [x].[y] or not. > > > > But in olap4j I use the > QueryDimension.getNameParts("[Months].Level00") > > which runs into an exception when parsing the Segments in > > IdentifierNode.java : parseIdentifier(String identifier) at > line 217-219 > Vladislav Malicevic wrote: > > According to: > > http://msdn.microsoft.com/en-us/library/ms145572.aspx > > case Level00, should work without brackets too (no space, > reserved word, etc.). I agree with Vladislav. We need to improve IdentifierNode.parseIdentifier. Note that mondrian has mondrian.util.IdentifierParser with those capabilities. mondrian.olap.util.Util.parseIdentifier(String s) calls IdentifierParser.parseIdentifier. And there is a set of tests in UtilTestCase.testParseIdentifierList. That code should be added to olap4j. (Officially, applications are not supposed to try to parse unique names. They are supposed to treat them as black boxes, and they may change without notice. However, olap4j is not a just a regular application, and to do its work it needs to look inside the black box. If one of our providers changes its scheme for generating unique names, we will have to change olap4j to match.) Julian |