From 5d89578781a3c48d34ad02dbcbdff4a47d925186 Mon Sep 17 00:00:00 2001 From: Lloyd-Pottiger <60744015+Lloyd-Pottiger@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:42:30 +0800 Subject: [PATCH] *: fix darwin build (#9558) ref pingcap/tiflash#6233 *: fix darwin build Signed-off-by: Lloyd-Pottiger --- .../ColumnFile/ColumnFileTinyVectorIndexWriter.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dbms/src/Storages/DeltaMerge/ColumnFile/ColumnFileTinyVectorIndexWriter.cpp b/dbms/src/Storages/DeltaMerge/ColumnFile/ColumnFileTinyVectorIndexWriter.cpp index c7c61e86e5c..f7a8e014847 100644 --- a/dbms/src/Storages/DeltaMerge/ColumnFile/ColumnFileTinyVectorIndexWriter.cpp +++ b/dbms/src/Storages/DeltaMerge/ColumnFile/ColumnFileTinyVectorIndexWriter.cpp @@ -104,9 +104,10 @@ ColumnFileTinyPtr ColumnFileTinyVectorIndexWriter::buildIndexForFile( for (const auto & [col_id, index_infos] : col_indexes) { // Make sure the column_id is in the schema. - const auto cd_iter = std::find_if(column_defines.cbegin(), column_defines.cend(), [&](const auto & cd) { - return cd.id == col_id; - }); + const auto cd_iter = std::find_if( // + column_defines.cbegin(), + column_defines.cend(), + [col_id = col_id](const auto & cd) { return cd.id == col_id; }); RUNTIME_CHECK_MSG( cd_iter != column_defines.cend(), "Cannot find column_id={} in file_id={}",