US and Worldwide: +1 (866) 660-7555
Results 1 to 5 of 5

Thread: [Mondrian] NonEmptyTest.testConstrainedMeasureGetsOptimized

  1. #1
    Julian Hyde Guest

    Default [Mondrian] NonEmptyTest.testConstrainedMeasureGetsOptimized

    Matt,

    NonEmptyTest.testConstrainedMeasureGetsOptimized is failing on Oracle:
    [java] There was 1 failure:

    [java] 1)
    testConstrainedMeasureGetsOptimized(mondrian.rolap .NonEmptyTest)junit.framew
    ork.AssertionFailedError: expected query [select "customer"."country" as
    "c0", "customer"."state_province" as "c1", "customer"."city" as "c2",
    "customer"."customer_id" as "c3", "fname" || ' ' || "lname" as "c4", "fname"
    || ' ' || "lname" as "c5", "customer"."gender" as "c6",
    "customer"."marital_status" as "c7", "customer"."education" as "c8",
    "customer"."yearly_income" as "c9" from "customer" "customer",
    "sales_fact_1997" "sales_fact_1997" where "sales_fact_1997"."customer_id" =
    "customer"."customer_id" and ("customer"."gender" in ('M', 'F')) group by
    "customer"."country", "customer"."state_province", "customer"."city",
    "customer"."customer_id", "fname" || ' ' || "lname", "customer"."gender",
    "customer"."marital_status", "customer"."education",
    "customer"."yearly_income" order by "customer"."country" ASC,
    "customer"."state_province" ASC, "customer"."city" ASC, "fname" || ' ' ||
    "lname" ASC] did not occur

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySqlOrNot(B atchTestCase.java:427)

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySql(BatchT estCase.java:294)

    [java] at
    mondrian.rolap.NonEmptyTest.testConstrainedMeasure GetsOptimized(NonEmptyTest
    ..java:3795)

    [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)

    [java] at
    sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39
    )

    [java] at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl
    ..java:25)

    [java] at
    mondrian.test.MondrianTestRunner$2.run(MondrianTes tRunner.java:139)

    [java] at java.lang.Thread.run(Thread.java:619)



    Julian


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

  2. #2
    Guest

    Default RE: [Mondrian] NonEmptyTest.testConstrainedMeasureGetsOptimized

    Julian,



    Our environment is Oracle and the test is passing. Is there anything
    else different about the environment where it fails? Also, we thought
    that the Hudson build ran against Oracle. The Hudson build is green
    right now, so are we incorrect that it runs against Oracle?



    Kurt



    From: mondrian-bounces (AT) pentaho (DOT) org [mailto:mondrian-bounces (AT) pentaho (DOT) org]
    On Behalf Of Julian Hyde
    Sent: Tuesday, January 05, 2010 12:41 PM
    To: 'Matt Campbell'
    Cc: 'Mondrian developer mailing list'
    Subject: [Mondrian] NonEmptyTest.testConstrainedMeasureGetsOptimized



    Matt,



    NonEmptyTest.testConstrainedMeasureGetsOptimized is failing on Oracle:

    [java] There was 1 failure:

    [java] 1)
    testConstrainedMeasureGetsOptimized(mondrian.rolap .NonEmptyTest)junit.fr
    amework.AssertionFailedError: expected query [select
    "customer"."country" as "c0", "customer"."state_province" as "c1",
    "customer"."city" as "c2", "customer"."customer_id" as "c3", "fname" ||
    ' ' || "lname" as "c4", "fname" || ' ' || "lname" as "c5",
    "customer"."gender" as "c6", "customer"."marital_status" as "c7",
    "customer"."education" as "c8", "customer"."yearly_income" as "c9" from
    "customer" "customer", "sales_fact_1997" "sales_fact_1997" where
    "sales_fact_1997"."customer_id" = "customer"."customer_id" and
    ("customer"."gender" in ('M', 'F')) group by "customer"."country",
    "customer"."state_province", "customer"."city",
    "customer"."customer_id", "fname" || ' ' || "lname",
    "customer"."gender", "customer"."marital_status",
    "customer"."education", "customer"."yearly_income" order by
    "customer"."country" ASC, "customer"."state_province" ASC,
    "customer"."city" ASC, "fname" || ' ' || "lname" ASC] did not occur

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySqlOrNot(B atchTestCase.java:427)

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySql(BatchT estCase.java:294)

    [java] at
    mondrian.rolap.NonEmptyTest.testConstrainedMeasure GetsOptimized(NonEmpty
    Test.java:3795)

    [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)

    [java] at
    sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.jav
    a:39)

    [java] at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessor
    Impl.java:25)

    [java] at
    mondrian.test.MondrianTestRunner$2.run(MondrianTes tRunner.java:139)

    [java] at java.lang.Thread.run(Thread.java:619)



    Julian


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

  3. #3
    Julian Hyde Guest

    Default RE: [Mondrian] NonEmptyTest.testConstrainedMeasureGetsOptimized

    Hudson runs against MySQL, not Oracle.

    Nothing special about the environment. It's JDK 1.6 linux, oracle-xe 10.2.
    When I run it on JDK 1.5 I get 4 different failures in NonEmptyTest:

    [java] There were 4 failures:

    [java] 1)
    testNativeCrossjoinWillConstrainUsingArgsFromAllAx es(mondrian.rolap.NonEmpty
    Test)junit.framework.AssertionFailedError: expected query [select
    "time_by_day"."the_year" as "c0", "promotion"."promotion_name" as "c1" from
    "time_by_day" "time_by_day", "sales_fact_1997" "sales_fact_1997",
    "promotion" "promotion", "customer" "customer" where
    "sales_fact_1997"."time_id" = "time_by_day"."time_id" and
    "sales_fact_1997"."promotion_id" = "promotion"."promotion_id" and
    ("promotion"."promotion_name" in ('Bag Stuffers', 'Best Savings')) and
    "sales_fact_1997"."customer_id" = "customer"."customer_id" and
    ("customer"."gender" = 'F') and ("time_by_day"."the_year" = 1997) group by
    "time_by_day"."the_year", "promotion"."promotion_name" order by 1 ASC, 2
    ASC] did not occur

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySqlOrNot(B atchTestCase.java:427)

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySql(BatchT estCase.java:294)

    [java] at
    mondrian.rolap.NonEmptyTest.testNativeCrossjoinWil lConstrainUsingArgsFromAll
    Axes(NonEmptyTest.java:3678)

    [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)

    [java] at
    sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39
    )

    [java] at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl
    ..java:25)

    [java] at
    mondrian.test.MondrianTestRunner$2.run(MondrianTes tRunner.java:139)

    [java] at java.lang.Thread.run(Thread.java:595)

    [java] 2)
    testNativeCrossjoinWillExpandFirstLastChild(mondri an.rolap.NonEmptyTest)juni
    t.framework.AssertionFailedError: expected query [select
    "time_by_day"."the_year" as "c0", "promotion"."promotion_name" as "c1" from
    "time_by_day" "time_by_day", "sales_fact_1997" "sales_fact_1997",
    "promotion" "promotion", "customer" "customer" where
    "sales_fact_1997"."time_id" = "time_by_day"."time_id" and
    "sales_fact_1997"."promotion_id" = "promotion"."promotion_id" and
    "sales_fact_1997"."customer_id" = "customer"."customer_id" and
    ("customer"."gender" in ('F', 'M')) and ("promotion"."promotion_name" in
    ('Bag Stuffers', 'Best Savings')) and ("time_by_day"."the_year" = 1997)
    group by "time_by_day"."the_year", "promotion"."promotion_name" order by 1
    ASC, 2 ASC] did not occur

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySqlOrNot(B atchTestCase.java:427)

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySql(BatchT estCase.java:294)

    [java] at
    mondrian.rolap.NonEmptyTest.testNativeCrossjoinWil lExpandFirstLastChild(NonE
    mptyTest.java:3732)

    [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)

    [java] at
    sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39
    )

    [java] at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl
    ..java:25)

    [java] at
    mondrian.test.MondrianTestRunner$2.run(MondrianTes tRunner.java:139)

    [java] at java.lang.Thread.run(Thread.java:595)

    [java] 3)
    testNativeCrossjoinWillExpandLagInNamedSet(mondria n.rolap.NonEmptyTest)junit
    ..framework.AssertionFailedError: expected query [select
    "time_by_day"."the_year" as "c0", "promotion"."promotion_name" as "c1" from
    "time_by_day" "time_by_day", "sales_fact_1997" "sales_fact_1997",
    "promotion" "promotion", "customer" "customer" where
    "sales_fact_1997"."time_id" = "time_by_day"."time_id" and
    "sales_fact_1997"."promotion_id" = "promotion"."promotion_id" and
    "sales_fact_1997"."customer_id" = "customer"."customer_id" and
    ("customer"."gender" in ('F', 'M')) and ("promotion"."promotion_name" in
    ('Bag Stuffers', 'Best Savings')) and ("time_by_day"."the_year" = 1997)
    group by "time_by_day"."the_year", "promotion"."promotion_name" order by 1
    ASC, 2 ASC] did not occur

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySqlOrNot(B atchTestCase.java:427)

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySql(BatchT estCase.java:294)

    [java] at
    mondrian.rolap.NonEmptyTest.testNativeCrossjoinWil lExpandLagInNamedSet(NonEm
    ptyTest.java:3756)

    [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)

    [java] at
    sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39
    )

    [java] at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl
    ..java:25)

    [java] at
    mondrian.test.MondrianTestRunner$2.run(MondrianTes tRunner.java:139)

    [java] at java.lang.Thread.run(Thread.java:595)

    [java] 4)
    testConstrainedMeasureGetsOptimized(mondrian.rolap .NonEmptyTest)junit.framew
    ork.AssertionFailedError: expected query [select "customer"."country" as
    "c0", "customer"."state_province" as "c1", "customer"."city" as "c2",
    "customer"."customer_id" as "c3", "fname" || ' ' || "lname" as "c4", "fname"
    || ' ' || "lname" as "c5", "customer"."gender" as "c6",
    "customer"."marital_status" as "c7", "customer"."education" as "c8",
    "customer"."yearly_income" as "c9" from "customer" "customer",
    "sales_fact_1997" "sales_fact_1997" where "sales_fact_1997"."customer_id" =
    "customer"."customer_id" and ("customer"."gender" in ('M', 'F')) group by
    "customer"."country", "customer"."state_province", "customer"."city",
    "customer"."customer_id", "fname" || ' ' || "lname", "customer"."gender",
    "customer"."marital_status", "customer"."education",
    "customer"."yearly_income" order by "customer"."country" ASC,
    "customer"."state_province" ASC, "customer"."city" ASC, "fname" || ' ' ||
    "lname" ASC] did not occur

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySqlOrNot(B atchTestCase.java:427)

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySql(BatchT estCase.java:294)

    [java] at
    mondrian.rolap.NonEmptyTest.testConstrainedMeasure GetsOptimized(NonEmptyTest
    ..java:3795)

    [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)

    [java] at
    sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39
    )

    [java] at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl
    ..java:25)

    [java] at
    mondrian.test.MondrianTestRunner$2.run(MondrianTes tRunner.java:139)

    [java] at java.lang.Thread.run(Thread.java:595)



    Can you look into those failures also.

    I notice that ('F', 'M') occurs in some queries, ('M', 'F') in others. This
    is a hint that there is non-determinism in your code. Make sure you are not
    relying on iterator order of hashmaps or hashsets.

    Julian



    _____

    From: Kurtis.Walker (AT) thomsonreuters (DOT) com
    [mailto:Kurtis.Walker (AT) thomsonreuters (DOT) com]
    Sent: Tuesday, January 05, 2010 9:59 AM
    To: jhyde (AT) pentaho (DOT) com; mondrian (AT) pentaho (DOT) org; mkambol (AT) gmail (DOT) com
    Subject: RE: [Mondrian] NonEmptyTest.testConstrainedMeasureGetsOptimized



    Julian,



    Our environment is Oracle and the test is passing. Is there anything else
    different about the environment where it fails? Also, we thought that the
    Hudson build ran against Oracle. The Hudson build is green right now, so
    are we incorrect that it runs against Oracle?



    Kurt



    From: mondrian-bounces (AT) pentaho (DOT) org [mailto:mondrian-bounces (AT) pentaho (DOT) org] On
    Behalf Of Julian Hyde
    Sent: Tuesday, January 05, 2010 12:41 PM
    To: 'Matt Campbell'
    Cc: 'Mondrian developer mailing list'
    Subject: [Mondrian] NonEmptyTest.testConstrainedMeasureGetsOptimized



    Matt,



    NonEmptyTest.testConstrainedMeasureGetsOptimized is failing on Oracle:

    [java] There was 1 failure:

    [java] 1)
    testConstrainedMeasureGetsOptimized(mondrian.rolap .NonEmptyTest)junit.framew
    ork.AssertionFailedError: expected query [select "customer"."country" as
    "c0", "customer"."state_province" as "c1", "customer"."city" as "c2",
    "customer"."customer_id" as "c3", "fname" || ' ' || "lname" as "c4", "fname"
    || ' ' || "lname" as "c5", "customer"."gender" as "c6",
    "customer"."marital_status" as "c7", "customer"."education" as "c8",
    "customer"."yearly_income" as "c9" from "customer" "customer",
    "sales_fact_1997" "sales_fact_1997" where "sales_fact_1997"."customer_id" =
    "customer"."customer_id" and ("customer"."gender" in ('M', 'F')) group by
    "customer"."country", "customer"."state_province", "customer"."city",
    "customer"."customer_id", "fname" || ' ' || "lname", "customer"."gender",
    "customer"."marital_status", "customer"."education",
    "customer"."yearly_income" order by "customer"."country" ASC,
    "customer"."state_province" ASC, "customer"."city" ASC, "fname" || ' ' ||
    "lname" ASC] did not occur

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySqlOrNot(B atchTestCase.java:427)

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySql(BatchT estCase.java:294)

    [java] at
    mondrian.rolap.NonEmptyTest.testConstrainedMeasure GetsOptimized(NonEmptyTest
    ..java:3795)

    [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)

    [java] at
    sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39
    )

    [java] at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl
    ..java:25)

    [java] at
    mondrian.test.MondrianTestRunner$2.run(MondrianTes tRunner.java:139)

    [java] at java.lang.Thread.run(Thread.java:619)



    Julian


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

  4. #4
    Guest

    Default RE: [Mondrian] NonEmptyTest.testConstrainedMeasureGetsOptimized

    I checked in changelist 13287 for Oracle on jdk 1.6.



    For the failure on 1.5, the order of the "and" conditions are different
    from 1.6, the sql would still produce the correct results though. Any
    hints on how I can make the test work with both?



    Kurt



    From: Julian Hyde [mailto:jhyde (AT) pentaho (DOT) com]
    Sent: Tuesday, January 05, 2010 1:35 PM
    To: Walker, Kurtis (Healthcare USA); mondrian (AT) pentaho (DOT) org;
    mkambol (AT) gmail (DOT) com
    Subject: RE: [Mondrian] NonEmptyTest.testConstrainedMeasureGetsOptimized



    Hudson runs against MySQL, not Oracle.



    Nothing special about the environment. It's JDK 1.6 linux, oracle-xe
    10.2. When I run it on JDK 1.5 I get 4 different failures in
    NonEmptyTest:



    [java] There were 4 failures:

    [java] 1)
    testNativeCrossjoinWillConstrainUsingArgsFromAllAx es(mondrian.rolap.NonE
    mptyTest)junit.framework.AssertionFailedError: expected query [select
    "time_by_day"."the_year" as "c0", "promotion"."promotion_name" as "c1"
    from "time_by_day" "time_by_day", "sales_fact_1997" "sales_fact_1997",
    "promotion" "promotion", "customer" "customer" where
    "sales_fact_1997"."time_id" = "time_by_day"."time_id" and
    "sales_fact_1997"."promotion_id" = "promotion"."promotion_id" and
    ("promotion"."promotion_name" in ('Bag Stuffers', 'Best Savings')) and
    "sales_fact_1997"."customer_id" = "customer"."customer_id" and
    ("customer"."gender" = 'F') and ("time_by_day"."the_year" = 1997) group
    by "time_by_day"."the_year", "promotion"."promotion_name" order by 1
    ASC, 2 ASC] did not occur

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySqlOrNot(B atchTestCase.java:427)

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySql(BatchT estCase.java:294)

    [java] at
    mondrian.rolap.NonEmptyTest.testNativeCrossjoinWil lConstrainUsingArgsFro
    mAllAxes(NonEmptyTest.java:3678)

    [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)

    [java] at
    sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.jav
    a:39)

    [java] at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessor
    Impl.java:25)

    [java] at
    mondrian.test.MondrianTestRunner$2.run(MondrianTes tRunner.java:139)

    [java] at java.lang.Thread.run(Thread.java:595)

    [java] 2)
    testNativeCrossjoinWillExpandFirstLastChild(mondri an.rolap.NonEmptyTest)
    junit.framework.AssertionFailedError: expected query [select
    "time_by_day"."the_year" as "c0", "promotion"."promotion_name" as "c1"
    from "time_by_day" "time_by_day", "sales_fact_1997" "sales_fact_1997",
    "promotion" "promotion", "customer" "customer" where
    "sales_fact_1997"."time_id" = "time_by_day"."time_id" and
    "sales_fact_1997"."promotion_id" = "promotion"."promotion_id" and
    "sales_fact_1997"."customer_id" = "customer"."customer_id" and
    ("customer"."gender" in ('F', 'M')) and ("promotion"."promotion_name" in
    ('Bag Stuffers', 'Best Savings')) and ("time_by_day"."the_year" = 1997)
    group by "time_by_day"."the_year", "promotion"."promotion_name" order by
    1 ASC, 2 ASC] did not occur

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySqlOrNot(B atchTestCase.java:427)

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySql(BatchT estCase.java:294)

    [java] at
    mondrian.rolap.NonEmptyTest.testNativeCrossjoinWil lExpandFirstLastChild(
    NonEmptyTest.java:3732)

    [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)

    [java] at
    sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.jav
    a:39)

    [java] at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessor
    Impl.java:25)

    [java] at
    mondrian.test.MondrianTestRunner$2.run(MondrianTes tRunner.java:139)

    [java] at java.lang.Thread.run(Thread.java:595)

    [java] 3)
    testNativeCrossjoinWillExpandLagInNamedSet(mondria n.rolap.NonEmptyTest)j
    unit.framework.AssertionFailedError: expected query [select
    "time_by_day"."the_year" as "c0", "promotion"."promotion_name" as "c1"
    from "time_by_day" "time_by_day", "sales_fact_1997" "sales_fact_1997",
    "promotion" "promotion", "customer" "customer" where
    "sales_fact_1997"."time_id" = "time_by_day"."time_id" and
    "sales_fact_1997"."promotion_id" = "promotion"."promotion_id" and
    "sales_fact_1997"."customer_id" = "customer"."customer_id" and
    ("customer"."gender" in ('F', 'M')) and ("promotion"."promotion_name" in
    ('Bag Stuffers', 'Best Savings')) and ("time_by_day"."the_year" = 1997)
    group by "time_by_day"."the_year", "promotion"."promotion_name" order by
    1 ASC, 2 ASC] did not occur

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySqlOrNot(B atchTestCase.java:427)

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySql(BatchT estCase.java:294)

    [java] at
    mondrian.rolap.NonEmptyTest.testNativeCrossjoinWil lExpandLagInNamedSet(N
    onEmptyTest.java:3756)

    [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)

    [java] at
    sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.jav
    a:39)

    [java] at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessor
    Impl.java:25)

    [java] at
    mondrian.test.MondrianTestRunner$2.run(MondrianTes tRunner.java:139)

    [java] at java.lang.Thread.run(Thread.java:595)

    [java] 4)
    testConstrainedMeasureGetsOptimized(mondrian.rolap .NonEmptyTest)junit.fr
    amework.AssertionFailedError: expected query [select
    "customer"."country" as "c0", "customer"."state_province" as "c1",
    "customer"."city" as "c2", "customer"."customer_id" as "c3", "fname" ||
    ' ' || "lname" as "c4", "fname" || ' ' || "lname" as "c5",
    "customer"."gender" as "c6", "customer"."marital_status" as "c7",
    "customer"."education" as "c8", "customer"."yearly_income" as "c9" from
    "customer" "customer", "sales_fact_1997" "sales_fact_1997" where
    "sales_fact_1997"."customer_id" = "customer"."customer_id" and
    ("customer"."gender" in ('M', 'F')) group by "customer"."country",
    "customer"."state_province", "customer"."city",
    "customer"."customer_id", "fname" || ' ' || "lname",
    "customer"."gender", "customer"."marital_status",
    "customer"."education", "customer"."yearly_income" order by
    "customer"."country" ASC, "customer"."state_province" ASC,
    "customer"."city" ASC, "fname" || ' ' || "lname" ASC] did not occur

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySqlOrNot(B atchTestCase.java:427)

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySql(BatchT estCase.java:294)

    [java] at
    mondrian.rolap.NonEmptyTest.testConstrainedMeasure GetsOptimized(NonEmpty
    Test.java:3795)

    [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)

    [java] at
    sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.jav
    a:39)

    [java] at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessor
    Impl.java:25)

    [java] at
    mondrian.test.MondrianTestRunner$2.run(MondrianTes tRunner.java:139)

    [java] at java.lang.Thread.run(Thread.java:595)



    Can you look into those failures also.

    I notice that ('F', 'M') occurs in some queries, ('M', 'F') in others.
    This is a hint that there is non-determinism in your code. Make sure you
    are not relying on iterator order of hashmaps or hashsets.



    Julian




    ________________________________

    From: Kurtis.Walker (AT) thomsonreuters (DOT) com
    [mailto:Kurtis.Walker (AT) thomsonreuters (DOT) com]
    Sent: Tuesday, January 05, 2010 9:59 AM
    To: jhyde (AT) pentaho (DOT) com; mondrian (AT) pentaho (DOT) org; mkambol (AT) gmail (DOT) com
    Subject: RE: [Mondrian]
    NonEmptyTest.testConstrainedMeasureGetsOptimized

    Julian,



    Our environment is Oracle and the test is passing. Is there
    anything else different about the environment where it fails? Also, we
    thought that the Hudson build ran against Oracle. The Hudson build is
    green right now, so are we incorrect that it runs against Oracle?



    Kurt



    From: mondrian-bounces (AT) pentaho (DOT) org
    [mailto:mondrian-bounces (AT) pentaho (DOT) org] On Behalf Of Julian Hyde
    Sent: Tuesday, January 05, 2010 12:41 PM
    To: 'Matt Campbell'
    Cc: 'Mondrian developer mailing list'
    Subject: [Mondrian]
    NonEmptyTest.testConstrainedMeasureGetsOptimized



    Matt,



    NonEmptyTest.testConstrainedMeasureGetsOptimized is failing on
    Oracle:

    [java] There was 1 failure:

    [java] 1)
    testConstrainedMeasureGetsOptimized(mondrian.rolap .NonEmptyTest)junit.fr
    amework.AssertionFailedError: expected query [select
    "customer"."country" as "c0", "customer"."state_province" as "c1",
    "customer"."city" as "c2", "customer"."customer_id" as "c3", "fname" ||
    ' ' || "lname" as "c4", "fname" || ' ' || "lname" as "c5",
    "customer"."gender" as "c6", "customer"."marital_status" as "c7",
    "customer"."education" as "c8", "customer"."yearly_income" as "c9" from
    "customer" "customer", "sales_fact_1997" "sales_fact_1997" where
    "sales_fact_1997"."customer_id" = "customer"."customer_id" and
    ("customer"."gender" in ('M', 'F')) group by "customer"."country",
    "customer"."state_province", "customer"."city",
    "customer"."customer_id", "fname" || ' ' || "lname",
    "customer"."gender", "customer"."marital_status",
    "customer"."education", "customer"."yearly_income" order by
    "customer"."country" ASC, "customer"."state_province" ASC,
    "customer"."city" ASC, "fname" || ' ' || "lname" ASC] did not occur

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySqlOrNot(B atchTestCase.java:427)

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySql(BatchT estCase.java:294)

    [java] at
    mondrian.rolap.NonEmptyTest.testConstrainedMeasure GetsOptimized(NonEmpty
    Test.java:3795)

    [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e
    Method)

    [java] at
    sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.jav
    a:39)

    [java] at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessor
    Impl.java:25)

    [java] at
    mondrian.test.MondrianTestRunner$2.run(MondrianTes tRunner.java:139)

    [java] at java.lang.Thread.run(Thread.java:619)



    Julian


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

  5. #5
    Julian Hyde Guest

    Default RE: [Mondrian] NonEmptyTest.testConstrainedMeasureGetsOptimized

    All SQL generation code must be deterministic. It's not practical to
    regression test mondrian if the SQL changes for reasons as spurious as a
    different JDK. As I said, look for code that depends on iterator order over
    hashmaps and hashsets.



    _____

    From: Kurtis.Walker (AT) thomsonreuters (DOT) com
    [mailto:Kurtis.Walker (AT) thomsonreuters (DOT) com]
    Sent: Wednesday, January 06, 2010 7:49 AM
    To: jhyde (AT) pentaho (DOT) com; mondrian (AT) pentaho (DOT) org; mkambol (AT) gmail (DOT) com
    Subject: RE: [Mondrian] NonEmptyTest.testConstrainedMeasureGetsOptimized



    I checked in changelist 13287 for Oracle on jdk 1.6.



    For the failure on 1.5, the order of the "and" conditions are different from
    1.6, the sql would still produce the correct results though. Any hints on
    how I can make the test work with both?



    Kurt



    From: Julian Hyde [mailto:jhyde (AT) pentaho (DOT) com]
    Sent: Tuesday, January 05, 2010 1:35 PM
    To: Walker, Kurtis (Healthcare USA); mondrian (AT) pentaho (DOT) org; mkambol (AT) gmail (DOT) com
    Subject: RE: [Mondrian] NonEmptyTest.testConstrainedMeasureGetsOptimized



    Hudson runs against MySQL, not Oracle.



    Nothing special about the environment. It's JDK 1.6 linux, oracle-xe 10.2.
    When I run it on JDK 1.5 I get 4 different failures in NonEmptyTest:



    [java] There were 4 failures:

    [java] 1)
    testNativeCrossjoinWillConstrainUsingArgsFromAllAx es(mondrian.rolap.NonEmpty
    Test)junit.framework.AssertionFailedError: expected query [select
    "time_by_day"."the_year" as "c0", "promotion"."promotion_name" as "c1" from
    "time_by_day" "time_by_day", "sales_fact_1997" "sales_fact_1997",
    "promotion" "promotion", "customer" "customer" where
    "sales_fact_1997"."time_id" = "time_by_day"."time_id" and
    "sales_fact_1997"."promotion_id" = "promotion"."promotion_id" and
    ("promotion"."promotion_name" in ('Bag Stuffers', 'Best Savings')) and
    "sales_fact_1997"."customer_id" = "customer"."customer_id" and
    ("customer"."gender" = 'F') and ("time_by_day"."the_year" = 1997) group by
    "time_by_day"."the_year", "promotion"."promotion_name" order by 1 ASC, 2
    ASC] did not occur

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySqlOrNot(B atchTestCase.java:427)

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySql(BatchT estCase.java:294)

    [java] at
    mondrian.rolap.NonEmptyTest.testNativeCrossjoinWil lConstrainUsingArgsFromAll
    Axes(NonEmptyTest.java:3678)

    [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)

    [java] at
    sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39
    )

    [java] at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl
    ..java:25)

    [java] at
    mondrian.test.MondrianTestRunner$2.run(MondrianTes tRunner.java:139)

    [java] at java.lang.Thread.run(Thread.java:595)

    [java] 2)
    testNativeCrossjoinWillExpandFirstLastChild(mondri an.rolap.NonEmptyTest)juni
    t.framework.AssertionFailedError: expected query [select
    "time_by_day"."the_year" as "c0", "promotion"."promotion_name" as "c1" from
    "time_by_day" "time_by_day", "sales_fact_1997" "sales_fact_1997",
    "promotion" "promotion", "customer" "customer" where
    "sales_fact_1997"."time_id" = "time_by_day"."time_id" and
    "sales_fact_1997"."promotion_id" = "promotion"."promotion_id" and
    "sales_fact_1997"."customer_id" = "customer"."customer_id" and
    ("customer"."gender" in ('F', 'M')) and ("promotion"."promotion_name" in
    ('Bag Stuffers', 'Best Savings')) and ("time_by_day"."the_year" = 1997)
    group by "time_by_day"."the_year", "promotion"."promotion_name" order by 1
    ASC, 2 ASC] did not occur

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySqlOrNot(B atchTestCase.java:427)

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySql(BatchT estCase.java:294)

    [java] at
    mondrian.rolap.NonEmptyTest.testNativeCrossjoinWil lExpandFirstLastChild(NonE
    mptyTest.java:3732)

    [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)

    [java] at
    sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39
    )

    [java] at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl
    ..java:25)

    [java] at
    mondrian.test.MondrianTestRunner$2.run(MondrianTes tRunner.java:139)

    [java] at java.lang.Thread.run(Thread.java:595)

    [java] 3)
    testNativeCrossjoinWillExpandLagInNamedSet(mondria n.rolap.NonEmptyTest)junit
    ..framework.AssertionFailedError: expected query [select
    "time_by_day"."the_year" as "c0", "promotion"."promotion_name" as "c1" from
    "time_by_day" "time_by_day", "sales_fact_1997" "sales_fact_1997",
    "promotion" "promotion", "customer" "customer" where
    "sales_fact_1997"."time_id" = "time_by_day"."time_id" and
    "sales_fact_1997"."promotion_id" = "promotion"."promotion_id" and
    "sales_fact_1997"."customer_id" = "customer"."customer_id" and
    ("customer"."gender" in ('F', 'M')) and ("promotion"."promotion_name" in
    ('Bag Stuffers', 'Best Savings')) and ("time_by_day"."the_year" = 1997)
    group by "time_by_day"."the_year", "promotion"."promotion_name" order by 1
    ASC, 2 ASC] did not occur

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySqlOrNot(B atchTestCase.java:427)

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySql(BatchT estCase.java:294)

    [java] at
    mondrian.rolap.NonEmptyTest.testNativeCrossjoinWil lExpandLagInNamedSet(NonEm
    ptyTest.java:3756)

    [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)

    [java] at
    sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39
    )

    [java] at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl
    ..java:25)

    [java] at
    mondrian.test.MondrianTestRunner$2.run(MondrianTes tRunner.java:139)

    [java] at java.lang.Thread.run(Thread.java:595)

    [java] 4)
    testConstrainedMeasureGetsOptimized(mondrian.rolap .NonEmptyTest)junit.framew
    ork.AssertionFailedError: expected query [select "customer"."country" as
    "c0", "customer"."state_province" as "c1", "customer"."city" as "c2",
    "customer"."customer_id" as "c3", "fname" || ' ' || "lname" as "c4", "fname"
    || ' ' || "lname" as "c5", "customer"."gender" as "c6",
    "customer"."marital_status" as "c7", "customer"."education" as "c8",
    "customer"."yearly_income" as "c9" from "customer" "customer",
    "sales_fact_1997" "sales_fact_1997" where "sales_fact_1997"."customer_id" =
    "customer"."customer_id" and ("customer"."gender" in ('M', 'F')) group by
    "customer"."country", "customer"."state_province", "customer"."city",
    "customer"."customer_id", "fname" || ' ' || "lname", "customer"."gender",
    "customer"."marital_status", "customer"."education",
    "customer"."yearly_income" order by "customer"."country" ASC,
    "customer"."state_province" ASC, "customer"."city" ASC, "fname" || ' ' ||
    "lname" ASC] did not occur

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySqlOrNot(B atchTestCase.java:427)

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySql(BatchT estCase.java:294)

    [java] at
    mondrian.rolap.NonEmptyTest.testConstrainedMeasure GetsOptimized(NonEmptyTest
    ..java:3795)

    [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)

    [java] at
    sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39
    )

    [java] at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl
    ..java:25)

    [java] at
    mondrian.test.MondrianTestRunner$2.run(MondrianTes tRunner.java:139)

    [java] at java.lang.Thread.run(Thread.java:595)



    Can you look into those failures also.

    I notice that ('F', 'M') occurs in some queries, ('M', 'F') in others. This
    is a hint that there is non-determinism in your code. Make sure you are not
    relying on iterator order of hashmaps or hashsets.



    Julian




    _____

    From: Kurtis.Walker (AT) thomsonreuters (DOT) com
    [mailto:Kurtis.Walker (AT) thomsonreuters (DOT) com]
    Sent: Tuesday, January 05, 2010 9:59 AM
    To: jhyde (AT) pentaho (DOT) com; mondrian (AT) pentaho (DOT) org; mkambol (AT) gmail (DOT) com
    Subject: RE: [Mondrian] NonEmptyTest.testConstrainedMeasureGetsOptimized

    Julian,



    Our environment is Oracle and the test is passing. Is there anything else
    different about the environment where it fails? Also, we thought that the
    Hudson build ran against Oracle. The Hudson build is green right now, so
    are we incorrect that it runs against Oracle?



    Kurt



    From: mondrian-bounces (AT) pentaho (DOT) org [mailto:mondrian-bounces (AT) pentaho (DOT) org] On
    Behalf Of Julian Hyde
    Sent: Tuesday, January 05, 2010 12:41 PM
    To: 'Matt Campbell'
    Cc: 'Mondrian developer mailing list'
    Subject: [Mondrian] NonEmptyTest.testConstrainedMeasureGetsOptimized



    Matt,



    NonEmptyTest.testConstrainedMeasureGetsOptimized is failing on Oracle:

    [java] There was 1 failure:

    [java] 1)
    testConstrainedMeasureGetsOptimized(mondrian.rolap .NonEmptyTest)junit.framew
    ork.AssertionFailedError: expected query [select "customer"."country" as
    "c0", "customer"."state_province" as "c1", "customer"."city" as "c2",
    "customer"."customer_id" as "c3", "fname" || ' ' || "lname" as "c4", "fname"
    || ' ' || "lname" as "c5", "customer"."gender" as "c6",
    "customer"."marital_status" as "c7", "customer"."education" as "c8",
    "customer"."yearly_income" as "c9" from "customer" "customer",
    "sales_fact_1997" "sales_fact_1997" where "sales_fact_1997"."customer_id" =
    "customer"."customer_id" and ("customer"."gender" in ('M', 'F')) group by
    "customer"."country", "customer"."state_province", "customer"."city",
    "customer"."customer_id", "fname" || ' ' || "lname", "customer"."gender",
    "customer"."marital_status", "customer"."education",
    "customer"."yearly_income" order by "customer"."country" ASC,
    "customer"."state_province" ASC, "customer"."city" ASC, "fname" || ' ' ||
    "lname" ASC] did not occur

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySqlOrNot(B atchTestCase.java:427)

    [java] at
    mondrian.rolap.BatchTestCase.assertQuerySql(BatchT estCase.java:294)

    [java] at
    mondrian.rolap.NonEmptyTest.testConstrainedMeasure GetsOptimized(NonEmptyTest
    ..java:3795)

    [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)

    [java] at
    sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39
    )

    [java] at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl
    ..java:25)

    [java] at
    mondrian.test.MondrianTestRunner$2.run(MondrianTes tRunner.java:139)

    [java] at java.lang.Thread.run(Thread.java:619)



    Julian


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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts