[Mondrian] Zeros being treated as Null

Kurtis.Walker at thomsonreuters.com Kurtis.Walker at thomsonreuters.com
Thu Mar 11 10:20:42 EST 2010


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
thomsonreuters.com <http://thomsonreuters.com> 

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


More information about the Mondrian mailing list