You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "BELUGA BEHR (JIRA)" <ji...@apache.org> on 2017/10/24 18:44:01 UTC
[jira] [Updated] (HIVE-16970) General Improvements To
org.apache.hadoop.hive.metastore.cache.CacheUtils
[ https://issues.apache.org/jira/browse/HIVE-16970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
BELUGA BEHR updated HIVE-16970:
-------------------------------
Attachment: HIVE-16970.2.patch
> General Improvements To org.apache.hadoop.hive.metastore.cache.CacheUtils
> -------------------------------------------------------------------------
>
> Key: HIVE-16970
> URL: https://issues.apache.org/jira/browse/HIVE-16970
> Project: Hive
> Issue Type: Improvement
> Components: Metastore
> Affects Versions: 3.0.0
> Reporter: BELUGA BEHR
> Assignee: BELUGA BEHR
> Priority: Trivial
> Attachments: HIVE-16970.1.patch, HIVE-16970.2.patch
>
>
> # Simplify
> # Do not initiate empty collections
> # Parsing is incorrect:
> {code:title=org.apache.hadoop.hive.metastore.cache.CacheUtils}
> public static String buildKey(String dbName, String tableName, List<String> partVals) {
> String key = buildKey(dbName, tableName);
> if (partVals == null || partVals.size() == 0) {
> return key;
> }
> // missing a delimiter between the "tableName" and the first "partVal"
> for (int i = 0; i < partVals.size(); i++) {
> key += partVals.get(i);
> if (i != partVals.size() - 1) {
> key += delimit;
> }
> }
> return key;
> }
> public static Object[] splitPartitionColStats(String key) {
> // ...
> }
> {code}
> The result of passing the key to the "split" method is:
> {code}
> buildKey("db","Table",["Part1","Part2","Part3"], "col");
> [db, tablePart1, [Part2, Part3], col]
> // "table" and "Part1" is mistakenly concatenated
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)