Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-1831

LIKE operator not working with SQL [charlist] Wildcard

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • 1.2.0
    • Functions - Drill
    • None

    Description

      git.commit.id.abbrev=142e577

      Data :

      abc
      def
      acf
      fgh
      qjh
      

      The below query works fine

      0: jdbc:drill:schema=dfs.drillTestDir> select columns[0] from `data-shapes/temp.tbl` where columns[0] like '%b%';
      +------------+
      |   EXPR$0   |
      +------------+
      | abc        |
      +------------+
      1 row selected (0.122 seconds)
      

      However the below query does not return anything

      0: jdbc:drill:schema=dfs.drillTestDir> select columns[0] from `data-shapes/temp.tbl` where columns[0] like '[aq]%';
      +------------+
      |   EXPR$0   |
      +------------+
      +------------+
      No rows selected (0.139 seconds)
      

      The above query should return values which start with either 'a' or 'q'.

      Text Plan :

      00-00    Screen
      00-01      Project(EXPR$0=[$0])
      00-02        SelectionVectorRemover
      00-03          Filter(condition=[LIKE($0, '[aq]%')])
      00-04            Project(ITEM=[ITEM($0, 0)])
      00-05              Scan(groupscan=[EasyGroupScan [selectionRoot=/drill/testdata/data-shapes/temp.tbl, numFiles=1, columns=[`columns`[0]], files=[maprfs:/drill/testdata/data-shapes/temp.tbl]]])
      

      Let me know if you need anything else

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            rkins Rahul Kumar Challapalli
            rkins Rahul Kumar Challapalli
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment