Fix compilation errors

This commit is contained in:
achulkov2 2019-12-16 18:24:26 +03:00
parent 331e45a970
commit 3f7fba6a78
2 changed files with 17 additions and 12 deletions

View File

@ -89,11 +89,6 @@ BlockInputStreamPtr IPolygonDictionary::getBlockInputStream(const Names &, size_
throw Exception{"Reading the dictionary is not allowed", ErrorCodes::UNSUPPORTED_METHOD};
}
std::shared_ptr<const IExternalLoadable> IPolygonDictionary::clone() const
{
return std::make_shared<IPolygonDictionary>(name, dict_struct, source_ptr->clone(), dict_lifetime)
}
void IPolygonDictionary::createAttributes() {
for (size_t i = 0; i < dict_struct.attributes.size(); ++i)
{
@ -224,6 +219,15 @@ SimplePolygonDictionary::SimplePolygonDictionary(
{
}
std::shared_ptr<const IExternalLoadable> SimplePolygonDictionary::clone() const
{
return std::make_shared<SimplePolygonDictionary>(
this->name,
this->dict_struct,
this->source_ptr->clone(),
this->dict_lifetime);
}
void SimplePolygonDictionary::generate() {}
bool SimplePolygonDictionary::find(const Point &point, size_t & id) const

View File

@ -49,8 +49,6 @@ public:
BlockInputStreamPtr getBlockInputStream(const Names & column_names, size_t max_block_size) const override;
std::shared_ptr<const IExternalLoadable> clone() const override;
// TODO: Refactor design to perform stronger checks, i.e. make this an override.
void has(const Columns & key_columns, const DataTypes & key_types, PaddedPODArray<UInt8> & out) ;
@ -64,6 +62,11 @@ protected:
virtual void generate() = 0;
virtual bool find(const Point & point, size_t & id) const = 0;
const std::string name;
const DictionaryStructure dict_struct;
const DictionarySourcePtr source_ptr;
const DictionaryLifetime dict_lifetime;
private:
void createAttributes();
void blockToAttributes(const Block & block);
@ -71,11 +74,6 @@ private:
void calculateBytesAllocated();
const std::string name;
const DictionaryStructure dict_struct;
const DictionarySourcePtr source_ptr;
const DictionaryLifetime dict_lifetime;
std::map<std::string, size_t> attribute_index_by_name;
std::vector<Block> blocks;
@ -99,6 +97,9 @@ public:
const DictionaryStructure & dict_struct_,
DictionarySourcePtr source_ptr_,
DictionaryLifetime dict_lifetime_);
std::shared_ptr<const IExternalLoadable> clone() const override;
private:
void generate() override;
bool find(const Point & point, size_t & id) const override;