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

Sergio Peña commented on HIVE-11611:
------------------------------------

[~Ferd]. Thanks for working on this.

[~rdblue] I see you fixed the validation on PARQUET-363. If we now pass an 
empty schema to Parquet, how is 'select count(1)' going to count the # of 
records if Parquet does not return any data? I am not sure how Parquet handles 
an empty schema, could you help me understand this? Do you think that 
requesting at least 1 column to Parquet will allow Hive to count the records 
(See [~Ferd] patch)?

> A bad performance regression issue with Parquet happens if Hive does not 
> select any columns
> -------------------------------------------------------------------------------------------
>
>                 Key: HIVE-11611
>                 URL: https://issues.apache.org/jira/browse/HIVE-11611
>             Project: Hive
>          Issue Type: Sub-task
>    Affects Versions: 2.0.0
>            Reporter: Sergio Peña
>            Assignee: Ferdinand Xu
>         Attachments: HIVE-11611.patch
>
>
> A possible performance issue may happen with the below code when using a 
> query like this {{SELECT count(1) FROM parquetTable}}.
> {code}
> if (!ColumnProjectionUtils.isReadAllColumns(configuration) && 
> !indexColumnsWanted.isEmpty()) {
>         MessageType requestedSchemaByUser =
>             getSchemaByIndex(tableSchema, columnNamesList, 
> indexColumnsWanted);
>         return new ReadContext(requestedSchemaByUser, contextMetadata);
> } else {
>   return new ReadContext(tableSchema, contextMetadata);
> }
> {code}
> If there are not columns nor indexes selected, then the above code will read 
> the full schema from Parquet even if Hive does not do anything with such 
> values.



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

Reply via email to