drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-5743) Using order by clause in a select * query on hbase table returns only the row_key and order by field(s)
Date Fri, 06 Oct 2017 18:41:00 GMT

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

ASF GitHub Bot commented on DRILL-5743:
---------------------------------------

Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/975#discussion_r143265321
  
    --- Diff: contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseRecordReader.java
---
    @@ -109,11 +110,14 @@ public HBaseRecordReader(Connection connection, HBaseSubScan.HBaseSubScanSpec
su
             byte[] family = root.getPath().getBytes();
             transformed.add(SchemaPath.getSimplePath(root.getPath()));
             PathSegment child = root.getChild();
    -        if (child != null && child.isNamed()) {
    -          byte[] qualifier = child.getNameSegment().getPath().getBytes();
    -          hbaseScan.addColumn(family, qualifier);
    -        } else {
    -          hbaseScan.addFamily(family);
    +        if (!completeFamilies.contains(new String(family))) {
    +          if (child != null && child.isNamed()) {
    +            byte[] qualifier = child.getNameSegment().getPath().getBytes();
    --- End diff --
    
    This assumes UTF-8 encoding for the name. Can we be sure that HBase always uses UTF-8
for its encoding? Or, does HBase only support ASCII names so that we need only the ASCII subset
of UTF-8? What happens if the user puts a non-ASCII character into the name in this case?


> Using order by clause in a select * query on hbase table returns only the row_key and
order by field(s)
> -------------------------------------------------------------------------------------------------------
>
>                 Key: DRILL-5743
>                 URL: https://issues.apache.org/jira/browse/DRILL-5743
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - HBase
>    Affects Versions: 1.11.0
>            Reporter: Prasad Nagaraj Subramanya
>            Assignee: Prasad Nagaraj Subramanya
>
> 1) Consider a hbase table 'part' having column family 'data', which contains columns
related to tpch part table
> {code}
> select * from hbase.`part`;
> {code}
> Result
> {code}
> +-------------+--+
> | row_key | data |
> +-------------+--+
> | [B@381ea162 | {"p_brand":"QnJhbmQjNDU=","p_comment":"aW5hbCBkZXBvc2l0cy4gY2FyZWY=","p_container":"TEcgQk9Y","p_mfgr":"TWFudWZhY3R1cmVyIzQ=","p_name":"cG93ZGVyIGJyb3duIHNhbG1vbiBzZWFzaGVsbCBkaW0=","p_partkey":"OTk5OQ==","p_retailprice":"MTkwOC45OQ==","p_size":"OA==","p_type":"TEFSR0UgUE9MSVNIRUQgU1RFRUw="}
|
> {code}
> 3) Consider the following query -
> {code}
> select * from hbase.`part` as t order by t.data.p_name;
> {code}
> Expected
> The query should return row_key, and all the columns in 'data' column family ordered
by column 'data.p_name'
> Actual
> {code}
> +--------------+--------------------------------------------------------+
> |   row_key    |                          data                          |
> +--------------+--------------------------------------------------------+
> | [B@1bfcb7b6  | {"p_name":"eWVsbG93IHdoaXRlIHRhbiBraGFraSBzYWRkbGU="}  |
> +--------------+--------------------------------------------------------+
> {code}
> Result contains only the row_key and column data.p_name, order by data.p_name



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message