You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Michael Mior (JIRA)" <ji...@apache.org> on 2017/09/13 20:45:00 UTC

[jira] [Created] (CALCITE-1985) MongoDB integration test failures

Michael Mior created CALCITE-1985:
-------------------------------------

             Summary: MongoDB integration test failures
                 Key: CALCITE-1985
                 URL: https://issues.apache.org/jira/browse/CALCITE-1985
             Project: Calcite
          Issue Type: Bug
          Components: mongodb
    Affects Versions: 1.14.0
            Reporter: Michael Mior
            Assignee: Julian Hyde


Test output below. The failure of testProject looks acceptable, although it does seem better to project the constant after the sort. Not sure what's going on with testDistinctCount.

{noformat}
testProject(org.apache.calcite.test.MongoAdapterIT)  Time elapsed: 28.37 sec  <<< FAILURE!
org.junit.ComparisonFailure:
expected MongoDB query not found expected:<{$project: {[CITY: '$city', STATE: '$state'}}
{$sort: {STATE: 1, CITY: 1}}
{$project: {STATE: 1, CITY: 1, ZERO: {$literal: 0}]}}> but was:<{$project: {[STATE: '$state', CITY: '$city', ZERO: {$literal: 0}}}
{$sort: {STATE: 1, CITY: 1]}}>
        at org.junit.Assert.assertEquals(Assert.java:115)
        at org.apache.calcite.test.CalciteAssert.assertArrayEqual(CalciteAssert.java:850)
        at org.apache.calcite.test.MongoAdapterIT$1.apply(MongoAdapterIT.java:132)
        at org.apache.calcite.test.MongoAdapterIT$1.apply(MongoAdapterIT.java:126)
        at org.apache.calcite.test.CalciteAssert$AssertQuery.queryContains(CalciteAssert.java:1527)
        at org.apache.calcite.test.MongoAdapterIT.testProject(MongoAdapterIT.java:679)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:393)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

testDistinctCount(org.apache.calcite.test.MongoAdapterIT)  Time elapsed: 20.163 sec  <<< FAILURE!
org.junit.ComparisonFailure:
expected MongoDB query not found expected:<...', STATE: '$state'}}[
{$group: {_id: {CITY: '$CITY', STATE: '$STATE'}}}
{$project: {_id: 0, CITY: '$_id.CITY', STATE: '$_id.STATE'}}
{$group: {_id: '$STATE', CDC: {$sum: {$cond: [ {$eq: ['CITY', null]}, 0, 1]}}}}
{$project: {STATE: '$_id', CDC: '$CDC'}}
{$sort: {STATE: 1}}]> but was:<...', STATE: '$state'}}[]>
        at org.junit.Assert.assertEquals(Assert.java:115)
        at org.apache.calcite.test.CalciteAssert.assertArrayEqual(CalciteAssert.java:850)
        at org.apache.calcite.test.MongoAdapterIT$1.apply(MongoAdapterIT.java:132)
        at org.apache.calcite.test.MongoAdapterIT$1.apply(MongoAdapterIT.java:126)
        at org.apache.calcite.test.CalciteAssert$AssertQuery.queryContains(CalciteAssert.java:1527)
        at org.apache.calcite.test.MongoAdapterIT.testDistinctCount(MongoAdapterIT.java:625)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:393)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)


Results :

Failed tests:
  MongoAdapterIT.testDistinctCount:625 expected MongoDB query not found expected:<...', STATE: '$state'}}[
{$group: {_id: {CITY: '$CITY', STATE: '$STATE'}}}
{$project: {_id: 0, CITY: '$_id.CITY', STATE: '$_id.STATE'}}
{$group: {_id: '$STATE', CDC: {$sum: {$cond: [ {$eq: ['CITY', null]}, 0, 1]}}}}
{$project: {STATE: '$_id', CDC: '$CDC'}}
{$sort: {STATE: 1}}]> but was:<...', STATE: '$state'}}[]>
  MongoAdapterIT.testProject:679 expected MongoDB query not found expected:<{$project: {[CITY: '$city', STATE: '$state'}}
{$sort: {STATE: 1, CITY: 1}}
{$project: {STATE: 1, CITY: 1, ZERO: {$literal: 0}]}}> but was:<{$project: {[STATE: '$state', CITY: '$city', ZERO: {$literal: 0}}}
{$sort: {STATE: 1, CITY: 1]}}>

Tests run: 32, Failures: 2, Errors: 0, Skipped: 4
{noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)