Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-4965

IS NOT NULL failed in Elasticsearch Adapter

    XMLWordPrintableJSON

Details

    Description

      Running the following test in BooleanLogicTest failed:

      @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("");
        }
      

      Exception message:

      PredicateAnalyzer$PredicateAnalyzerException: Unsupported expression: [org.apache.calcite.adapter.elasticsearch.PredicateAnalyzer$CastExpression@26545ea]
      

      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.

      Attachments

        Issue Links

          Activity

            People

              VAE ZheHu
              VAE ZheHu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h