Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
Impala 2.5.0
Description
This is a very easy bug to fix, we need to remove/change the following DCHECK:
static void CopyStringVal(FunctionContext* ctx, const StringVal& src, StringVal* dst) { DCHECK_GT(src.len, 0); // <---- this DCHECK is wrong, should be GE uint8_t* copy = ctx->Allocate(src.len); if (UNLIKELY(copy == NULL)) { DCHECK(!ctx->impl()->state()->GetQueryStatus().ok()); *dst = StringVal::null(); } else { *dst = StringVal(copy, src.len); memcpy(dst->ptr, src.ptr, src.len); }
However, it appears we have very little to no test coverage on empty strings. This should also be added.