PDA

View Full Version : [Mondrian] [Fwd: Eigenbase perforce change 8704 for review]



John V. Sichi
02-13-2007, 06:20 AM
Review comments on the change below are welcome. The test case
illustrates why I had to make it, but there's probably a smart way to
avoid re-evaluating named set expressions which don't need it.

JVS

-------- Original Message --------
Subject: Eigenbase perforce change 8704 for review
Date: Tue, 13 Feb 2007 01:58:01 -0800 (PST)
From: John V. Sichi <jsichi (AT) gmail (DOT) com>
To: Andreas Voss <tonbeller (AT) a-voss (DOT) de>, Bart Pappyn
<bppn (AT) users (DOT) sourceforge.net>, Hartmut Haas <Hartmut_Haas (AT) tonbeller (DOT) com>,
Julian Hyde <jhyde (AT) users (DOT) sourceforge.net>, John V. Sichi
<jsichi (AT) gmail (DOT) com>, Kinkoi Lo <kinkoi (AT) gmail (DOT) com>, Matt Campbell
<Matthew.Campbell (AT) thomson (DOT) com>, Sam Birney <sbirney (AT) jaspersoft (DOT) com>

http://p4web.eigenbase.org/@md=d&c=6PU@//8704?ac=10

Change 8704 by jvs (AT) jvs (DOT) kotick.eigenbase on 2007/02/13 01:58:00

MONDRIAN: clear named set cache whenever cache of other
expressions is cleared; otherwise, an incorrect value
for a named set can be reused

Affected files ...

.... //open/mondrian/src/main/mondrian/rolap/RolapEvaluator.java#55 edit
.... //open/mondrian/src/main/mondrian/rolap/RolapResult.java#89 edit
.... //open/mondrian/testsrc/main/mondrian/test/ClearViewTest.java#3 edit

Differences ...

==== //open/mondrian/src/main/mondrian/rolap/RolapEvaluator.java#55
(ktext) ====

2c2
< // $Id: //open/mondrian/src/main/mondrian/rolap/RolapEvaluator.java#54 $
---
> // $Id: //open/mondrian/src/main/mondrian/rolap/RolapEvaluator.java#55 $
39c39
< * @version $Id:
//open/mondrian/src/main/mondrian/rolap/RolapEvaluator.java#54 $
---
> * @version $Id: //open/mondrian/src/main/mondrian/rolap/RolapEvaluator.java#55 $
186a187,192
> * Clears cached values for all named sets.
> */
> protected void clearNamedSets() {
> }
>
> /**
659a666,673
>
> // Clear cached named sets at the same time we clear other cached
> // expressions. This may be overconservative in some cases, but
> // without this, there can be bugs when incorrect results get cached
> // for named sets which depend on measures which haven't been loaded
> // yet. See mondrian.test.ClearViewTest.testLer4260 for an
> // example.
> root.clearNamedSets();

==== //open/mondrian/src/main/mondrian/rolap/RolapResult.java#89 (ktext)
====

2c2
< // $Id: //open/mondrian/src/main/mondrian/rolap/RolapResult.java#88 $
---
> // $Id: //open/mondrian/src/main/mondrian/rolap/RolapResult.java#89 $
40c40
< * @version $Id:
//open/mondrian/src/main/mondrian/rolap/RolapResult.java#88 $
---
> * @version $Id: //open/mondrian/src/main/mondrian/rolap/RolapResult.java#89 $
809a810,813
> protected void clearNamedSets() {
> namedSetValues.clear();
> }
>

==== //open/mondrian/testsrc/main/mondrian/test/ClearViewTest.java#3
(ktext) ====

2c2
< // $Id: //open/mondrian/testsrc/main/mondrian/test/ClearViewTest.java#2 $
---
> // $Id: //open/mondrian/testsrc/main/mondrian/test/ClearViewTest.java#3 $
20c20
< * @version $Id:
//open/mondrian/testsrc/main/mondrian/test/ClearViewTest.java#2 $
---
> * @version $Id: //open/mondrian/testsrc/main/mondrian/test/ClearViewTest.java#3 $
164a165,198
>
> /**
> * Tests a bug with incorrect reuse of a named set which can't be
> * computed directly against a cold cache.
> */
> public void testLer4260() {
> assertQueryReturns(
> "With Set [*BMEL] as \n" +
> "'[Education Level].[Education Level].Members' \n" +
> "Member [Measures].[*TBM] as \n" +
> "'Rank([Education Level].CurrentMember, \n" +
> "Order([*BMEL],([Measures].[Unit Sales]),BDESC))' \n" +
> "Set [*SM_RSUM_SET_0] as \n" +
> "'Filter([*BMEL],[Measures].[*TBM] <= 3)'\n" +
> "select [*SM_RSUM_SET_0] on rows, \n" +
> "{[Measures].[*TBM], [Measures].[Unit Sales]} on columns \n" +
> "From [Sales]",
> fold(
> "Axis #0:\n" +
> "{}\n" +
> "Axis #1:\n" +
> "{[Measures].[*TBM]}\n" +
> "{[Measures].[Unit Sales]}\n" +
> "Axis #2:\n" +
> "{[Education Level].[All Education Levels].[Bachelors Degree]}\n" +
> "{[Education Level].[All Education Levels].[High School Degree]}\n" +
> "{[Education Level].[All Education Levels].[Partial High School]}\n" +
> "Row #0: 3\n" +
> "Row #0: 68,839\n" +
> "Row #1: 2\n" +
> "Row #1: 78,664\n" +
> "Row #2: 1\n" +
> "Row #2: 79,155\n"));
> }

