From d37f92a7e813d9397b39bb24ffc2b4861a7fe676 Mon Sep 17 00:00:00 2001 From: Yukang-Lian Date: Wed, 3 Apr 2024 15:10:12 +0800 Subject: [PATCH] 2 --- be/src/olap/delta_writer.cpp | 3 ++- be/src/olap/rowset/segment_v2/segment_writer.cpp | 2 +- be/src/vec/sink/vtablet_sink.cpp | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/be/src/olap/delta_writer.cpp b/be/src/olap/delta_writer.cpp index bf66181456faa9f..35d2a13905ce612 100644 --- a/be/src/olap/delta_writer.cpp +++ b/be/src/olap/delta_writer.cpp @@ -651,7 +651,8 @@ void DeltaWriter::_build_current_tablet_schema(int64_t index_id, _partial_update_info = std::make_shared(); _partial_update_info->init(*_tablet_schema, table_schema_param->is_partial_update(), table_schema_param->partial_update_input_columns(), - table_schema_param->is_strict_mode()); + table_schema_param->is_strict_mode(), + table_schema_param->timestamp_ms(), table_schema_param->timezone()); } void DeltaWriter::_request_slave_tablet_pull_rowset(PNodeInfo node_info) { diff --git a/be/src/olap/rowset/segment_v2/segment_writer.cpp b/be/src/olap/rowset/segment_v2/segment_writer.cpp index 558d3cfa3387f43..899147b94d67112 100644 --- a/be/src/olap/rowset/segment_v2/segment_writer.cpp +++ b/be/src/olap/rowset/segment_v2/segment_writer.cpp @@ -640,7 +640,7 @@ Status SegmentWriter::fill_missing_columns(vectorized::MutableColumns& mutable_f to_lower(_tablet_schema->column(cids_missing[i]).default_value()) .find(to_lower("CURRENT_TIMESTAMP")) != std::string::npos)) { - DateV2Value dtv; + vectorized::DateV2Value dtv; dtv.from_unixtime(_opts.rowset_ctx->partial_update_info->timestamp_ms / 1000, _opts.rowset_ctx->partial_update_info->timezone); default_value = dtv.debug_string(); diff --git a/be/src/vec/sink/vtablet_sink.cpp b/be/src/vec/sink/vtablet_sink.cpp index be940b51aa9b2b0..e03abb8844d9e24 100644 --- a/be/src/vec/sink/vtablet_sink.cpp +++ b/be/src/vec/sink/vtablet_sink.cpp @@ -973,6 +973,8 @@ Status VOlapTableSink::init(const TDataSink& t_sink) { _tuple_desc_id = table_sink.tuple_id; _schema.reset(new OlapTableSchemaParam()); RETURN_IF_ERROR(_schema->init(table_sink.schema)); + _schema->set_timestamp_ms(_state->timestamp_ms()); + _schema->set_timezone(_state->timezone()); _location = _pool->add(new OlapTableLocationParam(table_sink.location)); _nodes_info = _pool->add(new DorisNodesInfo(table_sink.nodes_info)); if (table_sink.__isset.write_single_replica && table_sink.write_single_replica) {