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

Prasanth J commented on HIVE-4340:
----------------------------------

I tried enhancing this patch to support SerDeStats in ORC in a slightly more 
efficient and less intrusive way. The current implementation of stats gathering 
happens for each row in processOp() method of FileSinkOperator. For each row, a 
new SerDeStats object is created and the stats are accumulated in a hashmap. 
This is good for cases where statistics gathering is not done by underlying 
storage format. But in case of ORC, ORC already gathers lots of statistics 
while writing the data which can be leveraged to provide SerDeStats. The 
statistics gathered by ORC can be retrieved in closeOp() method of 
FileSinkOperator making it more efficient than row by row processing of serde 
statistics.

Uploaded patch implements the above approach.
                
> ORC should provide raw data size
> --------------------------------
>
>                 Key: HIVE-4340
>                 URL: https://issues.apache.org/jira/browse/HIVE-4340
>             Project: Hive
>          Issue Type: Improvement
>          Components: File Formats
>    Affects Versions: 0.11.0
>            Reporter: Kevin Wilfong
>            Assignee: Kevin Wilfong
>         Attachments: HIVE-4340.1.patch.txt, HIVE-4340.2.patch.txt, 
> HIVE-4340.3.patch.txt, HIVE-4340.4.patch.txt, HIVE-4340-java-only.4.patch.txt
>
>
> ORC's SerDe currently does nothing, and hence does not calculate a raw data 
> size.  WriterImpl, however, has enough information to provide one.
> WriterImpl should compute a raw data size for each row, aggregate them per 
> stripe and record it in the strip information, as RC currently does in its 
> key header, and allow the FileSinkOperator access to the size per row.
> FileSinkOperator should be able to get the raw data size from either the 
> SerDe or the RecordWriter when the RecordWriter can provide it.

--
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