_______________________________________________
Mondrian mailing list
Mondrian (AT) pentaho (DOT) org
http://lists.pentaho.org/mailman/listinfo/mondrian

John V. Sichi
02-27-2007, 01:56 AM
Followup performance analysis revealed that the overconservatism of this
fix had a significant negative impact on performance. I'll have someone
working on an optimal fix, but it may not be for a few weeks. In the
meantime, if you'd prefer the bug to the performance drag, comment out
the body of RolapResult.clearNamedSets.

JVS

John V. Sichi wrote:
> Review comments on the change below are welcome. The test case
> illustrates why I had to make it, but there's probably a smart way to
> avoid re-evaluating named set expressions which don't need it.
>
> JVS
>
> -------- Original Message --------
> Subject: Eigenbase perforce change 8704 for review
> Date: Tue, 13 Feb 2007 01:58:01 -0800 (PST)
> From: John V. Sichi <jsichi (AT) gmail (DOT) com>
> To: Andreas Voss <tonbeller (AT) a-voss (DOT) de>, Bart Pappyn
> <bppn (AT) users (DOT) sourceforge.net>, Hartmut Haas <Hartmut_Haas (AT) tonbeller (DOT) com>,
> Julian Hyde <jhyde (AT) users (DOT) sourceforge.net>, John V. Sichi
> <jsichi (AT) gmail (DOT) com>, Kinkoi Lo <kinkoi (AT) gmail (DOT) com>, Matt Campbell
> <Matthew.Campbell (AT) thomson (DOT) com>, Sam Birney <sbirney (AT) jaspersoft (DOT) com>
>
> http://p4web.eigenbase.org/@md=d&c=6PU@//8704?ac=10
>
> Change 8704 by jvs (AT) jvs (DOT) kotick.eigenbase on 2007/02/13 01:58:00
>
> MONDRIAN: clear named set cache whenever cache of other
> expressions is cleared; otherwise, an incorrect value
> for a named set can be reused
>
> Affected files ...
>
> ... //open/mondrian/src/main/mondrian/rolap/RolapEvaluator.java#55 edit
> ... //open/mondrian/src/main/mondrian/rolap/RolapResult.java#89 edit
> ... //open/mondrian/testsrc/main/mondrian/test/ClearViewTest.java#3 edit
>
> Differences ...
>
> ==== //open/mondrian/src/main/mondrian/rolap/RolapEvaluator.java#55
> (ktext) ====
>
> 2c2
> < // $Id: //open/mondrian/src/main/mondrian/rolap/RolapEvaluator.java#54 $
> ---
>> // $Id: //open/mondrian/src/main/mondrian/rolap/RolapEvaluator.java#55 $
> 39c39
> < * @version $Id:
> //open/mondrian/src/main/mondrian/rolap/RolapEvaluator.java#54 $
> ---
>> * @version $Id:
>> //open/mondrian/src/main/mondrian/rolap/RolapEvaluator.java#55 $
> 186a187,192
>> * Clears cached values for all named sets.
>> */
>> protected void clearNamedSets() {
>> }
>>
>> /**
> 659a666,673
>>
>> // Clear cached named sets at the same time we clear other cached
>> // expressions. This may be overconservative in some cases, but
>> // without this, there can be bugs when incorrect results get
>> cached
>> // for named sets which depend on measures which haven't been
>> loaded
>> // yet. See mondrian.test.ClearViewTest.testLer4260 for an
>> // example.
>> root.clearNamedSets();
>
> ==== //open/mondrian/src/main/mondrian/rolap/RolapResult.java#89 (ktext)
> ====
>
> 2c2
> < // $Id: //open/mondrian/src/main/mondrian/rolap/RolapResult.java#88 $
> ---
>> // $Id: //open/mondrian/src/main/mondrian/rolap/RolapResult.java#89 $
> 40c40
> < * @version $Id:
> //open/mondrian/src/main/mondrian/rolap/RolapResult.java#88 $
> ---
>> * @version $Id:
>> //open/mondrian/src/main/mondrian/rolap/RolapResult.java#89 $
> 809a810,813
>> protected void clearNamedSets() {
>> namedSetValues.clear();
>> }
>>
>
> ==== //open/mondrian/testsrc/main/mondrian/test/ClearViewTest.java#3
> (ktext) ====
>
> 2c2
> < // $Id: //open/mondrian/testsrc/main/mondrian/test/ClearViewTest.java#2 $
> ---
>> // $Id: //open/mondrian/testsrc/main/mondrian/test/ClearViewTest.java#3 $
> 20c20
> < * @version $Id:
> //open/mondrian/testsrc/main/mondrian/test/ClearViewTest.java#2 $
> ---
>> * @version $Id:
>> //open/mondrian/testsrc/main/mondrian/test/ClearViewTest.java#3 $
> 164a165,198
>>
>> /**
>> * Tests a bug with incorrect reuse of a named set which can't be
>> * computed directly against a cold cache.
>> */
>> public void testLer4260() {
>> assertQueryReturns(
>> "With Set [*BMEL] as \n" +
>> "'[Education Level].[Education Level].Members' \n" +
>> "Member [Measures].[*TBM] as \n" +
>> "'Rank([Education Level].CurrentMember, \n" +
>> "Order([*BMEL],([Measures].[Unit Sales]),BDESC))' \n" +
>> "Set [*SM_RSUM_SET_0] as \n" +
>> "'Filter([*BMEL],[Measures].[*TBM] <= 3)'\n" +
>> "select [*SM_RSUM_SET_0] on rows, \n" +
>> "{[Measures].[*TBM], [Measures].[Unit Sales]} on columns
>> \n" +
>> "From [Sales]",
>> fold(
>> "Axis #0:\n" +
>> "{}\n" +
>> "Axis #1:\n" +
>> "{[Measures].[*TBM]}\n" +
>> "{[Measures].[Unit Sales]}\n" +
>> "Axis #2:\n" +
>> "{[Education Level].[All Education Levels].[Bachelors
>> Degree]}\n" +
>> "{[Education Level].[All Education Levels].[High
>> School Degree]}\n" +
>> "{[Education Level].[All Education Levels].[Partial
>> High School]}\n" +
>> "Row #0: 3\n" +
>> "Row #0: 68,839\n" +
>> "Row #1: 2\n" +
>> "Row #1: 78,664\n" +
>> "Row #2: 1\n" +
>> "Row #2: 79,155\n"));
>> }
>
>

