[fix]InListPredicate wrong result (#10211)
* fix * reg test Co-authored-by: Wang Bo <wangbo36@meituan.com>
This commit is contained in:
@ -338,7 +338,7 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
if constexpr (is_opposite != (PT == PredicateType::IN_LIST)) {
|
||||
if constexpr (!is_opposite) {
|
||||
if (_operator(_values.find(reinterpret_cast<const T&>(data_array[idx])),
|
||||
_values.end())) {
|
||||
sel[new_size++] = idx;
|
||||
|
||||
@ -152,5 +152,21 @@ PROPERTIES (
|
||||
result([[1,2,3,4]])
|
||||
}
|
||||
|
||||
// predicate in with two values
|
||||
test {
|
||||
sql """
|
||||
select distinct userid as col from ${table1} where userid in (3,7) order by col;
|
||||
"""
|
||||
result([[3],[7]])
|
||||
}
|
||||
|
||||
// predicate not with two values
|
||||
test {
|
||||
sql """
|
||||
select distinct userid as col from ${table1} where userid not in (3,7) order by col;
|
||||
"""
|
||||
result([[11],[15],[19],[22]])
|
||||
}
|
||||
|
||||
sql "drop table if exists ${table1}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user