mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 17:41:59 +00:00
Fix build
This commit is contained in:
parent
13482af4ee
commit
32637cb1b9
@ -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<const ColumnString &>(column).getDataAt(row_num).toView();
|
||||
const std::string_view & s = assert_cast<const ColumnString &>(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<const ColumnString &>(column).getDataAt(row_num).toString();
|
||||
const std::string_view & s = assert_cast<const ColumnString &>(column).getDataAt(row_num).toView();
|
||||
encoder.encodeBytes(reinterpret_cast<const uint8_t *>(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));
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user