mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-28 12:40:49 +00:00
Add some comments
This commit is contained in:
parent
36e9d71daf
commit
288005162e
@ -90,7 +90,8 @@ bool IPolygonDictionary::isInjective(const std::string &) const
|
||||
}
|
||||
|
||||
BlockInputStreamPtr IPolygonDictionary::getBlockInputStream(const Names &, size_t) const {
|
||||
// TODO: Better error message.
|
||||
// TODO: In order for this to work one would first have to support retrieving arrays from dictionaries.
|
||||
// I believe this is a separate task done by some other people.
|
||||
throw Exception{"Reading the dictionary is not allowed", ErrorCodes::UNSUPPORTED_METHOD};
|
||||
}
|
||||
|
||||
@ -152,7 +153,8 @@ void IPolygonDictionary::appendNullValue(AttributeUnderlyingType type, const Fie
|
||||
}
|
||||
}
|
||||
|
||||
void IPolygonDictionary::createAttributes() {
|
||||
void IPolygonDictionary::createAttributes()
|
||||
{
|
||||
attributes.resize(dict_struct.attributes.size());
|
||||
for (size_t i = 0; i < dict_struct.attributes.size(); ++i)
|
||||
{
|
||||
|
@ -186,6 +186,9 @@ private:
|
||||
/** Checks whether a given attribute exists and returns its index */
|
||||
size_t getAttributeIndex(const std::string & attribute_name) const;
|
||||
|
||||
/** Helper functions to retrieve and instantiate the provided null value of an attribute.
|
||||
* Since a null value is obligatory for every attribute they are simply appended to null_values defined below.
|
||||
*/
|
||||
template <typename T>
|
||||
void appendNullValueImpl(const Field & null_value);
|
||||
void appendNullValue(AttributeUnderlyingType type, const Field & value);
|
||||
@ -194,8 +197,11 @@ private:
|
||||
template <typename AttributeType, typename OutputType, typename ValueSetter, typename DefaultGetter>
|
||||
void getItemsImpl(size_t attribute_ind, const Columns & key_columns, ValueSetter && set_value, DefaultGetter && get_default) const;
|
||||
|
||||
/** A mapping from the names of the attributes to their index in the two vectors defined below. */
|
||||
std::map<std::string, size_t> attribute_index_by_name;
|
||||
/** A vector of columns storing the values of each attribute. */
|
||||
Columns attributes;
|
||||
/** A vector of null values corresponding to each attribute. */
|
||||
std::vector<std::variant<
|
||||
UInt8,
|
||||
UInt16,
|
||||
|
Loading…
Reference in New Issue
Block a user