[
https://issues.apache.org/jira/browse/CALCITE-2115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17933182#comment-17933182
]
Chuxin Chen commented on CALCITE-2115:
--------------------------------------
- Since the implementation of group distinct is implemented through mongo API,
group, etc. are deleted in the statement.
- sales_fact_1997, sales_fact_1998 has been removed from the database. So can't
be found in schema. I think these test for sales_fact_1997, sales_fact_1998 can
be removed.
> Fix broken tests for mongodb adapter
> ------------------------------------
>
> Key: CALCITE-2115
> URL: https://issues.apache.org/jira/browse/CALCITE-2115
> Project: Calcite
> Issue Type: Bug
> Components: mongodb-adapter
> Reporter: Vladimir Dolzhenko
> Assignee: Chuxin Chen
> Priority: Major
> Labels: pull-request-available
>
> {code}
> Failed tests:
> MongoAdapterIT.testDistinctCount:686 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:738 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 in error:
> MongoAdapterIT.testAndLiteralPlan:440 » Runtime exception while executing
> [sel...
> Tests run: 34, Failures: 2, Errors: 1, Skipped: 4
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)