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

Sahil Takiar commented on HIVE-14169:
-------------------------------------

[~thejas] I agree, I will incorporate that into this JIRA.

I think your proposed change would also require 
https://issues.apache.org/jira/browse/HIVE-14170 - my guess is that 
{{BufferedRows}} was built not only so the optimal width could be calculated, 
but also because there is some overhead in going to stdout for each row (which 
is what {{IncrementalRows}} does, I think). So I think 
https://issues.apache.org/jira/browse/HIVE-14170 will hit that sweet spot where 
we buffer only "x" amount of rows and then flush them.

> Beeline Row printing should only calculate the width if TableOutputFormat is 
> used
> ---------------------------------------------------------------------------------
>
>                 Key: HIVE-14169
>                 URL: https://issues.apache.org/jira/browse/HIVE-14169
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Beeline
>            Reporter: Sahil Takiar
>            Assignee: Sahil Takiar
>
> * When Beeline prints out a {{ResultSet}} to stdout it uses the 
> {{BeeLine.print}} method
> * This method takes the {{ResultSet}} from the completed query and uses a 
> specified {{OutputFormat}} to print the rows (by default it uses 
> {{TableOutputFormat}})
> * The {{print}} method also wraps the {{ResultSet}} into a {{Rows}} class 
> (either a {{IncrementalRows}} or a {{BufferedRows}} class)
> * The {{Rows}} class will calculate the optimal width that each row in the 
> {{ResultSet}} should be displayed with
> * However, this width is only relevant / used by {{TableOutputFormat}}
> We should modify the logic so that the width is only calculated if 
> {{TableOutputFormat}} is used. This will save CPU cycles when printing 
> records out to the user.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to