[
https://issues.apache.org/jira/browse/CALCITE-4965?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ZheHu resolved CALCITE-4965.
----------------------------
Resolution: Fixed
> 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
> Fix For: 1.30.0
>
> 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)