You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Parth Chandra (JIRA)" <ji...@apache.org> on 2015/04/07 07:30:12 UTC

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

     [ https://issues.apache.org/jira/browse/DRILL-1831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Parth Chandra updated DRILL-1831:
---------------------------------
    Fix Version/s:     (was: 0.9.0)
                   1.0.0

> 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: Functions - Drill
>            Reporter: Rahul Challapalli
>            Assignee: Rahul Challapalli
>             Fix For: 1.0.0
>
>
> 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)