Apache Drill
  1. Apache Drill
  2. DRILL-444

Using [NOT] LIKE, [NOT] SIMILAR in a query throws errors

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.4.0
    • Component/s: None
    • Labels:
      None

      Description

      select * from INFORMATION_SCHEMA.`TABLES` WHERE TABLE_NAME LIKE '%IE%';
      

      throws exception:

      Exception in thread "WorkManager-4" java.lang.AssertionError: todo: implement syntax SPECIAL(LIKE($2, '%IE%'))
      	at org.apache.drill.exec.planner.logialc.DrillOptiq$RexToDrill.visitCall(DrillOptiq.java:126)
      	at org.apache.drill.exec.planner.logical.DrillOptiq$RexToDrill.visitCall(DrillOptiq.java:67)
      	at org.eigenbase.rex.RexCall.accept(RexCall.java:106)
      	at org.apache.drill.exec.planner.logical.DrillOptiq.toDrill(DrillOptiq.java:64)
      	at org.apache.drill.exec.planner.logical.DrillFilterRel.implement(DrillFilterRel.java:56)
      	at org.apache.drill.exec.planner.logical.DrillImplementor.visitChild(DrillImplementor.java:75)
      	at org.apache.drill.exec.planner.logical.DrillProjectRel.implement(DrillProjectRel.java:77)
      	at org.apache.drill.exec.planner.logical.DrillImplementor.visitChild(DrillImplementor.java:75)
      	at org.apache.drill.exec.planner.logical.DrillScreenRel.implement(DrillScreenRel.java:72)
      	at org.apache.drill.exec.planner.logical.DrillImplementor.go(DrillImplementor.java:62)
      	at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:81)
      	at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:350)
      	at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:175)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:744)
      

      When converting RexCall to Logical plan (RexToDrill.visitCall()), Drill doesn't handle NOT, LIKE and SIMILAR function calls.

        Activity

        Hide
        ASF GitHub Bot added a comment -

        Github user vkorukanti closed the pull request at:

        https://github.com/apache/incubator-drill/pull/34

        Show
        ASF GitHub Bot added a comment - Github user vkorukanti closed the pull request at: https://github.com/apache/incubator-drill/pull/34
        Hide
        ASF GitHub Bot added a comment -

        Github user vkorukanti commented on the pull request:

        https://github.com/apache/incubator-drill/pull/34#issuecomment-40963795

        merged as 7dc3f724000947abf0618c8e13e8903fef3ac967

        Show
        ASF GitHub Bot added a comment - Github user vkorukanti commented on the pull request: https://github.com/apache/incubator-drill/pull/34#issuecomment-40963795 merged as 7dc3f724000947abf0618c8e13e8903fef3ac967
        Hide
        Jacques Nadeau added a comment -

        Fixed in 7dc3f72

        Show
        Jacques Nadeau added a comment - Fixed in 7dc3f72
        Hide
        ASF GitHub Bot added a comment -

        GitHub user vkorukanti opened a pull request:

        https://github.com/apache/incubator-drill/pull/34

        DRILL-444: Support using (NOT) LIKE and (NOT) SIMILAR TO in SQL queries

        Adds support for LIKE and SIMILAR TO. There are more that needs to be supported in Optiq to Drill conversion (tracking JIRAs DRILL-437 and DRILL-439)

        You can merge this pull request into a Git repository by running:

        $ git pull https://github.com/vkorukanti/incubator-drill DRILL-444

        Alternatively you can review and apply these changes as the patch at:

        https://github.com/apache/incubator-drill/pull/34.patch

        To close this pull request, make a commit to your master/trunk branch
        with (at least) the following in the commit message:

        This closes #34


        commit 1687694edc0d6c1729b2401b82ff9a1ff5942efb
        Author: vkorukanti <venki.korukanti@gmail.com>
        Date: 2014-03-25T20:04:39Z

        DRILL-444: Support using (NOT) LIKE and (NOT) SIMILAR TO in SQL queries


        Show
        ASF GitHub Bot added a comment - GitHub user vkorukanti opened a pull request: https://github.com/apache/incubator-drill/pull/34 DRILL-444 : Support using (NOT) LIKE and (NOT) SIMILAR TO in SQL queries Adds support for LIKE and SIMILAR TO. There are more that needs to be supported in Optiq to Drill conversion (tracking JIRAs DRILL-437 and DRILL-439 ) You can merge this pull request into a Git repository by running: $ git pull https://github.com/vkorukanti/incubator-drill DRILL-444 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-drill/pull/34.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #34 commit 1687694edc0d6c1729b2401b82ff9a1ff5942efb Author: vkorukanti <venki.korukanti@gmail.com> Date: 2014-03-25T20:04:39Z DRILL-444 : Support using (NOT) LIKE and (NOT) SIMILAR TO in SQL queries

          People

          • Assignee:
            Venki Korukanti
            Reporter:
            Venki Korukanti
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development