diff --git a/src/Columns/ColumnSparse.cpp b/src/Columns/ColumnSparse.cpp index 890bae741f7..bb9409e6860 100644 --- a/src/Columns/ColumnSparse.cpp +++ b/src/Columns/ColumnSparse.cpp @@ -85,6 +85,26 @@ bool ColumnSparse::getBool(size_t n) const return values->getBool(getValueIndex(n)); } +Float64 ColumnSparse::getFloat64(size_t n) const +{ + return values->getFloat64(getValueIndex(n)); +} + +Float32 ColumnSparse::getFloat32(size_t n) const +{ + return values->getFloat32(getValueIndex(n)); +} + +UInt64 ColumnSparse::getUInt(size_t n) const +{ + return values->getUInt(getValueIndex(n)); +} + +Int64 ColumnSparse::getInt(size_t n) const +{ + return values->getInt(getValueIndex(n)); +} + UInt64 ColumnSparse::get64(size_t n) const { return values->get64(getValueIndex(n)); diff --git a/src/Columns/ColumnSparse.h b/src/Columns/ColumnSparse.h index 591011665bb..0f1cd433884 100644 --- a/src/Columns/ColumnSparse.h +++ b/src/Columns/ColumnSparse.h @@ -62,6 +62,10 @@ public: Field operator[](size_t n) const override; void get(size_t n, Field & res) const override; bool getBool(size_t n) const override; + Float64 getFloat64(size_t n) const override; + Float32 getFloat32(size_t n) const override; + UInt64 getUInt(size_t n) const override; + Int64 getInt(size_t n) const override; UInt64 get64(size_t n) const override; StringRef getDataAt(size_t n) const override; diff --git a/src/Dictionaries/DictionaryHelpers.h b/src/Dictionaries/DictionaryHelpers.h index e4406c9a22b..285c8708b1e 100644 --- a/src/Dictionaries/DictionaryHelpers.h +++ b/src/Dictionaries/DictionaryHelpers.h @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -347,7 +348,7 @@ public: if constexpr (key_type == DictionaryKeyType::simple) { - key_columns[0] = key_columns[0]->convertToFullColumnIfConst(); + key_columns[0] = recursiveRemoveSparse(key_columns[0]->convertToFullColumnIfConst()); const auto * vector_col = checkAndGetColumn>(key_columns[0].get()); if (!vector_col) @@ -543,7 +544,7 @@ static const PaddedPODArray & getColumnVectorData( PaddedPODArray & backup_storage) { bool is_const_column = isColumnConst(*column); - auto full_column = column->convertToFullColumnIfConst(); + auto full_column = recursiveRemoveSparse(column->convertToFullColumnIfConst()); auto vector_col = checkAndGetColumn>(full_column.get()); if (!vector_col)