From 642c149e6a81c63eecdd67e6e3b0b1925593cc20 Mon Sep 17 00:00:00 2001 From: Pxl Date: Fri, 20 Oct 2023 22:08:17 +0800 Subject: [PATCH] remove datetime_value and move vecdatetime_value to doris namespace (#25695) remove datetime_value and move vecdatetime_value to doris namespace --- be/src/exec/es/es_scroll_parser.cpp | 28 +++----- be/src/exec/olap_common.h | 6 +- be/src/exec/olap_utils.h | 1 - .../schema_scanner/schema_tables_scanner.cpp | 6 +- be/src/exec/table_connector.cpp | 17 ++--- be/src/exec/tablet_info.cpp | 6 +- be/src/exec/text_converter.cpp | 8 +-- be/src/exprs/bloom_filter_func.h | 12 ++-- be/src/exprs/runtime_filter.cpp | 33 +++++---- be/src/exprs/runtime_filter.h | 1 - be/src/olap/in_list_predicate.h | 6 +- .../olap/rowset/segment_v2/column_reader.cpp | 8 +-- be/src/olap/types.h | 24 +++---- be/src/pipeline/exec/scan_operator.cpp | 4 +- be/src/pipeline/task_scheduler.cpp | 2 +- be/src/runtime/datetime_value.h | 50 -------------- be/src/runtime/fold_constant_executor.cpp | 14 ++-- be/src/runtime/fragment_mgr.cpp | 4 +- be/src/runtime/plan_fragment_executor.cpp | 4 +- be/src/runtime/plan_fragment_executor.h | 6 +- be/src/runtime/primitive_type.h | 8 +-- be/src/runtime/query_context.h | 7 +- be/src/runtime/raw_value.h | 2 +- be/src/runtime/runtime_state.cpp | 4 +- be/src/runtime/type_limit.h | 51 ++++++-------- be/src/util/arrow/block_convertor.cpp | 13 ++-- be/src/util/binary_cast.hpp | 27 +++----- be/src/util/bitmap_intersect.h | 9 +-- be/src/util/date_func.cpp | 4 +- be/src/util/datetype_cast.hpp | 8 +-- be/src/util/mysql_row_buffer.cpp | 32 ++++----- be/src/util/static_asserts.cpp | 2 +- be/src/util/time_lut.cpp | 6 +- .../aggregate_function_sequence_match.cpp | 10 --- be/src/vec/columns/column_vector.h | 3 +- be/src/vec/core/accurate_comparison.h | 1 - be/src/vec/data_types/data_type_date.cpp | 6 +- be/src/vec/data_types/data_type_date_time.cpp | 10 ++- .../serde/data_type_date64_serde.cpp | 9 +-- .../serde/data_type_datetimev2_serde.cpp | 8 +-- .../serde/data_type_datev2_serde.cpp | 6 +- be/src/vec/exec/format/orc/vorc_reader.h | 4 -- be/src/vec/exprs/vexpr.h | 9 +-- be/src/vec/functions/function_convert_tz.h | 12 ---- .../function_date_or_datetime_computation.h | 13 ++-- .../function_date_or_datetime_to_string.h | 1 + .../function_datetime_string_to_string.h | 1 + be/src/vec/runtime/vdatetime_value.cpp | 67 +++++++++---------- be/src/vec/runtime/vdatetime_value.h | 56 +++++++--------- be/src/vec/sink/vtablet_sink.cpp | 1 - .../vec/sink/writer/vmysql_table_writer.cpp | 12 ++-- be/test/olap/delta_writer_test.cpp | 14 ++-- .../segment_v2/column_reader_writer_test.cpp | 2 +- be/test/olap/tablet_cooldown_test.cpp | 2 +- be/test/vec/core/block_test.cpp | 6 +- .../serde/data_type_serde_arrow_test.cpp | 8 +-- .../serde/data_type_serde_mysql_test.cpp | 6 +- be/test/vec/exprs/vexpr_test.cpp | 6 +- be/test/vec/jsonb/serialize_test.cpp | 2 +- 59 files changed, 262 insertions(+), 426 deletions(-) delete mode 100644 be/src/runtime/datetime_value.h diff --git a/be/src/exec/es/es_scroll_parser.cpp b/be/src/exec/es/es_scroll_parser.cpp index 5c99e25edc..2d3cd648db 100644 --- a/be/src/exec/es/es_scroll_parser.cpp +++ b/be/src/exec/es/es_scroll_parser.cpp @@ -188,7 +188,7 @@ Status get_int_value(const rapidjson::Value& col, PrimitiveType type, void* slot template Status get_date_value_int(const rapidjson::Value& col, PrimitiveType type, bool is_date_str, RT* slot, const cctz::time_zone& time_zone) { - constexpr bool is_datetime_v1 = std::is_same_v; + constexpr bool is_datetime_v1 = std::is_same_v; T dt_val; if (is_date_str) { const std::string str_date = col.GetString(); @@ -656,18 +656,16 @@ Status ScrollParser::fill_columns(const TupleDescriptor* tuple_desc, case TYPE_DATE: case TYPE_DATETIME: - RETURN_IF_ERROR((fill_date_int( - col, type, pure_doc_value, col_ptr, time_zone))); + RETURN_IF_ERROR((fill_date_int(col, type, pure_doc_value, + col_ptr, time_zone))); break; case TYPE_DATEV2: - RETURN_IF_ERROR( - (fill_date_int, uint32_t>( - col, type, pure_doc_value, col_ptr, time_zone))); + RETURN_IF_ERROR((fill_date_int, uint32_t>( + col, type, pure_doc_value, col_ptr, time_zone))); break; case TYPE_DATETIMEV2: { - RETURN_IF_ERROR( - (fill_date_int, - uint64_t>(col, type, pure_doc_value, col_ptr, time_zone))); + RETURN_IF_ERROR((fill_date_int, uint64_t>( + col, type, pure_doc_value, col_ptr, time_zone))); break; } case TYPE_ARRAY: { @@ -773,19 +771,15 @@ Status ScrollParser::fill_columns(const TupleDescriptor* tuple_desc, // No need to support date and datetime types. case TYPE_DATEV2: { uint32_t data; - RETURN_IF_ERROR( - (get_date_int, - uint32_t>(sub_col, sub_type, pure_doc_value, &data, - time_zone))); + RETURN_IF_ERROR((get_date_int, uint32_t>( + sub_col, sub_type, pure_doc_value, &data, time_zone))); array.push_back(data); break; } case TYPE_DATETIMEV2: { uint64_t data; - RETURN_IF_ERROR( - (get_date_int, - uint64_t>(sub_col, sub_type, pure_doc_value, &data, - time_zone))); + RETURN_IF_ERROR((get_date_int, uint64_t>( + sub_col, sub_type, pure_doc_value, &data, time_zone))); array.push_back(data); break; } diff --git a/be/src/exec/olap_common.h b/be/src/exec/olap_common.h index 6ef0edd7a3..8be58e9790 100644 --- a/be/src/exec/olap_common.h +++ b/be/src/exec/olap_common.h @@ -37,7 +37,6 @@ #include "exec/olap_utils.h" #include "olap/olap_common.h" #include "olap/olap_tuple.h" -#include "runtime/datetime_value.h" #include "runtime/define_primitive_type.h" #include "runtime/primitive_type.h" #include "runtime/type_limit.h" @@ -60,9 +59,8 @@ std::string cast_to_string(T value, int scale) { } else if constexpr (primitive_type == TYPE_LARGEINT) { return vectorized::int128_to_string(value); } else if constexpr (primitive_type == TYPE_DATETIMEV2) { - doris::vectorized::DateV2Value datetimev2_val = - static_cast>( - value); + DateV2Value datetimev2_val = + static_cast>(value); char buf[30]; datetimev2_val.to_string(buf); std::stringstream ss; diff --git a/be/src/exec/olap_utils.h b/be/src/exec/olap_utils.h index 1d6bdf9593..6af46ee91b 100644 --- a/be/src/exec/olap_utils.h +++ b/be/src/exec/olap_utils.h @@ -24,7 +24,6 @@ #include "common/logging.h" #include "olap/olap_tuple.h" -#include "runtime/datetime_value.h" #include "runtime/primitive_type.h" namespace doris { diff --git a/be/src/exec/schema_scanner/schema_tables_scanner.cpp b/be/src/exec/schema_scanner/schema_tables_scanner.cpp index 3a2654b9e1..61f67c0e59 100644 --- a/be/src/exec/schema_scanner/schema_tables_scanner.cpp +++ b/be/src/exec/schema_scanner/schema_tables_scanner.cpp @@ -255,7 +255,7 @@ Status SchemaTablesScanner::_fill_block_impl(vectorized::Block* block) { { static_cast(fill_dest_column_for_range(block, 13, null_datas)); } // creation_time { - vectorized::VecDateTimeValue srcs[table_num]; + VecDateTimeValue srcs[table_num]; for (int i = 0; i < table_num; ++i) { const TTableStatus& tbl_status = _table_result.tables[i]; if (tbl_status.__isset.create_time) { @@ -274,7 +274,7 @@ Status SchemaTablesScanner::_fill_block_impl(vectorized::Block* block) { } // update_time { - vectorized::VecDateTimeValue srcs[table_num]; + VecDateTimeValue srcs[table_num]; for (int i = 0; i < table_num; ++i) { const TTableStatus& tbl_status = _table_result.tables[i]; if (tbl_status.__isset.update_time) { @@ -293,7 +293,7 @@ Status SchemaTablesScanner::_fill_block_impl(vectorized::Block* block) { } // check_time { - vectorized::VecDateTimeValue srcs[table_num]; + VecDateTimeValue srcs[table_num]; for (int i = 0; i < table_num; ++i) { const TTableStatus& tbl_status = _table_result.tables[i]; if (tbl_status.__isset.last_check_time) { diff --git a/be/src/exec/table_connector.cpp b/be/src/exec/table_connector.cpp index 7aa90eda08..ba0d37d5dd 100644 --- a/be/src/exec/table_connector.cpp +++ b/be/src/exec/table_connector.cpp @@ -157,8 +157,7 @@ Status TableConnector::convert_column_data(const vectorized::ColumnPtr& column_p fmt::format_to(_insert_stmt_buffer, "{}", *reinterpret_cast(item)); break; case TYPE_DATE: { - vectorized::VecDateTimeValue value = - binary_cast(*(int64_t*)item); + VecDateTimeValue value = binary_cast(*(int64_t*)item); char buf[64]; char* pos = value.to_string(buf); @@ -167,8 +166,7 @@ Status TableConnector::convert_column_data(const vectorized::ColumnPtr& column_p break; } case TYPE_DATETIME: { - vectorized::VecDateTimeValue value = - binary_cast(*(int64_t*)item); + VecDateTimeValue value = binary_cast(*(int64_t*)item); char buf[64]; char* pos = value.to_string(buf); @@ -177,9 +175,8 @@ Status TableConnector::convert_column_data(const vectorized::ColumnPtr& column_p break; } case TYPE_DATEV2: { - vectorized::DateV2Value value = - binary_cast>( - *(int32_t*)item); + DateV2Value value = + binary_cast>(*(int32_t*)item); char buf[64]; char* pos = value.to_string(buf); @@ -188,10 +185,8 @@ Status TableConnector::convert_column_data(const vectorized::ColumnPtr& column_p break; } case TYPE_DATETIMEV2: { - vectorized::DateV2Value value = - binary_cast>( - *(int64_t*)item); + DateV2Value value = + binary_cast>(*(int64_t*)item); char buf[64]; char* pos = value.to_string(buf, type.scale); diff --git a/be/src/exec/tablet_info.cpp b/be/src/exec/tablet_info.cpp index 05561be297..9a24771edc 100644 --- a/be/src/exec/tablet_info.cpp +++ b/be/src/exec/tablet_info.cpp @@ -489,7 +489,7 @@ Status VOlapTablePartitionParam::_create_partition_key(const TExprNode& t_expr, switch (t_expr.node_type) { case TExprNodeType::DATE_LITERAL: { if (TypeDescriptor::from_thrift(t_expr.type).is_date_v2_type()) { - vectorized::DateV2Value dt; + DateV2Value dt; if (!dt.from_date_str(t_expr.date_literal.value.c_str(), t_expr.date_literal.value.size())) { std::stringstream ss; @@ -498,7 +498,7 @@ Status VOlapTablePartitionParam::_create_partition_key(const TExprNode& t_expr, } column->insert_data(reinterpret_cast(&dt), 0); } else if (TypeDescriptor::from_thrift(t_expr.type).is_datetime_v2_type()) { - vectorized::DateV2Value dt; + DateV2Value dt; if (!dt.from_date_str(t_expr.date_literal.value.c_str(), t_expr.date_literal.value.size())) { std::stringstream ss; @@ -507,7 +507,7 @@ Status VOlapTablePartitionParam::_create_partition_key(const TExprNode& t_expr, } column->insert_data(reinterpret_cast(&dt), 0); } else { - vectorized::VecDateTimeValue dt; + VecDateTimeValue dt; if (!dt.from_date_str(t_expr.date_literal.value.c_str(), t_expr.date_literal.value.size())) { std::stringstream ss; diff --git a/be/src/exec/text_converter.cpp b/be/src/exec/text_converter.cpp index 59417bc926..5545561932 100644 --- a/be/src/exec/text_converter.cpp +++ b/be/src/exec/text_converter.cpp @@ -193,7 +193,7 @@ bool TextConverter::_write_data(const TypeDescriptor& type_desc, break; } case TYPE_DATE: { - vectorized::VecDateTimeValue ts_slot; + VecDateTimeValue ts_slot; if (!ts_slot.from_date_str(data, len)) { parse_result = StringParser::PARSE_FAILURE; break; @@ -205,7 +205,7 @@ bool TextConverter::_write_data(const TypeDescriptor& type_desc, break; } case TYPE_DATEV2: { - vectorized::DateV2Value ts_slot; + DateV2Value ts_slot; if (!ts_slot.from_date_str(data, len)) { parse_result = StringParser::PARSE_FAILURE; break; @@ -217,7 +217,7 @@ bool TextConverter::_write_data(const TypeDescriptor& type_desc, break; } case TYPE_DATETIME: { - vectorized::VecDateTimeValue ts_slot; + VecDateTimeValue ts_slot; if (!ts_slot.from_date_str(data, len)) { parse_result = StringParser::PARSE_FAILURE; break; @@ -229,7 +229,7 @@ bool TextConverter::_write_data(const TypeDescriptor& type_desc, break; } case TYPE_DATETIMEV2: { - vectorized::DateV2Value ts_slot; + DateV2Value ts_slot; if (!ts_slot.from_date_str(data, len)) { parse_result = StringParser::PARSE_FAILURE; break; diff --git a/be/src/exprs/bloom_filter_func.h b/be/src/exprs/bloom_filter_func.h index 330c939819..a8330250ec 100644 --- a/be/src/exprs/bloom_filter_func.h +++ b/be/src/exprs/bloom_filter_func.h @@ -416,26 +416,26 @@ struct FixedStringFindOp : public StringFindOp { } }; -struct DateTimeFindOp : public CommonFindOp { +struct DateTimeFindOp : public CommonFindOp { bool find_olap_engine(const BloomFilterAdaptor& bloom_filter, const void* data) const { - vectorized::VecDateTimeValue value; + VecDateTimeValue value; value.from_olap_datetime(*reinterpret_cast(data)); - return bloom_filter.test(Slice((char*)&value, sizeof(vectorized::VecDateTimeValue))); + return bloom_filter.test(Slice((char*)&value, sizeof(VecDateTimeValue))); } }; // avoid violating C/C++ aliasing rules. // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101684 -struct DateFindOp : public CommonFindOp { +struct DateFindOp : public CommonFindOp { bool find_olap_engine(const BloomFilterAdaptor& bloom_filter, const void* data) const { uint24_t date = *static_cast(data); uint64_t value = uint32_t(date); - vectorized::VecDateTimeValue date_value; + VecDateTimeValue date_value; date_value.from_olap_date(value); - return bloom_filter.test(Slice((char*)&date_value, sizeof(vectorized::VecDateTimeValue))); + return bloom_filter.test(Slice((char*)&date_value, sizeof(VecDateTimeValue))); } }; diff --git a/be/src/exprs/runtime_filter.cpp b/be/src/exprs/runtime_filter.cpp index aa6ec25f3f..96ca155281 100644 --- a/be/src/exprs/runtime_filter.cpp +++ b/be/src/exprs/runtime_filter.cpp @@ -747,7 +747,7 @@ public: batch_assign(in_filter, [](std::shared_ptr& set, PColumnValue& column, ObjectPool* pool) { auto& string_val_ref = column.stringval(); - vectorized::VecDateTimeValue datetime_val; + VecDateTimeValue datetime_val; datetime_val.from_date_str(string_val_ref.c_str(), string_val_ref.length()); set->insert(&datetime_val); }); @@ -888,8 +888,8 @@ public: case TYPE_DATE: { auto& min_val_ref = minmax_filter->min_val().stringval(); auto& max_val_ref = minmax_filter->max_val().stringval(); - vectorized::VecDateTimeValue min_val; - vectorized::VecDateTimeValue max_val; + VecDateTimeValue min_val; + VecDateTimeValue max_val; min_val.from_date_str(min_val_ref.c_str(), min_val_ref.length()); max_val.from_date_str(max_val_ref.c_str(), max_val_ref.length()); return _context.minmax_func->assign(&min_val, &max_val); @@ -1529,31 +1529,28 @@ void IRuntimeFilter::to_protobuf(PInFilter* filter) { return; } case TYPE_DATEV2: { - batch_copy>( - filter, it, - [](PColumnValue* column, - const vectorized::DateV2Value* value) { + batch_copy>( + filter, it, [](PColumnValue* column, const DateV2Value* value) { column->set_intval(*reinterpret_cast(value)); }); return; } case TYPE_DATETIMEV2: { - batch_copy>( + batch_copy>( filter, it, - [](PColumnValue* column, - const vectorized::DateV2Value* value) { + [](PColumnValue* column, const DateV2Value* value) { column->set_longval(*reinterpret_cast(value)); }); return; } case TYPE_DATE: case TYPE_DATETIME: { - batch_copy( - filter, it, [](PColumnValue* column, const vectorized::VecDateTimeValue* value) { - char convert_buffer[30]; - value->to_string(convert_buffer); - column->set_stringval(convert_buffer); - }); + batch_copy(filter, it, + [](PColumnValue* column, const VecDateTimeValue* value) { + char convert_buffer[30]; + value->to_string(convert_buffer); + column->set_stringval(convert_buffer); + }); return; } case TYPE_DECIMALV2: { @@ -1659,9 +1656,9 @@ void IRuntimeFilter::to_protobuf(PMinMaxFilter* filter) { case TYPE_DATE: case TYPE_DATETIME: { char convert_buffer[30]; - reinterpret_cast(min_data)->to_string(convert_buffer); + reinterpret_cast(min_data)->to_string(convert_buffer); filter->mutable_min_val()->set_stringval(convert_buffer); - reinterpret_cast(max_data)->to_string(convert_buffer); + reinterpret_cast(max_data)->to_string(convert_buffer); filter->mutable_max_val()->set_stringval(convert_buffer); return; } diff --git a/be/src/exprs/runtime_filter.h b/be/src/exprs/runtime_filter.h index a75d1b84b7..fdd3b02ad6 100644 --- a/be/src/exprs/runtime_filter.h +++ b/be/src/exprs/runtime_filter.h @@ -27,7 +27,6 @@ #include #include "common/status.h" -#include "runtime/datetime_value.h" #include "runtime/decimalv2_value.h" #include "runtime/define_primitive_type.h" #include "runtime/large_int_value.h" diff --git a/be/src/olap/in_list_predicate.h b/be/src/olap/in_list_predicate.h index 329c9b8dc0..4025016768 100644 --- a/be/src/olap/in_list_predicate.h +++ b/be/src/olap/in_list_predicate.h @@ -142,8 +142,7 @@ public: } else if constexpr (Type == TYPE_DATE) { HybridSetBase::IteratorBase* iter = hybrid_set->begin(); while (iter->has_next()) { - const vectorized::VecDateTimeValue* value = - (const vectorized::VecDateTimeValue*)(iter->get_value()); + const VecDateTimeValue* value = (const VecDateTimeValue*)(iter->get_value()); uint64_t date = value->to_olap_date(); _values->insert(&date); iter->next(); @@ -151,8 +150,7 @@ public: } else if constexpr (Type == TYPE_DATETIME) { HybridSetBase::IteratorBase* iter = hybrid_set->begin(); while (iter->has_next()) { - const vectorized::VecDateTimeValue* value = - (const vectorized::VecDateTimeValue*)(iter->get_value()); + const VecDateTimeValue* value = (const VecDateTimeValue*)(iter->get_value()); uint64_t date_time = value->to_olap_datetime(); _values->insert(&date_time); iter->next(); diff --git a/be/src/olap/rowset/segment_v2/column_reader.cpp b/be/src/olap/rowset/segment_v2/column_reader.cpp index 73cd7730fd..dd488e6e0a 100644 --- a/be/src/olap/rowset/segment_v2/column_reader.cpp +++ b/be/src/olap/rowset/segment_v2/column_reader.cpp @@ -1377,11 +1377,11 @@ void DefaultValueColumnIterator::insert_default_data(const TypeInfo* type_info, sizeof(FieldTypeTraits::CppType)); //uint24_t std::string str = FieldTypeTraits::to_string(mem_value); - vectorized::VecDateTimeValue value; + VecDateTimeValue value; value.from_date_str(str.c_str(), str.length()); value.cast_to_date(); - int64 = binary_cast(value); + int64 = binary_cast(value); dst->insert_many_data(data_ptr, data_len, n); break; } @@ -1395,11 +1395,11 @@ void DefaultValueColumnIterator::insert_default_data(const TypeInfo* type_info, std::string str = FieldTypeTraits::to_string(mem_value); - vectorized::VecDateTimeValue value; + VecDateTimeValue value; value.from_date_str(str.c_str(), str.length()); value.to_datetime(); - int64 = binary_cast(value); + int64 = binary_cast(value); dst->insert_many_data(data_ptr, data_len, n); break; } diff --git a/be/src/olap/types.h b/be/src/olap/types.h index bb54959aee..fba48f331d 100644 --- a/be/src/olap/types.h +++ b/be/src/olap/types.h @@ -1129,15 +1129,15 @@ struct FieldTypeTraits ((time_tm.tm_year + 1900) << 9) | ((time_tm.tm_mon + 1) << 5) | time_tm.tm_mday; *reinterpret_cast(buf) = value; } else { - *reinterpret_cast(buf) = doris::vectorized::MIN_DATE_V2; + *reinterpret_cast(buf) = MIN_DATE_V2; } return Status::OK(); } static std::string to_string(const void* src) { CppType tmp = *reinterpret_cast(src); - doris::vectorized::DateV2Value value = binary_cast< - CppType, doris::vectorized::DateV2Value>(tmp); + DateV2Value value = + binary_cast>(tmp); string format = "%Y-%m-%d"; string res; res.resize(12); @@ -1148,11 +1148,11 @@ struct FieldTypeTraits static void set_to_max(void* buf) { // max is 9999 * 16 * 32 + 12 * 32 + 31; - *reinterpret_cast(buf) = doris::vectorized::MAX_DATE_V2; + *reinterpret_cast(buf) = MAX_DATE_V2; } static void set_to_min(void* buf) { // min is 0 * 16 * 32 + 1 * 32 + 1; - *reinterpret_cast(buf) = doris::vectorized::MIN_DATE_V2; + *reinterpret_cast(buf) = MIN_DATE_V2; } }; @@ -1161,24 +1161,22 @@ struct FieldTypeTraits : public BaseFieldtypeTraits { static Status from_string(void* buf, const std::string& scan_key, const int precision, const int scale) { - doris::vectorized::DateV2Value datetimev2_value; + DateV2Value datetimev2_value; std::string date_format = "%Y-%m-%d %H:%i:%s.%f"; if (datetimev2_value.from_date_format_str(date_format.data(), date_format.size(), scan_key.data(), scan_key.size())) { *reinterpret_cast(buf) = datetimev2_value.to_date_int_val(); } else { - *reinterpret_cast(buf) = doris::vectorized::MIN_DATETIME_V2; + *reinterpret_cast(buf) = MIN_DATETIME_V2; } return Status::OK(); } static std::string to_string(const void* src) { CppType tmp = *reinterpret_cast(src); - doris::vectorized::DateV2Value value = - binary_cast>( - tmp); + DateV2Value value = + binary_cast>(tmp); string format = "%Y-%m-%d %H:%i:%s.%f"; string res; res.resize(30); @@ -1189,11 +1187,11 @@ struct FieldTypeTraits static void set_to_max(void* buf) { // max is 9999 * 16 * 32 + 12 * 32 + 31; - *reinterpret_cast(buf) = doris::vectorized::MAX_DATETIME_V2; + *reinterpret_cast(buf) = MAX_DATETIME_V2; } static void set_to_min(void* buf) { // min is 0 * 16 * 32 + 1 * 32 + 1; - *reinterpret_cast(buf) = doris::vectorized::MIN_DATETIME_V2; + *reinterpret_cast(buf) = MIN_DATETIME_V2; } }; diff --git a/be/src/pipeline/exec/scan_operator.cpp b/be/src/pipeline/exec/scan_operator.cpp index 3e83e8a4a7..d637dd5ee5 100644 --- a/be/src/pipeline/exec/scan_operator.cpp +++ b/be/src/pipeline/exec/scan_operator.cpp @@ -852,8 +852,8 @@ Status ScanLocalState::_change_value_range(ColumnValueRangeget_state(); diff --git a/be/src/runtime/datetime_value.h b/be/src/runtime/datetime_value.h deleted file mode 100644 index d63bb53ab7..0000000000 --- a/be/src/runtime/datetime_value.h +++ /dev/null @@ -1,50 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -#pragma once - -namespace doris { - -enum TimeUnit { - MICROSECOND, - SECOND, - MINUTE, - HOUR, - DAY, - WEEK, - MONTH, - QUARTER, - YEAR, - SECOND_MICROSECOND, - MINUTE_MICROSECOND, - MINUTE_SECOND, - HOUR_MICROSECOND, - HOUR_SECOND, - HOUR_MINUTE, - DAY_MICROSECOND, - DAY_SECOND, - DAY_MINUTE, - DAY_HOUR, - YEAR_MONTH -}; - -enum TimeType { TIME_TIME = 1, TIME_DATE = 2, TIME_DATETIME = 3 }; - -// 9999-99-99 99:99:99.999999; 26 + 1('\0') -const int MAX_DTVALUE_STR_LEN = 27; - -} // namespace doris diff --git a/be/src/runtime/fold_constant_executor.cpp b/be/src/runtime/fold_constant_executor.cpp index 793f0209d1..f3e7311266 100644 --- a/be/src/runtime/fold_constant_executor.cpp +++ b/be/src/runtime/fold_constant_executor.cpp @@ -35,7 +35,6 @@ // IWYU pragma: no_include #include "common/compiler_util.h" // IWYU pragma: keep #include "common/status.h" -#include "runtime/datetime_value.h" #include "runtime/decimalv2_value.h" #include "runtime/define_primitive_type.h" #include "runtime/descriptors.h" @@ -205,25 +204,22 @@ string FoldConstantExecutor::_get_result(void* src, size_t size, const TypeDescr } case TYPE_DATE: case TYPE_DATETIME: { - auto date_value = reinterpret_cast(src); + auto date_value = reinterpret_cast(src); char str[MAX_DTVALUE_STR_LEN]; date_value->to_string(str); return str; } case TYPE_DATEV2: { - vectorized::DateV2Value value = - binary_cast>( - *(int32_t*)src); + DateV2Value value = + binary_cast>(*(int32_t*)src); char buf[64]; char* pos = value.to_string(buf); return std::string(buf, pos - buf - 1); } case TYPE_DATETIMEV2: { - vectorized::DateV2Value value = - binary_cast>( - *(int64_t*)src); + DateV2Value value = + binary_cast>(*(int64_t*)src); char buf[64]; char* pos = value.to_string(buf, type.scale); diff --git a/be/src/runtime/fragment_mgr.cpp b/be/src/runtime/fragment_mgr.cpp index 0ebb63b180..b7b0e0b4c2 100644 --- a/be/src/runtime/fragment_mgr.cpp +++ b/be/src/runtime/fragment_mgr.cpp @@ -1083,7 +1083,7 @@ void FragmentMgr::cancel_worker() { do { std::vector to_cancel; std::vector queries_to_cancel; - vectorized::VecDateTimeValue now = vectorized::VecDateTimeValue::local_time(); + VecDateTimeValue now = VecDateTimeValue::local_time(); { std::lock_guard lock(_lock); for (auto& it : _fragment_map) { @@ -1158,7 +1158,7 @@ void FragmentMgr::debug(std::stringstream& ss) { ss << "FragmentMgr have " << _fragment_map.size() << " jobs.\n"; ss << "job_id\t\tstart_time\t\texecute_time(s)\n"; - vectorized::VecDateTimeValue now = vectorized::VecDateTimeValue::local_time(); + VecDateTimeValue now = VecDateTimeValue::local_time(); for (auto& it : _fragment_map) { ss << it.first << "\t" << it.second->start_time().debug_string() << "\t" << now.second_diff(it.second->start_time()) << "\n"; diff --git a/be/src/runtime/plan_fragment_executor.cpp b/be/src/runtime/plan_fragment_executor.cpp index 265fad8882..95e24e1ce3 100644 --- a/be/src/runtime/plan_fragment_executor.cpp +++ b/be/src/runtime/plan_fragment_executor.cpp @@ -98,7 +98,7 @@ PlanFragmentExecutor::PlanFragmentExecutor(ExecEnv* exec_env, _collect_query_statistics_with_every_batch(false), _cancel_reason(PPlanFragmentCancelReason::INTERNAL_ERROR) { _report_thread_future = _report_thread_promise.get_future(); - _start_time = vectorized::VecDateTimeValue::local_time(); + _start_time = VecDateTimeValue::local_time(); } PlanFragmentExecutor::~PlanFragmentExecutor() { @@ -431,7 +431,7 @@ Status PlanFragmentExecutor::execute() { return Status::OK(); } -bool PlanFragmentExecutor::is_timeout(const vectorized::VecDateTimeValue& now) const { +bool PlanFragmentExecutor::is_timeout(const VecDateTimeValue& now) const { if (_timeout_second <= 0) { return false; } diff --git a/be/src/runtime/plan_fragment_executor.h b/be/src/runtime/plan_fragment_executor.h index 3bfcbe005a..332c7fce59 100644 --- a/be/src/runtime/plan_fragment_executor.h +++ b/be/src/runtime/plan_fragment_executor.h @@ -111,7 +111,7 @@ public: Status execute(); - const vectorized::VecDateTimeValue& start_time() const { return _start_time; } + const VecDateTimeValue& start_time() const { return _start_time; } // Closes the underlying plan fragment and frees up all resources allocated // in open()/get_next(). @@ -146,7 +146,7 @@ public: TUniqueId query_id() const { return _query_ctx->query_id(); } - bool is_timeout(const vectorized::VecDateTimeValue& now) const; + bool is_timeout(const VecDateTimeValue& now) const; bool is_canceled() { return _runtime_state->is_cancelled(); } @@ -226,7 +226,7 @@ private: // Timeout of this instance, it is inited from query options int _timeout_second = -1; - vectorized::VecDateTimeValue _start_time; + VecDateTimeValue _start_time; // It is shared with BufferControlBlock and will be called in two different // threads. But their calls are all at different time, there is no problem of diff --git a/be/src/runtime/primitive_type.h b/be/src/runtime/primitive_type.h index 2f331b1092..32b62ebc19 100644 --- a/be/src/runtime/primitive_type.h +++ b/be/src/runtime/primitive_type.h @@ -166,22 +166,22 @@ struct PrimitiveTypeTraits { }; template <> struct PrimitiveTypeTraits { - using CppType = doris::vectorized::VecDateTimeValue; + using CppType = doris::VecDateTimeValue; using ColumnType = vectorized::ColumnVector; }; template <> struct PrimitiveTypeTraits { - using CppType = doris::vectorized::VecDateTimeValue; + using CppType = doris::VecDateTimeValue; using ColumnType = vectorized::ColumnVector; }; template <> struct PrimitiveTypeTraits { - using CppType = doris::vectorized::DateV2Value; + using CppType = DateV2Value; using ColumnType = vectorized::ColumnVector; }; template <> struct PrimitiveTypeTraits { - using CppType = doris::vectorized::DateV2Value; + using CppType = DateV2Value; using ColumnType = vectorized::ColumnVector; }; template <> diff --git a/be/src/runtime/query_context.h b/be/src/runtime/query_context.h index 24bb52b163..e3cb330368 100644 --- a/be/src/runtime/query_context.h +++ b/be/src/runtime/query_context.h @@ -27,7 +27,6 @@ #include "common/config.h" #include "common/factory_creator.h" #include "common/object_pool.h" -#include "runtime/datetime_value.h" #include "runtime/exec_env.h" #include "runtime/memory/mem_tracker_limiter.h" #include "runtime/runtime_filter_mgr.h" @@ -72,7 +71,7 @@ public: _exec_env(exec_env), _runtime_filter_mgr(new RuntimeFilterMgr(TUniqueId(), this)), _query_options(query_options) { - _start_time = vectorized::VecDateTimeValue::local_time(); + _start_time = VecDateTimeValue::local_time(); _shared_hash_table_controller.reset(new vectorized::SharedHashTableController()); _shared_scanner_controller.reset(new vectorized::SharedScannerController()); } @@ -103,7 +102,7 @@ public: ExecEnv* exec_env() { return _exec_env; } - bool is_timeout(const vectorized::VecDateTimeValue& now) const { + bool is_timeout(const VecDateTimeValue& now) const { if (timeout_second <= 0) { return false; } @@ -267,7 +266,7 @@ public: private: TUniqueId _query_id; ExecEnv* _exec_env; - vectorized::VecDateTimeValue _start_time; + VecDateTimeValue _start_time; // A token used to submit olap scanner to the "_limited_scan_thread_pool", // This thread pool token is created from "_limited_scan_thread_pool" from exec env. diff --git a/be/src/runtime/raw_value.h b/be/src/runtime/raw_value.h index b1e635ea16..e242249bf0 100644 --- a/be/src/runtime/raw_value.h +++ b/be/src/runtime/raw_value.h @@ -76,7 +76,7 @@ inline uint32_t RawValue::zlib_crc32(const void* v, size_t len, const PrimitiveT return HashUtil::zlib_crc_hash(v, 8, seed); case TYPE_DATE: case TYPE_DATETIME: { - auto* date_val = (const vectorized::VecDateTimeValue*)v; + auto* date_val = (const VecDateTimeValue*)v; char buf[64]; int len = date_val->to_buffer(buf); return HashUtil::zlib_crc_hash(buf, len, seed); diff --git a/be/src/runtime/runtime_state.cpp b/be/src/runtime/runtime_state.cpp index 110e4d2f0a..68597019c8 100644 --- a/be/src/runtime/runtime_state.cpp +++ b/be/src/runtime/runtime_state.cpp @@ -180,7 +180,7 @@ RuntimeState::RuntimeState(const TQueryGlobals& query_globals) _nano_seconds = 0; } else if (!query_globals.now_string.empty()) { _timezone = TimezoneUtils::default_time_zone; - vectorized::VecDateTimeValue dt; + VecDateTimeValue dt; dt.from_date_str(query_globals.now_string.c_str(), query_globals.now_string.size()); int64_t timestamp; dt.unix_timestamp(×tamp, _timezone); @@ -237,7 +237,7 @@ Status RuntimeState::init(const TUniqueId& fragment_instance_id, const TQueryOpt _nano_seconds = 0; } else if (!query_globals.now_string.empty()) { _timezone = TimezoneUtils::default_time_zone; - vectorized::VecDateTimeValue dt; + VecDateTimeValue dt; dt.from_date_str(query_globals.now_string.c_str(), query_globals.now_string.size()); int64_t timestamp; dt.unix_timestamp(×tamp, _timezone); diff --git a/be/src/runtime/type_limit.h b/be/src/runtime/type_limit.h index 4d9fd5e646..bae6de28c5 100644 --- a/be/src/runtime/type_limit.h +++ b/be/src/runtime/type_limit.h @@ -17,7 +17,6 @@ #pragma once -#include "runtime/datetime_value.h" #include "runtime/decimalv2_value.h" #include "vec/common/string_ref.h" @@ -72,42 +71,32 @@ struct type_limit { }; template <> -struct type_limit { - static vectorized::VecDateTimeValue min() { - return vectorized::VecDateTimeValue::datetime_min_value(); +struct type_limit { + static VecDateTimeValue min() { return VecDateTimeValue::datetime_min_value(); } + static VecDateTimeValue max() { return VecDateTimeValue::datetime_max_value(); } +}; + +template <> +struct type_limit> { + static DateV2Value min() { + uint32_t min = MIN_DATE_V2; + return binary_cast>(min); } - static vectorized::VecDateTimeValue max() { - return vectorized::VecDateTimeValue::datetime_max_value(); + static DateV2Value max() { + uint32_t max = MAX_DATE_V2; + return binary_cast>(max); } }; template <> -struct type_limit> { - static doris::vectorized::DateV2Value min() { - uint32_t min = doris::vectorized::MIN_DATE_V2; - return binary_cast>(min); +struct type_limit> { + static DateV2Value min() { + uint64_t min = MIN_DATETIME_V2; + return binary_cast>(min); } - static doris::vectorized::DateV2Value max() { - uint32_t max = doris::vectorized::MAX_DATE_V2; - return binary_cast>(max); - } -}; - -template <> -struct type_limit> { - static doris::vectorized::DateV2Value min() { - uint64_t min = doris::vectorized::MIN_DATETIME_V2; - return binary_cast>( - min); - } - static doris::vectorized::DateV2Value max() { - uint64_t max = doris::vectorized::MAX_DATETIME_V2; - return binary_cast>( - max); + static DateV2Value max() { + uint64_t max = MAX_DATETIME_V2; + return binary_cast>(max); } }; diff --git a/be/src/util/arrow/block_convertor.cpp b/be/src/util/arrow/block_convertor.cpp index 78809f8297..7f506d0311 100644 --- a/be/src/util/arrow/block_convertor.cpp +++ b/be/src/util/arrow/block_convertor.cpp @@ -129,26 +129,23 @@ public: case vectorized::TypeIndex::Date: case vectorized::TypeIndex::DateTime: { char buf[64]; - const vectorized::VecDateTimeValue* time_val = - (const vectorized::VecDateTimeValue*)(data_ref.data); + const VecDateTimeValue* time_val = (const VecDateTimeValue*)(data_ref.data); int len = time_val->to_buffer(buf); ARROW_RETURN_NOT_OK(builder.Append(buf, len)); break; } case vectorized::TypeIndex::DateV2: { char buf[64]; - const vectorized::DateV2Value* time_val = - (const vectorized::DateV2Value< - vectorized::DateV2ValueType>*)(data_ref.data); + const DateV2Value* time_val = + (const DateV2Value*)(data_ref.data); int len = time_val->to_buffer(buf); ARROW_RETURN_NOT_OK(builder.Append(buf, len)); break; } case vectorized::TypeIndex::DateTimeV2: { char buf[64]; - const vectorized::DateV2Value* time_val = - (const vectorized::DateV2Value< - vectorized::DateTimeV2ValueType>*)(data_ref.data); + const DateV2Value* time_val = + (const DateV2Value*)(data_ref.data); int len = time_val->to_buffer(buf); ARROW_RETURN_NOT_OK(builder.Append(buf, len)); break; diff --git a/be/src/util/binary_cast.hpp b/be/src/util/binary_cast.hpp index ecba899ec2..8365ef7e87 100644 --- a/be/src/util/binary_cast.hpp +++ b/be/src/util/binary_cast.hpp @@ -21,7 +21,6 @@ #include #include -#include "runtime/datetime_value.h" #include "runtime/decimalv2_value.h" #include "util/types.h" #include "vec/runtime/vdatetime_value.h" @@ -49,19 +48,19 @@ static_assert(sizeof(DecimalV2Value) == sizeof(PackedInt128)); static_assert(sizeof(DecimalV2Value) == sizeof(__int128_t)); union VecDateTimeInt64Union { - doris::vectorized::VecDateTimeValue dt; + doris::VecDateTimeValue dt; __int64_t i64; ~VecDateTimeInt64Union() {} }; union DateV2UInt32Union { - doris::vectorized::DateV2Value dt; + DateV2Value dt; uint32_t ui32; ~DateV2UInt32Union() {} }; union DateTimeV2UInt64Union { - doris::vectorized::DateV2Value dt; + DateV2Value dt; uint64_t ui64; ~DateTimeV2UInt64Union() {} }; @@ -73,28 +72,20 @@ To binary_cast(From from) { constexpr bool from_i64_to_db = match_v; constexpr bool from_db_to_i64 = match_v; constexpr bool from_db_to_u64 = match_v; - constexpr bool from_i64_to_vec_dt = - match_v; - constexpr bool from_vec_dt_to_i64 = - match_v; + constexpr bool from_i64_to_vec_dt = match_v; + constexpr bool from_vec_dt_to_i64 = match_v; constexpr bool from_i128_to_decv2 = match_v; constexpr bool from_decv2_to_i128 = match_v; - constexpr bool from_ui32_to_date_v2 = - match_v>; + constexpr bool from_ui32_to_date_v2 = match_v>; - constexpr bool from_date_v2_to_ui32 = - match_v, To, - uint32_t>; + constexpr bool from_date_v2_to_ui32 = match_v, To, uint32_t>; constexpr bool from_ui64_to_datetime_v2 = - match_v>; + match_v>; constexpr bool from_datetime_v2_to_ui64 = - match_v, - To, uint64_t>; + match_v, To, uint64_t>; static_assert(from_u64_to_db || from_i64_to_db || from_db_to_i64 || from_db_to_u64 || from_i64_to_vec_dt || from_vec_dt_to_i64 || from_i128_to_decv2 || diff --git a/be/src/util/bitmap_intersect.h b/be/src/util/bitmap_intersect.h index 75ba258d17..24700e881b 100644 --- a/be/src/util/bitmap_intersect.h +++ b/be/src/util/bitmap_intersect.h @@ -54,8 +54,7 @@ public: }; template <> -char* Helper::write_to(const vectorized::VecDateTimeValue& v, - char* dest) { +char* Helper::write_to(const VecDateTimeValue& v, char* dest) { *(int64_t*)dest = v.to_int64_datetime_packed(); dest += DATETIME_PACKED_TIME_BYTE_SIZE; *(int*)dest = v.type(); @@ -91,8 +90,7 @@ char* Helper::write_to(const std::string& v, char* dest) { // write_to end template <> -int32_t Helper::serialize_size( - const vectorized::VecDateTimeValue& v) { +int32_t Helper::serialize_size(const VecDateTimeValue& v) { return Helper::DATETIME_PACKED_TIME_BYTE_SIZE + Helper::DATETIME_TYPE_BYTE_SIZE; } @@ -113,8 +111,7 @@ int32_t Helper::serialize_size(const std::string& v) { // serialize_size end template <> -void Helper::read_from(const char** src, - vectorized::VecDateTimeValue* result) { +void Helper::read_from(const char** src, VecDateTimeValue* result) { result->from_packed_time(*(int64_t*)(*src)); *src += DATETIME_PACKED_TIME_BYTE_SIZE; if (*(int*)(*src) == TIME_DATE) { diff --git a/be/src/util/date_func.cpp b/be/src/util/date_func.cpp index 5be42d1299..a9198a249a 100644 --- a/be/src/util/date_func.cpp +++ b/be/src/util/date_func.cpp @@ -71,14 +71,14 @@ uint32_t timestamp_from_date_v2(const std::string& date_str) { if (nullptr != res) { value = ((time_tm.tm_year + 1900) << 9) | ((time_tm.tm_mon + 1) << 5) | time_tm.tm_mday; } else { - value = doris::vectorized::MIN_DATE_V2; + value = MIN_DATE_V2; } return value; } uint64_t timestamp_from_datetime_v2(const std::string& date_str) { - doris::vectorized::DateV2Value val; + DateV2Value val; std::string date_format = "%Y-%m-%d %H:%i:%s.%f"; val.from_date_format_str(date_format.data(), date_format.size(), date_str.data(), date_str.size()); diff --git a/be/src/util/datetype_cast.hpp b/be/src/util/datetype_cast.hpp index 02ab94aeee..316a0df208 100644 --- a/be/src/util/datetype_cast.hpp +++ b/be/src/util/datetype_cast.hpp @@ -52,19 +52,19 @@ template struct DateToDateValueType {}; template <> struct DateToDateValueType { - using type = vectorized::VecDateTimeValue; + using type = VecDateTimeValue; }; template <> struct DateToDateValueType { - using type = vectorized::VecDateTimeValue; + using type = VecDateTimeValue; }; template <> struct DateToDateValueType { - using type = vectorized::DateV2Value; + using type = DateV2Value; }; template <> struct DateToDateValueType { - using type = vectorized::DateV2Value; + using type = DateV2Value; }; template diff --git a/be/src/util/mysql_row_buffer.cpp b/be/src/util/mysql_row_buffer.cpp index e671ba2d01..978ca00354 100644 --- a/be/src/util/mysql_row_buffer.cpp +++ b/be/src/util/mysql_row_buffer.cpp @@ -475,10 +475,8 @@ int MysqlRowBuffer::push_datetime(const DateType& data) { pos[4] = (uchar)data.hour(); pos[5] = (uchar)data.minute(); pos[6] = (uchar)data.second(); - if constexpr (std::is_same_v> || - std::is_same_v>) { + if constexpr (std::is_same_v> || + std::is_same_v>) { int4store(pos + 7, data.microsecond()); if (data.microsecond()) { length = 11; @@ -599,21 +597,15 @@ char* MysqlRowBuffer::reserved(int64_t size) { template class MysqlRowBuffer; template class MysqlRowBuffer; -template int -MysqlRowBuffer::push_vec_datetime>( - vectorized::DateV2Value& value); -template int -MysqlRowBuffer::push_vec_datetime>( - vectorized::DateV2Value& value); -template int MysqlRowBuffer::push_vec_datetime( - vectorized::VecDateTimeValue& value); -template int -MysqlRowBuffer::push_vec_datetime>( - vectorized::DateV2Value& value); -template int -MysqlRowBuffer::push_vec_datetime>( - vectorized::DateV2Value& value); -template int MysqlRowBuffer::push_vec_datetime( - vectorized::VecDateTimeValue& value); +template int MysqlRowBuffer::push_vec_datetime>( + DateV2Value& value); +template int MysqlRowBuffer::push_vec_datetime>( + DateV2Value& value); +template int MysqlRowBuffer::push_vec_datetime(VecDateTimeValue& value); +template int MysqlRowBuffer::push_vec_datetime>( + DateV2Value& value); +template int MysqlRowBuffer::push_vec_datetime>( + DateV2Value& value); +template int MysqlRowBuffer::push_vec_datetime(VecDateTimeValue& value); } // namespace doris diff --git a/be/src/util/static_asserts.cpp b/be/src/util/static_asserts.cpp index 2493587fb8..d0e4bb717f 100644 --- a/be/src/util/static_asserts.cpp +++ b/be/src/util/static_asserts.cpp @@ -31,7 +31,7 @@ class UnusedClass { private: static_assert(sizeof(StringRef) == 16); static_assert(offsetof(StringRef, size) == 8); - static_assert(sizeof(doris::vectorized::VecDateTimeValue) == 8); + static_assert(sizeof(doris::VecDateTimeValue) == 8); }; } // namespace doris diff --git a/be/src/util/time_lut.cpp b/be/src/util/time_lut.cpp index bab5a6bdd5..9be2dec4fc 100644 --- a/be/src/util/time_lut.cpp +++ b/be/src/util/time_lut.cpp @@ -97,9 +97,9 @@ uint8_t calc_weekday(uint64_t day_nr, bool is_sunday_first_day) { uint32_t calc_daynr(uint16_t year, uint8_t month, uint8_t day) { // date_day_offet_dict range from [1900-01-01, 2039-10-24] - if (vectorized::date_day_offset_dict::can_speed_up_calc_daynr(year) && - LIKELY(vectorized::date_day_offset_dict::get_dict_init())) { - return vectorized::date_day_offset_dict::get().daynr(year, month, day); + if (date_day_offset_dict::can_speed_up_calc_daynr(year) && + LIKELY(date_day_offset_dict::get_dict_init())) { + return date_day_offset_dict::get().daynr(year, month, day); } uint32_t delsum = 0; diff --git a/be/src/vec/aggregate_functions/aggregate_function_sequence_match.cpp b/be/src/vec/aggregate_functions/aggregate_function_sequence_match.cpp index bc5b3cbb77..2953db15c5 100644 --- a/be/src/vec/aggregate_functions/aggregate_function_sequence_match.cpp +++ b/be/src/vec/aggregate_functions/aggregate_function_sequence_match.cpp @@ -25,16 +25,6 @@ #include "vec/data_types/data_type.h" #include "vec/data_types/data_type_nullable.h" -namespace doris { -namespace vectorized { -class VecDateTimeValue; -struct DateTimeV2ValueType; -struct DateV2ValueType; -template -class DateV2Value; -} // namespace vectorized -} // namespace doris - namespace doris::vectorized { template