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)

Reply via email to