Oliver Meyn created HIVE-2987:
---------------------------------

             Summary: SELECTing nulls returns nothing
                 Key: HIVE-2987
                 URL: https://issues.apache.org/jira/browse/HIVE-2987
             Project: Hive
          Issue Type: Bug
    Affects Versions: 0.9.0
         Environment: Tested using 0.9.0rc1, hbase 0.92.1, hadoop 0.20.2-cdh3u2
            Reporter: Oliver Meyn
            Priority: Critical


Given an hbase table defined as 'test' with a single column family 'a', rowkey 
of type string, and two "rows" as follows:

key:1,a:lat=60.0,a:long=50.0,a:precision=10
key:2,a:lat=54

And an hive table created overtop of it as follows:
CREATE EXTERNAL TABLE hbase_test (
  id STRING,
  latitude STRING,
  longitude STRING,
  precision STRING
)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = 
":key#s,a:lat#s,a:long#s,a:precision#s")
TBLPROPERTIES(
  "hbase.table.name" = "test",
  "hbase.table.default.storage.type" = "binary"
);

The query SELECT id, precision FROM hbase_test WHERE id = '2' returns no 
result.  Expected behaviour is to return:
'2',NULL

If the query is changed to include a non-null result, eg SELECT id, latitude, 
precision FROM hbase_test WHERE id = '2' the result is as expected:
'2','54',NULL

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to