[jira] [Commented] (HIVE-6431) Hive table name start with underscore (_)

2017-08-09 Thread Christopher (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-6431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16120628#comment-16120628
 ] 

Christopher commented on HIVE-6431:
---

Why on earth are _filenames prohibited??

> Hive table name start with underscore (_)
> -
>
> Key: HIVE-6431
> URL: https://issues.apache.org/jira/browse/HIVE-6431
> Project: Hive
>  Issue Type: Bug
>  Components: Database/Schema
>Affects Versions: 0.12.0
>Reporter: Kuek Chiew Yea
>
> When I create a hive table with table name start with underscore, I am able 
> to create successfully. The command that I am using is as the following:
> *CREATE TABLE `_testtable` AS SELECT * FROM `dimdate`;*
> Once created, I issue a command (as following) to query all records from that 
> table.
> *SELECT * FROM `_testtable`;*
> However, I got the error as the following:
> *Failed with exception 
> java.io.IOException:org.apache.hadoop.mapred.InvalidInputException: Input 
> path does not exist: hdfs://sandbox:8020/apps/hive/warehouse/_testtable*
> When I run the hdfs command to list the file in directory 
> */apps/hive/warehouse/_testtable*, I am able to get list of files in that 
> directory.



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


[jira] [Commented] (HIVE-8871) Hive Hbase Integration : Support for NULL value columns

2017-03-03 Thread Christopher (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-8871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15895005#comment-15895005
 ] 

Christopher commented on HIVE-8871:
---

A concern that I have is that currently in order to perform an update in a hive 
table, one uses NULLs as place holders.  Those NULLs are ignored if it is a 
preexisting record.

CREATE TABLE hbase_table_emp(id int, name string, role string)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf1:name,cf1:role")
TBLPROPERTIES ("hbase.table.name" = "emp");
insert into hbase_table_emp select 1,'bob', 'admin';
insert into hbase_table_emp select 2,'bobby', 'user';
select * from  hbase_table_emp;
insert into hbase_table_emp select 1,null, 'superadmin';

See "bob" remains as "bob"...


> Hive Hbase Integration : Support for NULL value  columns
> 
>
> Key: HIVE-8871
> URL: https://issues.apache.org/jira/browse/HIVE-8871
> Project: Hive
>  Issue Type: Bug
>  Components: HBase Handler
>Affects Versions: 0.10.0
>Reporter: Jasper Knulst
>  Labels: features
>
> If you map a Hive column to a Hbase CF where the CF only has qualifiers but 
> no values, Hive always outputs ' {} ' for that key. This hides the fact that 
> qualifiers do exist within the CF. As soon as you put a single byte (like a 
> space) as value you'll get a return like this ' {"20140911"," "} in Hive.
> Since it is a common data modelling technique in Hbase to not use the value 
> (and essentially use the qualifier in a CF as value holder) I think it would 
> be worthwhile to have some support for this in the Hbase handler. 
> A solution could be to show a data structure like  CF:qualifier: like 
> this: {"20140911",""}
> , where '20140911' is the qualifier and NULL value in Hbase are shown as 
> empty json strings.
> CREATE EXTERNAL TABLE hb_test (
>   userhash string,
>   count bigint,
>   dates map)
> STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
> WITH SERDEPROPERTIES (
>   "hbase.columns.mapping" =
>   ":key,SUM:COUNT,DATES:",
> "hbase.table.default.storage.type" = "binary"
> )
> TBLPROPERTIES("hbase.table.name" = "test");



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)