You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2021/10/03 04:17:15 UTC
[incubator-doris] branch master updated: [Bug] big_int * big_int
product overflow (#6788)
This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new 8cf7ff7 [Bug] big_int * big_int product overflow (#6788)
8cf7ff7 is described below
commit 8cf7ff78dfbee3004c37a42a5778f17a7a1c23ac
Author: thinker <zc...@qq.com>
AuthorDate: Sun Oct 3 12:17:03 2021 +0800
[Bug] big_int * big_int product overflow (#6788)
while query with multi where conditions, such as `where dt in (20210926,20210919) and hour<=13`,
will cause int * int product overflow result. and then in the function extend_scan_key will call
`range.convert_to_fixed_value()` mistakenly. And for a big `range[_low_value, _high_value)`,
mass value will be inserted into _fixed_values, result in oom finally.
---
be/src/exec/olap_common.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/be/src/exec/olap_common.h b/be/src/exec/olap_common.h
index 7ad3d5e..bdbec2a 100644
--- a/be/src/exec/olap_common.h
+++ b/be/src/exec/olap_common.h
@@ -763,7 +763,7 @@ Status OlapScanKeys::extend_scan_key(ColumnValueRange<T>& range, int32_t max_sca
//if a column doesn't have any predicate, we will try converting the range to fixed values
auto scan_keys_size = _begin_scan_keys.empty() ? 1 : _begin_scan_keys.size();
if (range.is_fixed_value_range()) {
- if (range.get_fixed_value_size() * scan_keys_size > max_scan_key_num) {
+ if (range.get_fixed_value_size() > max_scan_key_num / scan_keys_size) {
if (range.is_range_value_convertible()) {
range.convert_to_range_value();
} else {
@@ -772,7 +772,7 @@ Status OlapScanKeys::extend_scan_key(ColumnValueRange<T>& range, int32_t max_sca
}
} else {
if (range.is_fixed_value_convertible() && _is_convertible) {
- if (range.get_convertible_fixed_value_size() * scan_keys_size < max_scan_key_num) {
+ if (range.get_convertible_fixed_value_size() < max_scan_key_num / scan_keys_size) {
range.convert_to_fixed_value();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org