Hi,
This check, on every addition of an array to a column, is very expensive for enums:
//---- columns/array.cpp:
void ColumnArray::AppendAsColumn(ColumnRef array) {
if (!data_->Type()->IsEqual(array->Type())) {
throw std::runtime_error(...
//---- types/types.h:
bool IsEqual(const TypeRef& other) const { return this->GetName() == other->GetName(); }
-----^
EnumType::GetName() is walking a std::map, on every call, to generate the full enum description string: "A"=1, "B"=2, ...
I believe a 64 bit hash of whatever type info would make this comparison properly fast.
Thanks,
Yakov
Hi,
This check, on every addition of an array to a column, is very expensive for enums:
EnumType::GetName()is walking a std::map, on every call, to generate the full enum description string: "A"=1, "B"=2, ...I believe a 64 bit hash of whatever type info would make this comparison properly fast.
Thanks,
Yakov