You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/02/02 00:14:00 UTC

[jira] [Work logged] (HIVE-25765) skip.header.line.count property skips rows of each block in FetchOperator when file size is larger

     [ https://issues.apache.org/jira/browse/HIVE-25765?focusedWorklogId=719101&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-719101 ]

ASF GitHub Bot logged work on HIVE-25765:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Feb/22 00:13
            Start Date: 02/Feb/22 00:13
    Worklog Time Spent: 10m 
      Work Description: github-actions[bot] commented on pull request #2838:
URL: https://github.com/apache/hive/pull/2838#issuecomment-1027414730


   This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
   Feel free to reach out on the dev@hive.apache.org list if the patch is in need of reviews.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 719101)
    Time Spent: 0.5h  (was: 20m)

> skip.header.line.count property skips rows of each block in FetchOperator when file size is larger
> --------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-25765
>                 URL: https://issues.apache.org/jira/browse/HIVE-25765
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 3.1.2, 4.0.0
>            Reporter: Ganesha Shreedhara
>            Assignee: Ganesha Shreedhara
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: data.txt.gz
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> When _skip.header.line.count_ property is set in table properties, simple select queries that gets converted into FetchTask skip rows of each block instead of skipping header lines of each file. This happens when the file size is larger and file is read in blocks. This issue doesn't exist when select query is converted into map only job by setting _hive.fetch.task.conversion_ to _none_ because the header lines are skipped only for the first block because of [this check|https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/io/HiveContextAwareRecordReader.java#L330] We should have similar check in FetchOperator to avoid this issue. 
>  
> *Steps to reproduce:* 
> {code:java}
> -- Create table on top of the data file (uncompressed size: ~239M) attached in this ticket
> CREATE EXTERNAL TABLE test_table(
>   col1 string,
>   col2 string,
>   col3 string,
>   col4 string,
>   col5 string,
>   col6 string,
>   col7 string,
>   col8 string,
>   col9 string,
>   col10 string,
>   col11 string,
>   col12 string)
> ROW FORMAT SERDE
>   'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
> STORED AS INPUTFORMAT
>   'org.apache.hadoop.mapred.TextInputFormat'
> OUTPUTFORMAT
>   'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
> LOCATION
>   'location_of_data_file'
> TBLPROPERTIES ('skip.header.line.count'='1');
> -- Counting number of rows gives correct result with only one header line skipped
> select count(*) from test_table;
> 3145727
> -- Select query skips more rows and the result depends upon the number of blocks configured in underlying filesystem. 3 rows are skipped when the file is read in 3 blocks. 
> select * from test_table;
> .
> .
> Fetched 3145724 rows
>  {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)