_______________________________________________
Mondrian mailing list
Mondrian (AT) pentaho (DOT) org
http://lists.pentaho.org/mailman/listinfo/mondrian

Haridasan T
03-01-2007, 09:50 AM
Greetings,
Appreciate if you can help me to connect to oracle database from Mondrian

Which all xml files need to be changed

Thanks

Hari Nair
--


On 2/27/07, John V. Sichi <jsichi (AT) gmail (DOT) com> wrote:
>
> Followup performance analysis revealed that the overconservatism of this
> fix had a significant negative impact on performance. I'll have someone
> working on an optimal fix, but it may not be for a few weeks. In the
> meantime, if you'd prefer the bug to the performance drag, comment out
> the body of RolapResult.clearNamedSets.
>
> JVS
>
> John V. Sichi wrote:
> > Review comments on the change below are welcome. The test case
> > illustrates why I had to make it, but there's probably a smart way to
> > avoid re-evaluating named set expressions which don't need it.
> >
> > JVS
> >
> > -------- Original Message --------
> > Subject: Eigenbase perforce change 8704 for review
> > Date: Tue, 13 Feb 2007 01:58:01 -0800 (PST)
> > From: John V. Sichi <jsichi (AT) gmail (DOT) com>
> > To: Andreas Voss <tonbeller (AT) a-voss (DOT) de>, Bart Pappyn
> > <bppn (AT) users (DOT) sourceforge.net>, Hartmut Haas <Hartmut_Haas (AT) tonbeller (DOT) com>,
> > Julian Hyde <jhyde (AT) users (DOT) sourceforge.net>, John V. Sichi
> > <jsichi (AT) gmail (DOT) com>, Kinkoi Lo <kinkoi (AT) gmail (DOT) com>, Matt Campbell
> > <Matthew.Campbell (AT) thomson (DOT) com>, Sam Birney <sbirney (AT) jaspersoft (DOT) com>
> >
> > http://p4web.eigenbase.org/@md=d&c=6PU@//8704?ac=10
> >
> > Change 8704 by jvs (AT) jvs (DOT) kotick.eigenbase on 2007/02/13 01:58:00
> >
> > MONDRIAN: clear named set cache whenever cache of other
> > expressions is cleared; otherwise, an incorrect value
> > for a named set can be reused
> >
> > Affected files ...
> >
> > ... //open/mondrian/src/main/mondrian/rolap/RolapEvaluator.java#55 edit
> > ... //open/mondrian/src/main/mondrian/rolap/RolapResult.java#89 edit
> > ... //open/mondrian/testsrc/main/mondrian/test/ClearViewTest.java#3 edit
> >
> > Differences ...
> >
> > ==== //open/mondrian/src/main/mondrian/rolap/RolapEvaluator.java#55
> > (ktext) ====
> >
> > 2c2
> > < // $Id: //open/mondrian/src/main/mondrian/rolap/RolapEvaluator.java#54
> $
> > ---
> >> // $Id: //open/mondrian/src/main/mondrian/rolap/RolapEvaluator.java#55
> $
> > 39c39
> > < * @version $Id:
> > //open/mondrian/src/main/mondrian/rolap/RolapEvaluator.java#54 $
> > ---
> >> * @version $Id:
> >> //open/mondrian/src/main/mondrian/rolap/RolapEvaluator.java#55 $
> > 186a187,192
> >> * Clears cached values for all named sets.
> >> */
> >> protected void clearNamedSets() {
> >> }
> >>
> >> /**
> > 659a666,673
> >>
> >> // Clear cached named sets at the same time we clear other
> cached
> >> // expressions. This may be overconservative in some cases,
> but
> >> // without this, there can be bugs when incorrect results get
> >> cached
> >> // for named sets which depend on measures which haven't been
> >> loaded
> >> // yet. See mondrian.test.ClearViewTest.testLer4260 for an
> >> // example.
> >> root.clearNamedSets();
> >
> > ==== //open/mondrian/src/main/mondrian/rolap/RolapResult.java#89 (ktext)
> > ====
> >
> > 2c2
> > < // $Id: //open/mondrian/src/main/mondrian/rolap/RolapResult.java#88 $
> > ---
> >> // $Id: //open/mondrian/src/main/mondrian/rolap/RolapResult.java#89 $
> > 40c40
> > < * @version $Id:
> > //open/mondrian/src/main/mondrian/rolap/RolapResult.java#88 $
> > ---
> >> * @version $Id:
> >> //open/mondrian/src/main/mondrian/rolap/RolapResult.java#89 $
> > 809a810,813
> >> protected void clearNamedSets() {
> >> namedSetValues.clear();
> >> }
> >>
> >
> > ==== //open/mondrian/testsrc/main/mondrian/test/ClearViewTest.java#3
> > (ktext) ====
> >
> > 2c2
> > < // $Id:
> //open/mondrian/testsrc/main/mondrian/test/ClearViewTest.java#2 $
> > ---
> >> // $Id: //open/mondrian/testsrc/main/mondrian/test/ClearViewTest.java#3
> $
> > 20c20
> > < * @version $Id:
> > //open/mondrian/testsrc/main/mondrian/test/ClearViewTest.java#2 $
> > ---
> >> * @version $Id:
> >> //open/mondrian/testsrc/main/mondrian/test/ClearViewTest.java#3 $
> > 164a165,198
> >>
> >> /**
> >> * Tests a bug with incorrect reuse of a named set which can't be
> >> * computed directly against a cold cache.
> >> */
> >> public void testLer4260() {
> >> assertQueryReturns(
> >> "With Set [*BMEL] as \n" +
> >> "'[Education Level].[Education Level].Members' \n" +
> >> "Member [Measures].[*TBM] as \n" +
> >> "'Rank([Education Level].CurrentMember, \n" +
> >> "Order([*BMEL],([Measures].[Unit Sales]),BDESC))' \n" +
> >> "Set [*SM_RSUM_SET_0] as \n" +
> >> "'Filter([*BMEL],[Measures].[*TBM] <= 3)'\n" +
> >> "select [*SM_RSUM_SET_0] on rows, \n" +
> >> "{[Measures].[*TBM], [Measures].[Unit Sales]} on columns
> >> \n" +
> >> "From [Sales]",
> >> fold(
> >> "Axis #0:\n" +
> >> "{}\n" +
> >> "Axis #1:\n" +
> >> "{[Measures].[*TBM]}\n" +
> >> "{[Measures].[Unit Sales]}\n" +
> >> "Axis #2:\n" +
> >> "{[Education Level].[All Education Levels].[Bachelors
> >> Degree]}\n" +
> >> "{[Education Level].[All Education Levels].[High
> >> School Degree]}\n" +
> >> "{[Education Level].[All Education Levels].[Partial
> >> High School]}\n" +
> >> "Row #0: 3\n" +
> >> "Row #0: 68,839\n" +
> >> "Row #1: 2\n" +
> >> "Row #1: 78,664\n" +
> >> "Row #2: 1\n" +
> >> "Row #2: 79,155\n"));
> >> }
> >
> >
>
> _______________________________________________
> Mondrian mailing list
> Mondrian (AT) pentaho (DOT) org
> http://lists.pentaho.org/mailman/listinfo/mondrian
>



--
http://cfo-portal.blogspot.com/

_______________________________________________
Mondrian mailing list
Mondrian (AT) pentaho (DOT) org
http://lists.pentaho.org/mailman/listinfo/mondrian