Internal Jenkins has submitted this change and it was merged. Change subject: IMPALA-3317: fix crash in sorter when spilling zero-length strings ......................................................................
IMPALA-3317: fix crash in sorter when spilling zero-length strings The sorter converts string pointers to block offsets when spilling. There was a subtle bug in the logic that assumed if the offset was past the end of the current block, the data must necessarily be in the next block. This is not true for zero-length strings, because there is no backing storage so the pointer can point to the byte after the end of the block. This patch fixes the bug by using a simpler offset encoding scheme that packs the block number into the upper 32 bits and the offset within the block into the lower 32 bits. It also slightly refactors the functions so that the method signatures and types are more consistent with the rest of the impala codebase. Also fix a bug with handling of multiple query options in tests. Change-Id: I5f64593e94d367d6b6efb61a8b86e35516f18839 Reviewed-on: http://gerrit.cloudera.org:8080/2780 Reviewed-by: Tim Armstrong <[email protected]> Tested-by: Internal Jenkins --- M be/src/runtime/sorter.cc A testdata/workloads/functional-query/queries/QueryTest/single-node-large-sorts.test M tests/query_test/test_queries.py 3 files changed, 77 insertions(+), 30 deletions(-) Approvals: Internal Jenkins: Verified Tim Armstrong: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/2780 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5f64593e94d367d6b6efb61a8b86e35516f18839 Gerrit-PatchSet: 6 Gerrit-Project: Impala Gerrit-Branch: cdh5-trunk Gerrit-Owner: Tim Armstrong <[email protected]> Gerrit-Reviewer: Dan Hecht <[email protected]> Gerrit-Reviewer: Internal Jenkins Gerrit-Reviewer: Matthew Jacobs <[email protected]> Gerrit-Reviewer: Michael Ho <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]>
