XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.37.0
    • 1.39.0
    • arrow-adapter
    • None

    Description

      Currently, the Arrow adapter of Calcite does not support the like operator.
      For example

          String sql = "select \"intField\", \"stringField\"\n"
              + "from arrowdata\n"
              + "where \"stringField\" like '1%'";
          String plan = "PLAN=EnumerableCalc(expr#0..1=[{inputs}], expr#2=['1%'], expr#3=[LIKE($t1, $t2)], proj#0..1=[{exprs}], $condition=[$t3])\n"
              + "  ArrowToEnumerableConverter\n"
              + "    ArrowProject(intField=[$0], stringField=[$1])\n"
              + "      ArrowTableScan(table=[[ARROW, ARROWDATA]], fields=[[0, 1, 2, 3]])\n\n";
      

      After support, it is as follows

        @Test void testArrowProjectFieldsWithLike() {
          String sql = "select \"intField\", \"stringField\"\n"
              + "from arrowdata\n"
              + "where \"stringField\" like '1%'";
          String plan = "PLAN=ArrowToEnumerableConverter\n"
              + "  ArrowProject(intField=[$0], stringField=[$1])\n"
              + "    ArrowFilter(condition=[LIKE($1, '1%')])\n"
              + "      ArrowTableScan(table=[[ARROW, ARROWDATA]], fields=[[0, 1, 2, 3]])\n\n";
        }
      

      Attachments

        Activity

          People

            caicancai Caican Cai
            caicancai Caican Cai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: