You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Khurram Faraaz (JIRA)" <ji...@apache.org> on 2015/10/02 20:18:26 UTC

[jira] [Commented] (DRILL-3886) Range query over HBase table from Drill returns no results

    [ https://issues.apache.org/jira/browse/DRILL-3886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14941521#comment-14941521 ] 

Khurram Faraaz commented on DRILL-3886:
---------------------------------------

Data inserted into HBase table was in ASCENDING order,
org.apache.hadoop.hbase.util.OrderedBytes.encodeInt32(br, arr[i],
                org.apache.hadoop.hbase.util.Order.ASCENDING);

Query from Drill was trying to get data in DESCENDING order by specifying INT_OBD, and hence there were no results returned. Changing the encoding to INT_OB query returned correct results.



> Range query over HBase table from Drill returns no results
> ----------------------------------------------------------
>
>                 Key: DRILL-3886
>                 URL: https://issues.apache.org/jira/browse/DRILL-3886
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Flow
>    Affects Versions: 1.2.0
>         Environment: 4 node cluster CentOS
>            Reporter: Khurram Faraaz
>            Assignee: Smidth Panchamia
>
> Range query over HBase table from Drill returns no results. Note that the filter is pushed down to the Scan, however query does not return any results. Drill master commit ID: b9afcf8f
> case 1) without cast and without quotes around integer value
> {code}
> 0: jdbc:drill:schema=dfs.tmp> explain plan for select convert_from(row_key,'INT_OBD') as rk from int_Tbl WHERE convert_from(row_key,'INT_OBD') > -536870912 AND convert_from(row_key,'INT_OBD') < 536870911;
> +------+------+
> | text | json |
> +------+------+
> | 00-00    Screen
> 00-01      Project(rk=[CONVERT_FROMINT_OBD($0)])
> 00-02        Scan(groupscan=[HBaseGroupScan [HBaseScanSpec=HBaseScanSpec [tableName=int_Tbl, startRow=\xD4`\x00\x00\x00\x00, stopRow=\xD4\x9F\xFF\xFF\xFF, filter=FilterList AND (2/2): [RowFilter (LESS, \xD4\x9F\xFF\xFF\xFF), RowFilter (GREATER, \xD4`\x00\x00\x00)]], columns=[`row_key`]]])
> 0: jdbc:drill:schema=dfs.tmp> select convert_from(row_key,'INT_OBD') as rk from int_Tbl WHERE convert_from(row_key,'INT_OBD') > -536870912 AND convert_from(row_key,'INT_OBD') < 536870911;
> +--+
> |  |
> +--+
> +--+
> No rows selected (0.869 seconds)
> {code}
> case 2) with cast and without quotes around integer value
> {code}
> 0: jdbc:drill:schema=dfs.tmp> select convert_from(row_key,'INT_OBD') as rk from int_Tbl WHERE convert_from(row_key,'INT_OBD') > cast(-536870912 as int) AND convert_from(row_key,'INT_OBD') < cast(536870911 as int);
> +--+
> |  |
> +--+
> +--+
> No rows selected (0.905 seconds)
> 0: jdbc:drill:schema=dfs.tmp> explain plan for select convert_from(row_key,'INT_OBD') as rk from int_Tbl WHERE convert_from(row_key,'INT_OBD') > cast(-536870912 as int) AND convert_from(row_key,'INT_OBD') < cast(536870911 as int);
> +------+------+
> | text | json |
> +------+------+
> | 00-00    Screen
> 00-01      Project(rk=[CONVERT_FROMINT_OBD($0)])
> 00-02        Scan(groupscan=[HBaseGroupScan [HBaseScanSpec=HBaseScanSpec [tableName=int_Tbl, startRow=\xD4`\x00\x00\x00\x00, stopRow=\xD4\x9F\xFF\xFF\xFF, filter=FilterList AND (2/2): [RowFilter (LESS, \xD4\x9F\xFF\xFF\xFF), RowFilter (GREATER, \xD4`\x00\x00\x00)]], columns=[`row_key`]]])
> {code}



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