[Mondrian] RE: Zeros being treated as Null

Julian Hyde jhyde at pentaho.com
Fri Mar 12 02:16:07 EST 2010


I did not intend to change the behavior. So this is a bug.
 
Not all tests are passing on all platforms/configurations. Are all tests
passing in the configuration that shows this bug? I'd rather not add a
redundant test case.
 
The changes to SegmentLoader were a performance fix, so please try not to
undo the performance improvements I made there.
 
Julian


  _____  

From: Kurtis.Walker at thomsonreuters.com
[mailto:Kurtis.Walker at thomsonreuters.com] 
Sent: Thursday, March 11, 2010 7:21 AM
To: jhyde at pentaho.com
Cc: mondrian at pentaho.org
Subject: Zeros being treated as Null



Julian,

The recent changes to how Mondrian gets values from the result set have
changed how zero values are treated.  They are empty cells in the result
instead of values of zero.  I've traced this to a couple lines in
SegmentLoader(line 516 and 524), but I'd like to confirm this was not an
intended change in behavior before I commit a fix.  Thanks.  

 

Here is the failing test:

 

public void testZeroValuesAreNotTreatedAsNull() {

        String mdx =

            "select"

            + "  {"

            + "    ("

            + "      [Product].[All
Products].[Food].[Produce].[Vegetables].[Fresh Vegetables].[Tell Tale].[Tell
Tale Tomatos],"

            + "      [Warehouse].[All
Warehouses].[USA].[WA].[Seattle].[Quality Warehousing and Trucking],"

            + "      [Store].[All Stores].[USA].[WA].[Seattle].[Store 15],"

            + "      [Time.Weekly].[All Time.Weeklys].[1997].[24].[3]"

            + "  )"

            + "  }"

            + "  on 0,"

            + "  [Measures].[units shipped] on 1"

            + " from warehouse";

        assertQueryReturns(

            mdx,

            "Axis #0:\n"

            + "{}\n"

            + "Axis #1:\n"

            + "{[Product].[All
Products].[Food].[Produce].[Vegetables].[Fresh Vegetables].[Tell Tale].[Tell
Tale Tomatos], "

            + "[Warehouse].[All Warehouses].[USA].[WA].[Seattle].[Quality
Warehousing and Trucking], "

            + "[Store].[All Stores].[USA].[WA].[Seattle].[Store 15], "

            + "[Time].[Weekly].[All Weeklys].[1997].[24].[3]}\n"

            + "Axis #2:\n"

            + "{[Measures].[Units Shipped]}\n"

            + "Row #0: .0\n");

    }

 

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
Kurtis Walker
Programmer Analyst Sr

Thomson Reuters

734-913-3034
kurtis.walker at thomsonreuters.com
 <http://thomsonreuters.com> thomsonreuters.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100311/e7334aa4/attachment.html 


More information about the Mondrian mailing list