mirror of
https://github.com/apache/impala.git
synced 2026-01-07 09:02:19 -05:00
IMPALA-1973: Fixing crash when uninitialized, empty row is added in HdfsTextScanner
This patch fixes an issue when an uninitialized, empty row is falsely added to the rowbatch. The uninitialized data inside this row leads later on to a crash when the null byte is checked together with the offsets (that contains garbage). The fix is to not only check for the number of materialized columns, but as well for the number of materialized partition key columns. Only if both are empty and the parser has an unfinished tuple, add the empty row. To accommodate for the last row, check in FinishScanRange() if there is an unfinished tuple with materialized slots or materialized partition key. Write the fields if necessary. Change-Id: I2808cc228e62d048d917d3a6352d869d117597ab (cherry picked from commit c1795a8b40d10fbb32d9051a0e7de5ebffc8a6bd) Reviewed-on: http://gerrit.cloudera.org:8080/364 Reviewed-by: Juan Yu <jyu@cloudera.com> Tested-by: Internal Jenkins
This commit is contained in:
committed by
Internal Jenkins
parent
4d428440d8
commit
d1c263402e
6
testdata/data/table_missing_columns.csv
vendored
Normal file
6
testdata/data/table_missing_columns.csv
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
1,true,123.123,2012-10-24 08:55:00
|
||||
2,false
|
||||
3,false,24453.325,2008-08-22 09:33:21.123
|
||||
|
||||
4,false,243423.325,2007-05-12 22:32:21.33454
|
||||
5,true,243.325
|
||||
|
Reference in New Issue
Block a user