Fix base64 bug: ob doesn't return null as expected

This commit is contained in:
obdev
2023-01-04 11:38:19 +00:00
committed by ob-robot
parent a2c0577954
commit 1c9259243e
3 changed files with 10 additions and 6 deletions

View File

@ -179,7 +179,9 @@ int ObExprFromBase64::eval_from_base64_batch(const ObExpr &expr, ObEvalCtx &ctx,
const ObString & in_raw = arg->get_string();
ObLength in_raw_len = in_raw.length();
const char *buf = in_raw.ptr();
if (NULL == buf) {
if (arg->is_null()) {
res[j].set_null();
} else if (NULL == buf) {
res[j].set_string(nullptr, 0);
} else {
char *output_buf = nullptr;