This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch branch-c108335-hive-sql in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-c108335-hive-sql by this push: new 8c719585d26 Fix compile (#49478) 8c719585d26 is described below commit 8c719585d267a81ffe205fbe713f72ab457c0cce Author: Socrates <suyit...@selectdb.com> AuthorDate: Tue Mar 25 19:44:07 2025 +0800 Fix compile (#49478) --- be/src/vec/functions/function_string.h | 50 ++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/be/src/vec/functions/function_string.h b/be/src/vec/functions/function_string.h index cfd6f8e845c..02661b66482 100644 --- a/be/src/vec/functions/function_string.h +++ b/be/src/vec/functions/function_string.h @@ -5017,6 +5017,56 @@ public: } } block.replace_by_position(result, std::move(result_col)); + return Status::OK(); + } + +private: + static Status handle_format_arg(const StringRef& data, const DataTypePtr& type, + fmt::dynamic_format_arg_store<fmt::printf_context>& store) { + switch (type->get_type_id()) { + case TypeIndex::Int64: + store.push_back(get_value_from_data<int64_t>(data)); + return Status::OK(); + case TypeIndex::Int32: + store.push_back(get_value_from_data<int32_t>(data)); + return Status::OK(); + case TypeIndex::Int16: + store.push_back(get_value_from_data<int16_t>(data)); + return Status::OK(); + case TypeIndex::Int8: + store.push_back(get_value_from_data<int8_t>(data)); + return Status::OK(); + case TypeIndex::UInt64: + store.push_back(get_value_from_data<uint64_t>(data)); + return Status::OK(); + case TypeIndex::UInt32: + store.push_back(get_value_from_data<uint32_t>(data)); + return Status::OK(); + case TypeIndex::UInt16: + store.push_back(get_value_from_data<uint16_t>(data)); + return Status::OK(); + case TypeIndex::UInt8: + store.push_back(get_value_from_data<uint8_t>(data)); + return Status::OK(); + case TypeIndex::Float64: + store.push_back(get_value_from_data<double>(data)); + return Status::OK(); + case TypeIndex::Float32: + store.push_back(get_value_from_data<float>(data)); + return Status::OK(); + case TypeIndex::String: + store.push_back(data.to_string()); + return Status::OK(); + default: + return Status::InvalidArgument("Unsupported printf type: {}", type->get_name()); + } + } + + template <typename T> + static T get_value_from_data(const StringRef& data) { + T value; + memcpy(&value, data.data, sizeof(value)); + return value; } }; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org