diff --git a/be/src/exec/es/es_scroll_parser.cpp b/be/src/exec/es/es_scroll_parser.cpp index 0190f7881ffa08..ebf593520356ab 100644 --- a/be/src/exec/es/es_scroll_parser.cpp +++ b/be/src/exec/es/es_scroll_parser.cpp @@ -201,7 +201,7 @@ Status get_date_value_int(const rapidjson::Value& col, PrimitiveType type, bool cctz::parse("%Y-%m-%dT%H:%M:%E*S%Ez", str_date, cctz::utc_time_zone(), &tp); if (ok) { success = dt_val.from_unixtime(std::chrono::system_clock::to_time_t(tp), - cctz::local_time_zone().name()); + cctz::local_time_zone()); } } else if (str_length == 19) { // YYYY-MM-DDTHH:MM:SS @@ -211,7 +211,7 @@ Status get_date_value_int(const rapidjson::Value& col, PrimitiveType type, bool cctz::parse("%Y-%m-%dT%H:%M:%S", str_date, cctz::utc_time_zone(), &tp); if (ok) { success = dt_val.from_unixtime(std::chrono::system_clock::to_time_t(tp), - cctz::local_time_zone().name()); + cctz::local_time_zone()); } } else { // YYYY-MM-DD HH:MM:SS @@ -222,7 +222,7 @@ Status get_date_value_int(const rapidjson::Value& col, PrimitiveType type, bool // string long like "1677895728000" int64_t time_long = std::atol(str_date.c_str()); if (time_long > 0) { - success = dt_val.from_unixtime(time_long / 1000, cctz::local_time_zone().name()); + success = dt_val.from_unixtime(time_long / 1000, cctz::local_time_zone()); } } else { // YYYY-MM-DD or others @@ -234,7 +234,7 @@ Status get_date_value_int(const rapidjson::Value& col, PrimitiveType type, bool } } else { - if (!dt_val.from_unixtime(col.GetInt64() / 1000, cctz::local_time_zone().name())) { + if (!dt_val.from_unixtime(col.GetInt64() / 1000, cctz::local_time_zone())) { RETURN_ERROR_IF_CAST_FORMAT_ERROR(col, type); } } @@ -632,19 +632,11 @@ Status ScrollParser::fill_columns(const TupleDescriptor* tuple_desc, case TYPE_VARCHAR: case TYPE_STRING: { std::string val; - if (pure_doc_value && !sub_col.Empty()) { - if (!sub_col[0].IsString()) { - val = json_value_to_string(sub_col[0]); - } else { - val = sub_col[0].GetString(); - } + RETURN_ERROR_IF_COL_IS_ARRAY(sub_col, sub_type); + if (!sub_col.IsString()) { + val = json_value_to_string(sub_col); } else { - RETURN_ERROR_IF_COL_IS_ARRAY(sub_col, type); - if (!sub_col.IsString()) { - val = json_value_to_string(sub_col); - } else { - val = sub_col.GetString(); - } + val = sub_col.GetString(); } array.push_back(val); break; diff --git a/be/src/pipeline/pipeline_fragment_context.cpp b/be/src/pipeline/pipeline_fragment_context.cpp index fe5e98dde81b52..3cd552e4792517 100644 --- a/be/src/pipeline/pipeline_fragment_context.cpp +++ b/be/src/pipeline/pipeline_fragment_context.cpp @@ -442,6 +442,7 @@ Status PipelineFragmentContext::_build_pipelines(ExecNode* node, PipelinePtr cur case TPlanNodeType::ODBC_SCAN_NODE: case TPlanNodeType::FILE_SCAN_NODE: case TPlanNodeType::META_SCAN_NODE: + case TPlanNodeType::ES_HTTP_SCAN_NODE: case TPlanNodeType::ES_SCAN_NODE: { OperatorBuilderPtr operator_t = std::make_shared(node->id(), node); RETURN_IF_ERROR(cur_pipe->add_operator(operator_t)); diff --git a/fe/fe-core/src/main/java/org/apache/doris/external/elasticsearch/QueryBuilders.java b/fe/fe-core/src/main/java/org/apache/doris/external/elasticsearch/QueryBuilders.java index a0a805747a53e0..8dc8d4abea9574 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/external/elasticsearch/QueryBuilders.java +++ b/fe/fe-core/src/main/java/org/apache/doris/external/elasticsearch/QueryBuilders.java @@ -224,6 +224,11 @@ public static QueryBuilder toEsDsl(Expr expr, List notPushDownList, Map= '2022-08-08 00:00:00' and test4 < '2022-08-08 23:59:59'""" order_qt_sql83 """select c_bool[1], c_byte[1], c_short[1], c_integer[1], c_long[1], c_unsigned_long[1], c_float[1], c_half_float[1], c_double[1], c_scaled_float[1], c_date[1], c_datetime[1], c_keyword[1], c_text[1], c_ip[1], c_person[1] from test1""" order_qt_sql84 """select c_bool[1], c_byte[1], c_short[1], c_integer[1], c_long[1], c_unsigned_long[1], c_float[1], c_half_float[1], c_double[1], c_scaled_float[1], c_date[1], c_datetime[1], c_keyword[1], c_text[1], c_ip[1], c_person[1] from test2""" order_qt_sql85 """select * from test1 where esquery(test2, '{"match":{"test2":"text#1"}}')""" + order_qt_sql86 """select c_bool, c_byte, c_short, c_integer, c_long, c_unsigned_long, c_float, c_half_float, c_double, c_scaled_float, c_date, c_datetime, c_keyword, c_text, c_ip, c_person from test1""" + order_qt_sql87 """select c_bool, c_byte, c_short, c_integer, c_long, c_unsigned_long, c_float, c_half_float, c_double, c_scaled_float, c_date, c_datetime, c_keyword, c_text, c_ip, c_person from test2""" } }