fix runtime range filter correct problem

This commit is contained in:
obdev
2023-07-28 09:12:33 +00:00
committed by ob-robot
parent 51f0a0a8ec
commit 1457301ebc

View File

@ -967,8 +967,11 @@ int ObRFRangeFilterMsg::get_min(ObCmpFunc &func, ObDatum &l, ObDatum &r, int64_t
int ret = OB_SUCCESS;
int cmp = 0;
// when [null, null] merge [a, b], the expect result in mysql mode is [null, b]
// the lower bound l, with ptr==NULL and null_==true, should not be covered by a
if (is_empty_ || (OB_ISNULL(l.ptr_) && !l.is_null())) {
// the lower bound l, with ptr==NULL and null_==true, should not be covered by a.
//
// the reason we remove the OB_ISNULL(l.ptr_) condition is that when l is a empty char with l.ptr=0x0 and
// l.len=0 and null_=false, it should not be corver by r directly
if (is_empty_) {
if (OB_FAIL(dynamic_copy_cell(r, l, cell_size))) {
LOG_WARN("fail to deep copy datum");
}