You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Davide Gesino (JIRA)" <ji...@apache.org> on 2017/02/07 10:38:41 UTC
[jira] [Updated] (HIVE-15838) Escaping illegal characters allowed
in HBase and disallowed in Hive DDL
[ https://issues.apache.org/jira/browse/HIVE-15838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Davide Gesino updated HIVE-15838:
---------------------------------
Description:
In HBase it's possible to have table names such as:
cf:one, cf:two , cf:three#i
when creating an Hive table from HBase, such as:
CREATE TABLE MyTable (key int, one string, two int, three int)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES (
"hbase.columns.mapping" = ":key,cf:one#s,cf:two,cf:three#i",
"hbase.table.default.storage.type" = "binary"
);
it fails, because '#s' and '#b' are reserved keywords to specify storage type in Hive, and in this case '#i' confuses the DDL.
Anyway the '#' it's an allowed column name in HBase, and it would be possible to escape it without confusing the Hive DDL.
was:
In HBase it's possible to have table names such as:
cf:one, cf:two , cf:three#i
when creating an Hive table from HBase, such as:
CREATE TABLE MyTable (key string, one string, two int, three int)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES (
"hbase.columns.mapping" = ":key,cf:one,cf:two,cf:three#i"
);
it fails, because '#s' and '#b' are reserved keywords to specify storage type in Hive, and in this case '#i' confuses the DDL.
Anyway the '#' it's an allowed column name in HBase, and it would be possible to escape it without confusing the Hive DDL.
> Escaping illegal characters allowed in HBase and disallowed in Hive DDL
> -----------------------------------------------------------------------
>
> Key: HIVE-15838
> URL: https://issues.apache.org/jira/browse/HIVE-15838
> Project: Hive
> Issue Type: Bug
> Components: Database/Schema
> Affects Versions: 2.1.1
> Reporter: Davide Gesino
> Priority: Minor
>
> In HBase it's possible to have table names such as:
> cf:one, cf:two , cf:three#i
> when creating an Hive table from HBase, such as:
> CREATE TABLE MyTable (key int, one string, two int, three int)
> STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
> WITH SERDEPROPERTIES (
> "hbase.columns.mapping" = ":key,cf:one#s,cf:two,cf:three#i",
> "hbase.table.default.storage.type" = "binary"
> );
> it fails, because '#s' and '#b' are reserved keywords to specify storage type in Hive, and in this case '#i' confuses the DDL.
> Anyway the '#' it's an allowed column name in HBase, and it would be possible to escape it without confusing the Hive DDL.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)