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

Mehant Baid updated DRILL-1039:
-------------------------------

    Attachment: DRILL-1039.patch

Problem was FilterRecordBatch was filtering out all the records in the first 
batch, so RemovingRecordBatch was not copying any records in its output 
container. The output container had an incomplete schema (only the top level 
Map vector was copied and not the primitive vectors underneath it). When filter 
did receive a batch where not all records where filtered out, and added the 
primitive vectors to the Map vector in its output container, Project had no way 
to detect the schema change which was causing problems and output NULLS for all 
the columns in the Map.

Fix is to preserve the schema in RemovingRecordBatch even if no records are 
copied.  

> Queries against hbase table with multiple regions return null 
> --------------------------------------------------------------
>
>                 Key: DRILL-1039
>                 URL: https://issues.apache.org/jira/browse/DRILL-1039
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - HBase
>         Environment: 
>            Reporter: Krystal
>            Assignee: Mehant Baid
>             Fix For: 0.5.0
>
>         Attachments: DRILL-1039.patch, votertab
>
>
> git.commit.id.abbrev=894037a
> This is a regression. Ran the following query in sqlline:
> 0: jdbc:drill:schema=dfs> select cast(row_key as integer) voter_id, 
> cast(onecf['name'] as varchar(30)) name, cast(twocf['age'] as integer) age, 
> cast(twocf['registration'] as varchar(20)) registration, 
> cast(threecf['contributions'] as decimal(6,2)) contributions, 
> cast(threecf['voterzone'] as integer) voterzone,cast(fourcf['create_date'] as 
> timestamp) create_date from hbase.voter where row_key = 5;
> +------------+------------+------------+--------------+---------------+------------+-------------+
> |  voter_id  |    name    |    age     | registration | contributions | 
> voterzone  | create_date |
> +------------+------------+------------+--------------+---------------+------------+-------------+
> | 5          | null       | null       | null         | null          | null  
>      | 1970-01-01 00:00:00.0 |
> +------------+------------+------------+--------------+---------------+------------+-------------+
> The same query returns expected data against an hbase table that resides in 
> single partition. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to