You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Steve Yeom (JIRA)" <ji...@apache.org> on 2017/10/11 20:38:01 UTC

[jira] [Comment Edited] (HIVE-17391) Compaction fails if there is an empty value in tblproperties

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

Steve Yeom edited comment on HIVE-17391 at 10/11/17 8:37 PM:
-------------------------------------------------------------

Talked with Ashutosh regarding this jira. Got great inputs.

I think we can differentiate the following cases in StringableMap.java's methods. 
Specifically its toString() and its constructors when it loops on Map.Entry's to process each entry. 
1. key is not null nor empty string, value is null.
2. key is not null nor empty string, value is empty string.

Another factor is Properties which is inherited from Hashtable<K, V> which does not allow null key nor value (vs StringableMap which is inherited from HashMap<K, V>).
So when StringableMap is converting itself to Properties object, we gets to the NullPointerException problem
of this jira simply Hashtable is supposed to throw a NullPointerException when a caller tries to add 
null key/value. 


was (Author: steveyeom2017):
Talked with Ashutosh regarding this jira.

I think we can differentiate the following cases in StringableMap.java's methods. 
Specifically its toString() and its constructors when it loops on Map.Entry's to process each entry. 
1. key is not null nor empty string, value is null.
2. key is not null nor empty string, value is empty string.

Another factor is Properties which is inherited from Hashtable<K, V> which does not allow null key nor value.
So when StringableMap is converting itself to Properties object, we gets to the NullPointerException problem
of this jira simply Hashtable is supposed to throw a NullPointerException when a caller tries to add 
null key/value. 

> Compaction fails if there is an empty value in tblproperties
> ------------------------------------------------------------
>
>                 Key: HIVE-17391
>                 URL: https://issues.apache.org/jira/browse/HIVE-17391
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore, Transactions
>    Affects Versions: 2.2.0, 2.3.0
>            Reporter: Ashutosh Chauhan
>            Assignee: Steve Yeom
>         Attachments: HIVE-17391.01.patch
>
>
> create table t1 (a int) tblproperties ('serialization.null.format'='');
> alter table t1 compact 'major';
> fails



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