You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Panagiotis Garefalakis (Jira)" <ji...@apache.org> on 2021/10/08 20:40:00 UTC

[jira] [Comment Edited] (HIVE-25505) Incorrect results with header. skip.header.line.count if first line is blank

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

Panagiotis Garefalakis edited comment on HIVE-25505 at 10/8/21, 8:39 PM:
-------------------------------------------------------------------------

I have a repro for this – updating description and assigning to myself


was (Author: pgaref):
I have a repro for this -- updating description and assigned to myself


> Incorrect results with header. skip.header.line.count if first line is blank
> ----------------------------------------------------------------------------
>
>                 Key: HIVE-25505
>                 URL: https://issues.apache.org/jira/browse/HIVE-25505
>             Project: Hive
>          Issue Type: Bug
>          Components: HiveServer2
>            Reporter: Steve Carlin
>            Assignee: Panagiotis Garefalakis
>            Priority: Major
>
> aAtable with header. skip.header.line.count=1 does not skip the first line if it is blank, except in a fetch task.
> To reproduce, create a csv table, ans set header. skip.header.line.count=1 in table properties.
> In the table location, create a single file, with a blank (empty) first line, and say 2 further lines.
> If you do a select * on it, you see 2 rows (correct)
>  If you do select count(*) on it, you get 3 (incorrect)
> {code:java}
> CREATE EXTERNAL TABLE `testcase1`(id int, name string) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
>   LOCATION '${system:test.tmp.dir}/testcase1'
>   TBLPROPERTIES ("skip.header.line.count"="1");
> SET hive.fetch.task.conversion = more;
> select * from testcase1;
> select count(*) from testcase1;
> set hive.fetch.task.conversion=none;
> select * from testcase1;
> select count(*) from testcase1;
> Test file:
> 1,2019-12-31
> 2,2019-12-31
> 3,2019-12-31
> Should both yield (with the above test file):
> #### A masked pattern was here ####
> 1	2019-12-31
> 2	2019-12-31
> 3	2019-12-31
> 3
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)