[BUGFIX] fix nullsafe cmp func serialize
This commit is contained in:
@ -1139,6 +1139,37 @@ REG_SER_FUNC_ARRAY(OB_SFA_DATUM_NULLSAFE_STR_CMP,
|
|||||||
NULLSAFE_STR_CMP_FUNCS,
|
NULLSAFE_STR_CMP_FUNCS,
|
||||||
sizeof(NULLSAFE_STR_CMP_FUNCS) / sizeof(void*));
|
sizeof(NULLSAFE_STR_CMP_FUNCS) / sizeof(void*));
|
||||||
|
|
||||||
|
static_assert(CS_TYPE_MAX * 2 * 2 == sizeof(NULLSAFE_TEXT_CMP_FUNCS) / sizeof(void *),
|
||||||
|
"unexpected size");
|
||||||
|
REG_SER_FUNC_ARRAY(OB_SFA_DATUM_NULLSAFE_TEXT_CMP,
|
||||||
|
NULLSAFE_TEXT_CMP_FUNCS,
|
||||||
|
sizeof(NULLSAFE_TEXT_CMP_FUNCS) / sizeof(void*));
|
||||||
|
|
||||||
|
static_assert(CS_TYPE_MAX * 2 * 2 == sizeof(NULLSAFE_TEXT_STR_CMP_FUNCS) / sizeof(void *),
|
||||||
|
"unexpected size");
|
||||||
|
REG_SER_FUNC_ARRAY(OB_SFA_DATUM_NULLSAFE_TEXT_STR_CMP,
|
||||||
|
NULLSAFE_TEXT_STR_CMP_FUNCS,
|
||||||
|
sizeof(NULLSAFE_TEXT_STR_CMP_FUNCS) / sizeof(void*));
|
||||||
|
|
||||||
|
static_assert(CS_TYPE_MAX * 2 * 2 == sizeof(NULLSAFE_STR_TEXT_CMP_FUNCS) / sizeof(void *),
|
||||||
|
"unexpected size");
|
||||||
|
REG_SER_FUNC_ARRAY(OB_SFA_DATUM_NULLSAFE_STR_TEXT_CMP,
|
||||||
|
NULLSAFE_STR_TEXT_CMP_FUNCS,
|
||||||
|
sizeof(NULLSAFE_STR_TEXT_CMP_FUNCS) / sizeof(void*));
|
||||||
|
|
||||||
|
static_assert(2 * 2 == sizeof(NULLSAFE_JSON_CMP_FUNCS) / sizeof(void *),
|
||||||
|
"unexpected size");
|
||||||
|
REG_SER_FUNC_ARRAY(OB_SFA_DATUM_NULLSAFE_JSON_CMP,
|
||||||
|
NULLSAFE_JSON_CMP_FUNCS,
|
||||||
|
sizeof(NULLSAFE_JSON_CMP_FUNCS) / sizeof(void*));
|
||||||
|
|
||||||
|
static_assert(2 * 2 == sizeof(NULLSAFE_GEO_CMP_FUNCS) / sizeof(void *),
|
||||||
|
"unexpected size");
|
||||||
|
REG_SER_FUNC_ARRAY(OB_SFA_DATUM_NULLSAFE_GEO_CMP,
|
||||||
|
NULLSAFE_GEO_CMP_FUNCS,
|
||||||
|
sizeof(NULLSAFE_GEO_CMP_FUNCS) / sizeof(void*));
|
||||||
|
|
||||||
|
|
||||||
static_assert(OB_NOT_FIXED_SCALE * 2 == sizeof(FIXED_DOUBLE_CMP_FUNCS) / sizeof(void *),
|
static_assert(OB_NOT_FIXED_SCALE * 2 == sizeof(FIXED_DOUBLE_CMP_FUNCS) / sizeof(void *),
|
||||||
"unexpected size");
|
"unexpected size");
|
||||||
REG_SER_FUNC_ARRAY(OB_SFA_FIXED_DOUBLE_NULLSAFE_CMP,
|
REG_SER_FUNC_ARRAY(OB_SFA_FIXED_DOUBLE_NULLSAFE_CMP,
|
||||||
|
|||||||
@ -67,7 +67,7 @@ int ObExprUnhex::eval_unhex(const ObExpr &expr, ObEvalCtx &ctx, ObDatum &res_dat
|
|||||||
expr.args_[0]->datum_meta_, expr.args_[0]->obj_meta_.has_lob_header(), str))) {
|
expr.args_[0]->datum_meta_, expr.args_[0]->obj_meta_.has_lob_header(), str))) {
|
||||||
LOG_WARN("failed to get real string data", K(ret));
|
LOG_WARN("failed to get real string data", K(ret));
|
||||||
} else {
|
} else {
|
||||||
ret = OB_FAIL(ObDatumHexUtils::unhex(expr, str, ctx, res_datum, has_set_res));
|
ret = ObDatumHexUtils::unhex(expr, str, ctx, res_datum, has_set_res);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (OB_FAIL(ret)) {
|
if (OB_FAIL(ret)) {
|
||||||
|
|||||||
@ -90,6 +90,11 @@ typedef void (*ser_eval_batch_function)(ObBatchEvalFuncTag &);
|
|||||||
OB_SFA_RELATION_EXPR_EVAL_GEO, \
|
OB_SFA_RELATION_EXPR_EVAL_GEO, \
|
||||||
OB_SFA_RELATION_EXPR_GEO_EVAL_BATCH, \
|
OB_SFA_RELATION_EXPR_GEO_EVAL_BATCH, \
|
||||||
OB_SFA_DATUM_CMP_GEO, \
|
OB_SFA_DATUM_CMP_GEO, \
|
||||||
|
OB_SFA_DATUM_NULLSAFE_TEXT_CMP, \
|
||||||
|
OB_SFA_DATUM_NULLSAFE_TEXT_STR_CMP, \
|
||||||
|
OB_SFA_DATUM_NULLSAFE_STR_TEXT_CMP, \
|
||||||
|
OB_SFA_DATUM_NULLSAFE_JSON_CMP, \
|
||||||
|
OB_SFA_DATUM_NULLSAFE_GEO_CMP, \
|
||||||
OB_SFA_MAX
|
OB_SFA_MAX
|
||||||
|
|
||||||
enum ObSerFuncArrayID {
|
enum ObSerFuncArrayID {
|
||||||
|
|||||||
Reference in New Issue
Block a user