[
https://issues.apache.org/jira/browse/CALCITE-7406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18055857#comment-18055857
]
Yu Xu commented on CALCITE-7406:
--------------------------------
Fixed in
[383315b|https://github.com/apache/calcite/commit/383315bf50b013d92c6787882b9681c430aefc49]
Thank you for the contribution [~terran2010]
Thank you for the review [~mbudiu]
> Add abs function (enabled in Mongodb library)
> ---------------------------------------------
>
> Key: CALCITE-7406
> URL: https://issues.apache.org/jira/browse/CALCITE-7406
> Project: Calcite
> Issue Type: New Feature
> Components: mongodb-adapter
> Affects Versions: 1.41.0
> Reporter: terran2010
> Priority: Major
> Labels: pull-request-available
>
> The SQL:
> {code:java}
> select abs(pop) from zips {code}
> Currently reporting errors:
> {code:java}
> Caused by: java.lang.IllegalStateException: Unable to implement
> MongoToEnumerableConverter: rowcount = 100.0, cumulative cost = {30.0 rows,
> 30.1 cpu, 0.0 io}, id = 39
> MongoProject(EXPR$0=[ABS(CAST(ITEM($0, 'pop')):INTEGER)]): rowcount =
> 100.0, cumulative cost = {20.0 rows, 20.1 cpu, 0.0 io}, id = 37
> MongoTableScan(table=[[mongo_raw, zips]]): rowcount = 100.0, cumulative
> cost = {10.0 rows, 10.100000000000001 cpu, 0.0 io}, id = 13 {code}
> We can consider increasing support for the ABS function
--
This message was sent by Atlassian Jira
(v8.20.10#820010)