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

Andrew Sherman commented on HIVE-18367:
---------------------------------------

Old splits Detailed Table Information if newlines are present in view 
definition:

{noformat}
Detailed Table Information      Table(tableName:view9, dbName:default, 
owner:hive_test_user, createTime:1515524236, lastAccessTime:0, retention:0, 
sd:StorageDescriptor(cols:[FieldSchema(name:m, type:int, comment:null)], 
location:null, inputFormat:org.apache.hadoop.mapred.TextInputFormat, 
outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, 
compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, 
serializationLib:null, parameters:{}), bucketCols:[], sortCols:[], 
parameters:{}, skewedInfo:SkewedInfo(skewedColNames:[], skewedColValues:[], 
skewedColValueLocationMaps:{}), storedAsSubDirectories:false), 
partitionKeys:[], parameters:{transient_lastDdlTime=1515524236}, 
viewOriginalText:SELECT test_max(length(value))         
FROM src, viewExpandedText:SELECT `_c0` AS `m` FROM (SELECT 
`test_max`(length(`src`.`value`))            
FROM `default`.`src`) `default.view9`, tableType:VIRTUAL_VIEW, 
rewriteEnabled:false)    
{noformat}

New adds \n instead:

{noformat}
Detailed Table Information      Table(tableName:view9, dbName:default, 
owner:hive_test_user, createTime:1515526192, lastAccessTime:0, retention:0, 
sd:StorageDescriptor(cols:[FieldSchema(name:m, type:int, comment:null)], 
location:null, inputFormat:org.apache.hadoop.mapred.TextInputFormat, 
outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, 
compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, 
serializationLib:null, parameters:{}), bucketCols:[], sortCols:[], 
parameters:{}, skewedInfo:SkewedInfo(skewedColNames:[], skewedColValues:[], 
skewedColValueLocationMaps:{}), storedAsSubDirectories:false), 
partitionKeys:[], parameters:{transient_lastDdlTime=1515526192}, 
viewOriginalText:SELECT test_max(length(value))\nFROM src, 
viewExpandedText:SELECT `_c0` AS `m` FROM (SELECT 
`test_max`(length(`src`.`value`))\nFROM `default`.`src`) `default.view9`, 
tableType:VIRTUAL_VIEW, rewriteEnabled:false)
{noformat}

Note that exact view text from  DESCRIBE FORMATTED remains unchanged.

Do you think this is OK [~pvary] ?


> Describe Extended output is truncated on a table with an explicit row format 
> containing tabs or newlines.
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-18367
>                 URL: https://issues.apache.org/jira/browse/HIVE-18367
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Andrew Sherman
>            Assignee: Andrew Sherman
>         Attachments: HIVE-18367.1.patch, HIVE-18367.2.patch, 
> HIVE-18367.3.patch
>
>
> 'Describe Extended' dumps information about a table. The protocol for sending 
> this data relies on tabs and newlines to separate pieces of data. If a table 
> has 'FIELDS terminated by XXX' or 'LINES terminated by XXX' where XXX is a 
> tab or newline then the output seen by the user is prematurely truncated. Fix 
> this by replacing tabs and newlines in the table description with “\n” and 
> “\t”.



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

Reply via email to