From 32637cb1b99c9310866a103dadf969518ed1ce56 Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Mon, 18 Jul 2022 06:19:16 +0000 Subject: [PATCH] Fix build --- src/Processors/Formats/Impl/AvroRowOutputFormat.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Processors/Formats/Impl/AvroRowOutputFormat.cpp b/src/Processors/Formats/Impl/AvroRowOutputFormat.cpp index dce5a928690..b63b1e7b9b1 100644 --- a/src/Processors/Formats/Impl/AvroRowOutputFormat.cpp +++ b/src/Processors/Formats/Impl/AvroRowOutputFormat.cpp @@ -179,14 +179,14 @@ AvroSerializer::SchemaWithSerializeFn AvroSerializer::createSchemaWithSerializeF if (traits->isStringAsString(column_name)) return {avro::StringSchema(), [](const IColumn & column, size_t row_num, avro::Encoder & encoder) { - const std::string_ref & s = assert_cast(column).getDataAt(row_num).toView(); + const std::string_view & s = assert_cast(column).getDataAt(row_num).toView(); encoder.encodeString(std::string(s)); } }; else return {avro::BytesSchema(), [](const IColumn & column, size_t row_num, avro::Encoder & encoder) { - const std::string_view & s = assert_cast(column).getDataAt(row_num).toString(); + const std::string_view & s = assert_cast(column).getDataAt(row_num).toView(); encoder.encodeBytes(reinterpret_cast(s.data()), s.size()); } }; @@ -343,7 +343,7 @@ AvroSerializer::SchemaWithSerializeFn AvroSerializer::createSchemaWithSerializeF auto keys_serializer = [](const IColumn & column, size_t row_num, avro::Encoder & encoder) { - const StringRef & s = column.getDataAt(row_num).toView(); + const std::string_view & s = column.getDataAt(row_num).toView(); encoder.encodeString(std::string(s)); };