diff --git a/be/src/udf/udf.h b/be/src/udf/udf.h index 9013d20cfb..3ed500d7c9 100755 --- a/be/src/udf/udf.h +++ b/be/src/udf/udf.h @@ -644,7 +644,7 @@ struct StringVal : public AnyVal { return false; } - return ptr == other.ptr || memcmp(ptr, other.ptr, len) == 0; + return len == 0 || ptr == other.ptr || memcmp(ptr, other.ptr, len) == 0; } bool operator!=(const StringVal& other) const {