From c0de850e2d6adff4075d06eb96bbf838cbd5b6f8 Mon Sep 17 00:00:00 2001 From: Chang Chen Date: Sat, 15 Jun 2024 19:41:16 +0800 Subject: [PATCH] Fix build due to https://github.com/ClickHouse/ClickHouse/pull/60556 --- .../Storages/SubstraitSource/ExcelTextFormatFile.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cpp-ch/local-engine/Storages/SubstraitSource/ExcelTextFormatFile.cpp b/cpp-ch/local-engine/Storages/SubstraitSource/ExcelTextFormatFile.cpp index 038f280b0560..31ef5b9e1715 100644 --- a/cpp-ch/local-engine/Storages/SubstraitSource/ExcelTextFormatFile.cpp +++ b/cpp-ch/local-engine/Storages/SubstraitSource/ExcelTextFormatFile.cpp @@ -293,7 +293,12 @@ bool ExcelTextFormatReader::readField( return false; } - if (column_size == column.size()) + // See https://github.com/ClickHouse/ClickHouse/pull/60556 + // In case of failing to parse, we will always push element into nullmap. + // so, we need using nestedColumn to check if error occurs. + /// FIXME: move it to ExcelSerialization ??? + const auto nestedColumn = DB::removeNullable(column.getPtr()); + if (column_size == nestedColumn->size()) { skipErrorChars(*buf, has_quote, maybe_quote, escape, format_settings); column_back_func(column);