You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "ZheHu (Jira)" <ji...@apache.org> on 2021/12/24 14:13:00 UTC

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

ZheHu created CALCITE-4965:
------------------------------

             Summary: 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


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)