Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.0.0
Description
Repro steps:
Input file:
1^,1^,^,0^,0^,0 2^,1^,^,0^,1^,0 3^,1^,^,0^,0^,0 4^,1^,^,0^,1^,0
Queries:
CREATE TABLE n2(colA int, colB tinyint, colC timestamp, colD smallint, colE smallint) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.MultiDelimitSerDe' WITH SERDEPROPERTIES ("field.delim"="^,")STORED AS TEXTFILE; LOAD DATA LOCAL INPATH '/Users/schaurasia/Documents/input_6_cols.csv' OVERWRITE INTO TABLE n2; select * from n2; // wrong last column results here. +----------+----------+----------+----------+----------+ | n2.cola | n2.colb | n2.colc | n2.cold | n2.cole | +----------+----------+----------+----------+----------+ | 1 | 1 | NULL | 0 | NULL | | 2 | 1 | NULL | 0 | NULL | | 3 | 1 | NULL | 0 | NULL | | 4 | 1 | NULL | 0 | NULL | +----------+----------+----------+----------+----------+
Cause:
In multi-serde parsing, the total length calculation here: https://github.com/apache/hive/blob/rel/release-3.1.2/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyStruct.java#L308 does not take extra fields into account.
Attachments
Attachments
Issue Links
- causes
-
HIVE-24151 MultiDelimitSerDe shifts data if strings contain non-ASCII characters
- Closed
- Is contained by
-
HIVE-26751 Bug Fixes and Improvements for 3.2.0 release
- Open
- is related to
-
HIVE-22337 Improve and Expand Text-Based SerDes
- Patch Available
- links to