This is an automated email from the ASF dual-hosted git repository.
kangkaisen 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 559714f Fix largeint max min bug (#3793)
559714f is described below
commit 559714f3d49eba813f509a8899233ffea5b6c05e
Author: kangkaisen <[email protected]>
AuthorDate: Mon Jun 8 21:01:30 2020 +0800
Fix largeint max min bug (#3793)
---
be/src/exprs/expr_value.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/be/src/exprs/expr_value.h b/be/src/exprs/expr_value.h
index 428abfd..daa434a 100644
--- a/be/src/exprs/expr_value.h
+++ b/be/src/exprs/expr_value.h
@@ -47,7 +47,7 @@ struct ExprValue {
DecimalValue decimal_val;
DecimalV2Value decimalv2_val;
- ExprValue() :
+ ExprValue() :
bool_val(false),
tinyint_val(0),
smallint_val(0),
@@ -74,7 +74,7 @@ struct ExprValue {
ExprValue(int64_t i, int32_t f) : decimal_val(i, f), decimalv2_val(i, f) {}
// c'tor for string values
- ExprValue(const std::string& str) :
+ ExprValue(const std::string& str) :
string_data(str),
string_val(const_cast<char*>(string_data.data()),
string_data.size()) {
}
@@ -177,7 +177,7 @@ struct ExprValue {
return &bigint_val;
case TYPE_LARGEINT:
- large_int_val = 0;
+ large_int_val = std::numeric_limits<int128_t>::min();
return &large_int_val;
case TYPE_FLOAT:
@@ -229,7 +229,7 @@ struct ExprValue {
return &bigint_val;
case TYPE_LARGEINT:
- large_int_val = 0;
+ large_int_val = std::numeric_limits<int128_t>::max();
return &large_int_val;
case TYPE_FLOAT:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]