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

David Chen commented on HIVE-5976:
----------------------------------

[~brocknoland] I realized that the reason why the alter table tests are now 
passing and a number of the create table tests are now failing is that the 
create table and alter table codepaths do things differently in terms of 
setting the SerDe for text and sequencefile. The create table codepath does not 
set the SerDe for these two storage formats (see BaseSemanticAnalyzer. 
StorageFormat.fillStorageFormat()).

However, the alter table codepath, in fact, does (see 
DDLSemanticAnalyze.analyzeAlterTableFileFormat()) and sets them to 
LazySimpleSerDe. However, now that both code paths go through the new 
StorageFormat class, not setting the SerDe to LazySimpleSerDe for text and 
sequencefile causes alter table fileformat to fail because the SerDe remains 
unchanged -- which is clearly incorrect -- but setting the SerDe to 
LazySimpleSerDe causes the create table tests to fail because now we have one 
extra line in the output because the SerDe is now being set.

It seems to me that the create table codepath should also set the SerDe to 
LazySimpleSerDe for text and sequencefile. Is there a reason why it is 
currently not doing so?

> Decouple input formats from STORED as keywords
> ----------------------------------------------
>
>                 Key: HIVE-5976
>                 URL: https://issues.apache.org/jira/browse/HIVE-5976
>             Project: Hive
>          Issue Type: Task
>            Reporter: Brock Noland
>            Assignee: Brock Noland
>         Attachments: HIVE-5976.2.patch, HIVE-5976.3.patch, HIVE-5976.3.patch, 
> HIVE-5976.4.patch, HIVE-5976.5.patch, HIVE-5976.6.patch, HIVE-5976.patch, 
> HIVE-5976.patch, HIVE-5976.patch, HIVE-5976.patch
>
>
> As noted in HIVE-5783, we hard code the input formats mapped to keywords. 
> It'd be nice if there was a registration system so we didn't need to do that.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to