diff --git a/be/src/exec/es_predicate.cpp b/be/src/exec/es_predicate.cpp index af50b2c5d3b63a..ca867e8a78d9ca 100644 --- a/be/src/exec/es_predicate.cpp +++ b/be/src/exec/es_predicate.cpp @@ -53,22 +53,22 @@ std::string ExtLiteral::value_to_string() { std::stringstream ss; switch (_type) { case TYPE_TINYINT: - ss << (int)get_byte(); + ss << std::to_string(get_byte()); break; case TYPE_SMALLINT: - ss << get_short(); + ss << std::to_string(get_short()); break; case TYPE_INT: - ss << get_int(); + ss << std::to_string(get_int()); break; case TYPE_BIGINT: - ss << get_long(); + ss << std::to_string(get_long()); break; case TYPE_FLOAT: - ss << get_float(); + ss << std::to_string(get_float()); break; case TYPE_DOUBLE: - ss << get_double(); + ss << std::to_string(get_double()); break; case TYPE_CHAR: case TYPE_VARCHAR: @@ -79,7 +79,7 @@ std::string ExtLiteral::value_to_string() { ss << get_date_string(); break; case TYPE_BOOLEAN: - ss << get_bool(); + ss << std::to_string(get_bool()); break; case TYPE_DECIMAL: ss << get_decimal_string(); @@ -332,10 +332,8 @@ bool EsPredicate::build_disjuncts_list(Expr* conjunct, vector& di return false; } - TExtInPredicate ext_in_predicate; vector in_pred_values; InPredicate* pred = dynamic_cast(conjunct); - ext_in_predicate.__set_is_not_in(pred->is_not_in()); if (Expr::type_without_cast(pred->get_child(0)) != TExprNodeType::SLOT_REF) { return false; } @@ -365,6 +363,7 @@ bool EsPredicate::build_disjuncts_list(Expr* conjunct, vector& di ExtPredicate* predicate = new ExtInPredicate( TExprNodeType::IN_PRED, + pred->is_not_in(), slot_desc->col_name(), slot_desc->type(), in_pred_values); diff --git a/be/src/exec/es_predicate.h b/be/src/exec/es_predicate.h index a789e58fc936d1..02d0383104fef3 100644 --- a/be/src/exec/es_predicate.h +++ b/be/src/exec/es_predicate.h @@ -106,11 +106,12 @@ struct ExtBinaryPredicate : public ExtPredicate { struct ExtInPredicate : public ExtPredicate { ExtInPredicate( TExprNodeType::type node_type, + bool is_not_in, const std::string& name, const TypeDescriptor& type, const std::vector& values) : ExtPredicate(node_type), - is_not_in(false), + is_not_in(is_not_in), col(name, type), values(values) { } @@ -140,10 +141,11 @@ struct ExtIsNullPredicate : public ExtPredicate { TExprNodeType::type node_type, const std::string& name, const TypeDescriptor& type, + bool is_not_null, ExtLiteral value) : ExtPredicate(node_type), col(name, type), - is_not_null(false) { + is_not_null(is_not_null) { } ExtColumnDesc col; diff --git a/be/src/util/es_scan_reader.cpp b/be/src/util/es_scan_reader.cpp index 7f75351baf0cfd..797e1053dbcd3e 100644 --- a/be/src/util/es_scan_reader.cpp +++ b/be/src/util/es_scan_reader.cpp @@ -67,7 +67,7 @@ Status ESScanReader::open() { long status = _network_client.get_http_status(); if (status != 200) { std::stringstream ss; - ss << "invalid response http status for open: " << status; + ss << "invalid response http status for open: " << status << ", response:" << _cached_response; LOG(WARNING) << ss.str(); return Status(ss.str()); }