You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Andrei Sereda (Jira)" <ji...@apache.org> on 2022/01/17 19:49:00 UTC

[jira] [Comment Edited] (CALCITE-4965) IS NOT NULL failed in Elasticsearch Adapter

    [ https://issues.apache.org/jira/browse/CALCITE-4965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17477383#comment-17477383 ] 

Andrei Sereda edited comment on CALCITE-4965 at 1/17/22, 7:48 PM:
------------------------------------------------------------------

Fixed in [ad5cbdbe27e1|https://github.com/apache/calcite/commit/ad5cbdbe27e18a779372785c1af3a3baa80c52a6]


was (Author: asereda):
Fixed in [ad5cbdbe27e1|[https://github.com/apache/calcite/commit/ad5cbdbe27e18a779372785c1af3a3baa80c52a6]]

> IS NOT NULL failed in Elasticsearch Adapter
> -------------------------------------------
>
>                 Key: CALCITE-4965
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4965
>             Project: Calcite
>          Issue Type: Bug
>          Components: elasticsearch-adapter
>    Affects Versions: 1.28.0
>            Reporter: ZheHu
>            Assignee: ZheHu
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Running the following test in BooleanLogicTest failed:
> {code:java}
> @Test void testIsNotNull() {
>     CalciteAssert.that()
>         .with(newConnectionFactory())
>         // "where num is not null" also failed
>         .query("select * from view where num > 42 or num < 42 or num = 42")
>         .returns("");
>   }
> {code}
> Exception message:
> {code:java}
> PredicateAnalyzer$PredicateAnalyzerException: Unsupported expression: [org.apache.calcite.adapter.elasticsearch.PredicateAnalyzer$CastExpression@26545ea]
> {code}
> The filter condition in query "num > 42 or num < 42 or num = 42" is optimized to "IS NOT NULL(CAST(ITEM($0, 'int')):INTEGER)". However, converting the optimized RexNode to Elasticsearch query filter failed.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)