hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chaoyu Tang (JIRA)" <>
Subject [jira] [Commented] (HIVE-15410) WebHCat supports get/set table property with its name containing period and hyphen
Date Sat, 10 Dec 2016 20:28:58 GMT


Chaoyu Tang commented on HIVE-15410:

[~thejas] Thanks for reviewing the patch. Currently there are not restrictions to a Hive table
property name or its value. They can be any combination of the letters, digits and punctuations
etc, because they are quoted in a sql and not parsed by Hive sql parser. For example, a user
can set a table property with name as !\"#$%&\'()*+,-./:;<=>?@[\]^_`{|}~. using
alter table set tblproperties command, i.e. alter table sample set tblproperties ('!\"#$%&\'()*+,-./:;<=>?@[\]^_`{|}~'
= 'value');
But the table property name in WebHCat APIs are much more restricted and it is treated like
a DDL identifier without hyphen, period being allowed. This patch enables WebHCat APIs (get/set
property) to support some conventional property names (such as these with period, hyphen in
the middle of their names).
In the new patch, I made the PROPERTY_ID regex a little stricter by not allowing period, hyphen
in the end of a property name. I also added a unit test as suggested.
Please take a look and many thanks.

> WebHCat supports get/set table property with its name containing period and hyphen
> ----------------------------------------------------------------------------------
>                 Key: HIVE-15410
>                 URL:
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chaoyu Tang
>            Assignee: Chaoyu Tang
>            Priority: Minor
>         Attachments: HIVE-15410.1.patch, HIVE-15410.patch
> Hive table properties could have period (.) or hyphen (-) in their names, auto.purge
is one of the examples. But WebHCat APIs does not support either set or get these properties,
and they throw out the error msg ""Invalid DDL identifier :property". For example:
> {code}
> [root@ctang-1 ~]# curl -s ''
> {"error":"Invalid DDL identifier :property"}
> [root@ctang-1 ~]# curl -s -X PUT -HContent-type:application/json -d '{ "value": "true"
}' ''
> {"error":"Invalid DDL identifier :property"}
> {code}
> This patch is going to add the supports to the property name containing period and/or

This message was sent by Atlassian JIRA

View raw message