mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
parent
3aa5acdb35
commit
4caf2c4c33
@ -269,7 +269,7 @@ public:
|
||||
bool isFixedAndContiguous() const override { return data->isFixedAndContiguous(); }
|
||||
bool valuesHaveFixedSize() const override { return data->valuesHaveFixedSize(); }
|
||||
size_t sizeOfValueIfFixed() const override { return data->sizeOfValueIfFixed(); }
|
||||
StringRef getRawData() const override { return data->getRawData(); }
|
||||
std::string_ref getRawData() const override { return data->getRawData(); }
|
||||
|
||||
/// Not part of the common interface.
|
||||
|
||||
|
@ -71,9 +71,9 @@ public:
|
||||
data.resize_assume_reserved(data.size() - n);
|
||||
}
|
||||
|
||||
StringRef getRawData() const override
|
||||
std::string_view getRawData() const override
|
||||
{
|
||||
return StringRef(reinterpret_cast<const char*>(data.data()), byteSize());
|
||||
return {reinterpret_cast<const char*>(data.data()), byteSize()};
|
||||
}
|
||||
|
||||
StringRef getDataAt(size_t n) const override
|
||||
|
@ -209,7 +209,7 @@ public:
|
||||
|
||||
bool isFixedAndContiguous() const override { return true; }
|
||||
size_t sizeOfValueIfFixed() const override { return n; }
|
||||
StringRef getRawData() const override { return StringRef(chars.data(), chars.size()); }
|
||||
std::string_view getRawData() const override { return {chars.data(), chars.size()}; }
|
||||
|
||||
/// Specialized part of interface, not from IColumn.
|
||||
void insertString(const String & string) { insertData(string.c_str(), string.size()); }
|
||||
|
@ -332,9 +332,9 @@ public:
|
||||
bool isFixedAndContiguous() const override { return true; }
|
||||
size_t sizeOfValueIfFixed() const override { return sizeof(T); }
|
||||
|
||||
StringRef getRawData() const override
|
||||
std::string_view getRawData() const override
|
||||
{
|
||||
return StringRef(reinterpret_cast<const char*>(data.data()), byteSize());
|
||||
return {reinterpret_cast<const char*>(data.data()), byteSize()};
|
||||
}
|
||||
|
||||
StringRef getDataAt(size_t n) const override
|
||||
|
@ -507,7 +507,7 @@ public:
|
||||
[[nodiscard]] virtual bool isFixedAndContiguous() const { return false; }
|
||||
|
||||
/// If isFixedAndContiguous, returns the underlying data array, otherwise throws an exception.
|
||||
[[nodiscard]] virtual StringRef getRawData() const { throw Exception("Column " + getName() + " is not a contiguous block of memory", ErrorCodes::NOT_IMPLEMENTED); }
|
||||
[[nodiscard]] virtual std::string_view getRawData() const { throw Exception("Column " + getName() + " is not a contiguous block of memory", ErrorCodes::NOT_IMPLEMENTED); }
|
||||
|
||||
/// If valuesHaveFixedSize, returns size of value, otherwise throw an exception.
|
||||
[[nodiscard]] virtual size_t sizeOfValueIfFixed() const { throw Exception("Values of column " + getName() + " are not fixed size.", ErrorCodes::CANNOT_GET_SIZE_OF_FIELD); }
|
||||
|
@ -41,12 +41,12 @@ struct HashMethodOneNumber
|
||||
/// If the keys of a fixed length then key_sizes contains their lengths, empty otherwise.
|
||||
HashMethodOneNumber(const ColumnRawPtrs & key_columns, const Sizes & /*key_sizes*/, const HashMethodContextPtr &)
|
||||
{
|
||||
vec = key_columns[0]->getRawData().data;
|
||||
vec = key_columns[0]->getRawData().data();
|
||||
}
|
||||
|
||||
explicit HashMethodOneNumber(const IColumn * column)
|
||||
{
|
||||
vec = column->getRawData().data;
|
||||
vec = column->getRawData().data();
|
||||
}
|
||||
|
||||
/// Creates context. Method is called once and result context is used in all threads.
|
||||
@ -577,7 +577,7 @@ struct HashMethodKeysFixed
|
||||
columns_data.reset(new const char*[keys_size]);
|
||||
|
||||
for (size_t i = 0; i < keys_size; ++i)
|
||||
columns_data[i] = Base::getActualColumns()[i]->getRawData().data;
|
||||
columns_data[i] = Base::getActualColumns()[i]->getRawData().data();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -301,7 +301,7 @@ private:
|
||||
ColumnFixedString::Chars & data_to = dst.getChars();
|
||||
data_to.resize(n * rows);
|
||||
|
||||
memcpy(data_to.data(), src.getRawData().data, data_to.size());
|
||||
memcpy(data_to.data(), src.getRawData().data(), data_to.size());
|
||||
}
|
||||
|
||||
static void NO_INLINE executeToString(const IColumn & src, ColumnString & dst)
|
||||
|
@ -113,14 +113,14 @@ public:
|
||||
const auto & null_map_column = nullable_column->getNullMapColumn();
|
||||
|
||||
auto nested_column_raw_data = nested_column.getRawData();
|
||||
__msan_unpoison(nested_column_raw_data.data, nested_column_raw_data.size);
|
||||
__msan_unpoison(nested_column_raw_data.data(), nested_column_raw_data.size());
|
||||
|
||||
auto null_map_column_raw_data = null_map_column.getRawData();
|
||||
__msan_unpoison(null_map_column_raw_data.data, null_map_column_raw_data.size);
|
||||
__msan_unpoison(null_map_column_raw_data.data(), null_map_column_raw_data.size());
|
||||
}
|
||||
else
|
||||
{
|
||||
__msan_unpoison(result_column->getRawData().data, result_column->getRawData().size);
|
||||
__msan_unpoison(result_column->getRawData().data(), result_column->getRawData().size());
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -47,11 +47,11 @@ ColumnData getColumnData(const IColumn * column)
|
||||
|
||||
if (const auto * nullable = typeid_cast<const ColumnNullable *>(column))
|
||||
{
|
||||
result.null_data = nullable->getNullMapColumn().getRawData().data;
|
||||
result.null_data = nullable->getNullMapColumn().getRawData().data();
|
||||
column = & nullable->getNestedColumn();
|
||||
}
|
||||
|
||||
result.data = column->getRawData().data;
|
||||
result.data = column->getRawData().data();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user