You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Rahul Challapalli (JIRA)" <ji...@apache.org> on 2014/12/09 18:39:12 UTC

[jira] [Created] (DRILL-1831) LIKE operator not working with SQL [charlist] Wildcard

Rahul Challapalli created DRILL-1831:
----------------------------------------

             Summary: LIKE operator not working with SQL [charlist] Wildcard
                 Key: DRILL-1831
                 URL: https://issues.apache.org/jira/browse/DRILL-1831
             Project: Apache Drill
          Issue Type: Bug
          Components: Execution - Operators
            Reporter: Rahul Challapalli


git.commit.id.abbrev=142e577

Data :
{code}
abc
def
acf
fgh
qjh
{code}

The below query works fine
{code}
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)
{code}

However the below query does not return anything
{code}
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)
{code}

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

Text Plan :
{code}
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]]])
{code}

Let me know if you need anything else



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)