From 1e12a84398b9fc9c5d48586d5e00558e1064a5af Mon Sep 17 00:00:00 2001 From: Royi Luo Date: Fri, 6 Sep 2024 17:04:28 -0400 Subject: [PATCH] Fix clang-tidy errors --- src/binder/bind/bind_file_scan.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/binder/bind/bind_file_scan.cpp b/src/binder/bind/bind_file_scan.cpp index 4f56f1f8a7f..67a81a9389e 100644 --- a/src/binder/bind/bind_file_scan.cpp +++ b/src/binder/bind/bind_file_scan.cpp @@ -141,13 +141,14 @@ std::unique_ptr Binder::bindFileScanSource(const BaseScanSo const bool ignoreErrors = config->getOption(CopyConstants::IGNORE_ERRORS_OPTION_NAME, CopyConstants::DEFAULT_IGNORE_ERRORS); if (ignoreErrors) { - extraDataColumns = expression_vector{}; + expression_vector columnsToAdd; for (idx_t i = 0; i < CopyConstants::WARNING_METADATA_NUM_COLUMNS; ++i) { - extraDataColumns->push_back( + columnsToAdd.push_back( createSingleColumnExpression(CopyConstants::WARNING_METADATA_COLUMN_NAMES[i], *this, LogicalType(CopyConstants::WARNING_METADATA_COLUMN_TYPES[i]))); } - KU_ASSERT(checkExtraDataColumnTypes(extraDataColumns.value())); + KU_ASSERT(checkExtraDataColumnTypes(columnsToAdd)); + extraDataColumns.emplace(std::move(columnsToAdd)); } auto info = BoundTableScanSourceInfo(func, std::move(bindData), std::move(inputColumns),