mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Fixed minor issues
This commit is contained in:
parent
8ea6c4b852
commit
252f7604ee
@ -136,10 +136,18 @@ void CacheDictionary<dictionary_key_type>::toParent(const PaddedPODArray<UInt64>
|
||||
{
|
||||
/// Run update on requested keys before fetch from storage
|
||||
const auto & attribute_name = hierarchical_attribute->name;
|
||||
|
||||
auto result_type = std::make_shared<DataTypeUInt64>();
|
||||
auto column = getColumnsImpl({attribute_name}, {result_type->createColumn()}, ids, {nullptr}).front();
|
||||
const auto & values = assert_cast<const ColumnVector<UInt64> &>(*column);
|
||||
out.assign(values.getData());
|
||||
auto input_column = result_type->createColumn();
|
||||
auto & input_column_typed = assert_cast<ColumnVector<UInt64> &>(*input_column);
|
||||
auto & data = input_column_typed.getData();
|
||||
data.insert(ids.begin(), ids.end());
|
||||
|
||||
auto column = getColumn({attribute_name}, result_type, {std::move(input_column)}, {result_type}, {nullptr});
|
||||
const auto & result_column_typed = assert_cast<const ColumnVector<UInt64> &>(*column);
|
||||
const auto & result_data = result_column_typed.getData();
|
||||
|
||||
out.assign(result_data);
|
||||
}
|
||||
else
|
||||
throw Exception("Hierarchy is not supported for complex key CacheDictionary", ErrorCodes::UNSUPPORTED_METHOD);
|
||||
|
@ -336,7 +336,7 @@ private:
|
||||
char * place_for_serialized_columns;
|
||||
|
||||
inline bool isDefault() const { return place_for_serialized_columns == nullptr; }
|
||||
inline bool setDefault()
|
||||
inline void setDefault()
|
||||
{
|
||||
place_for_serialized_columns = nullptr;
|
||||
allocated_size_for_columns = 0;
|
||||
|
@ -81,6 +81,7 @@ public:
|
||||
{
|
||||
attributes_to_fetch_filter[i] = true;
|
||||
attributes_default_value_providers.emplace_back(dictionary_attribute.null_value, attributes_default_values_columns[default_values_column_index]);
|
||||
++default_values_column_index;
|
||||
}
|
||||
else
|
||||
attributes_default_value_providers.emplace_back(dictionary_attribute.null_value);
|
||||
@ -172,7 +173,11 @@ static inline void insertDefaultValuesIntoColumns(
|
||||
const auto & default_value_provider = fetch_request.defaultValueProviderAtIndex(column_index);
|
||||
|
||||
if (fetch_request.shouldFillResultColumnWithIndex(column_index))
|
||||
{
|
||||
std::cerr << "insertDefaultValuesIntoColumns" << default_value_provider.getDefaultValue(row_index).dump() << std::endl;
|
||||
|
||||
column->insert(default_value_provider.getDefaultValue(row_index));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user