Zoltan Borok-Nagy has uploaded this change for review. ( http://gerrit.cloudera.org:8080/22141
Change subject: IMPALA-13589: SELECT INPUT__FILE__NAME can crash Impala ...................................................................... IMPALA-13589: SELECT INPUT__FILE__NAME can crash Impala If the user only queries virtual column INPUT__FILE__NAME from a table backed by text files, and the last row doesn't end with the row delimiter (e.g. '\n') then Impala crashes. In HdfsTextScanner::FinishScanRange() there is specific code to deal with the last row if it doesn't end with the row delimiter, and we fill the last tuple here. This code wasn't active when we only read INPUT__FILE__NAME, which means the last tuple contained garbage which caused a segfault later. The fix is to always fill the last tuple if we have a template tuple as it means we either have partition expressions, or file-level virtual columns like INPUT__FILE__NAME. Other file-level virtual columns only apply to Iceberg tables which don't support text data files, so those are not affected by this bug. Testing * added e2e tests Change-Id: I0ea8e7fed77cbc9ae90a858eafeee9dcfd73d143 --- M be/src/exec/text/hdfs-text-scanner.cc M testdata/workloads/functional-query/queries/QueryTest/virtual-column-input-file-name-in-table.test M testdata/workloads/functional-query/queries/QueryTest/virtual-column-input-file-name.test 3 files changed, 46 insertions(+), 1 deletion(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/41/22141/1 -- To view, visit http://gerrit.cloudera.org:8080/22141 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I0ea8e7fed77cbc9ae90a858eafeee9dcfd73d143 Gerrit-Change-Number: 22141 Gerrit-PatchSet: 1 Gerrit-Owner: Zoltan Borok-Nagy <[email protected]>
