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

Shengsheng Huang commented on HIVE-3229:
----------------------------------------

Do you mean you want the empty strings in column C2 to be loaded as nulls? 
Actually Hive interprets "\N" instead of empty string as null string. So you 
should write a literal \N in the columns to represent a null string. You could 
override the default null string value "\N" with ROW FORMAT ....       
                
> null values being loaded as non-null values into Hive
> -----------------------------------------------------
>
>                 Key: HIVE-3229
>                 URL: https://issues.apache.org/jira/browse/HIVE-3229
>             Project: Hive
>          Issue Type: Bug
>            Reporter: N Campbell
>         Attachments: CERT.TSET1.txt
>
>
> various tab delimited input files contain one or more columns that represent 
> null values in rows. the data appears to load (without an error such as in 
> JIRA 3228) however the resulting values are now non-null values which is 
> incorrect.
> create table if not exists CERT.TSET1_E ( RNUM int , C1 int, C2 string)
> row format delimited
> fields terminated by '\t'
> stored as textfile;
> create table if not exists CERT.TSET1 ( RNUM int , C1 int, C2 string)
> stored as sequencefile;
> load data local inpath '....CERT.TSET1.txt'
> overwrite into table CERT.TSET1_E;
> insert overwrite table CERT.TSET1  select * from CERT.TSET1_E;

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to