mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
ColumnSparse: fixes for dictionaries
This commit is contained in:
parent
2afa1590e0
commit
b5b624f3d7
@ -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));
|
||||
|
@ -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;
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <Columns/ColumnDecimal.h>
|
||||
#include <Columns/ColumnString.h>
|
||||
#include <Columns/ColumnVector.h>
|
||||
#include <Columns/ColumnSparse.h>
|
||||
#include <DataStreams/IBlockInputStream.h>
|
||||
#include <DataTypes/DataTypesDecimal.h>
|
||||
#include <Core/Block.h>
|
||||
@ -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<ColumnVector<UInt64>>(key_columns[0].get());
|
||||
if (!vector_col)
|
||||
@ -543,7 +544,7 @@ static const PaddedPODArray<T> & getColumnVectorData(
|
||||
PaddedPODArray<T> & backup_storage)
|
||||
{
|
||||
bool is_const_column = isColumnConst(*column);
|
||||
auto full_column = column->convertToFullColumnIfConst();
|
||||
auto full_column = recursiveRemoveSparse(column->convertToFullColumnIfConst());
|
||||
auto vector_col = checkAndGetColumn<ColumnVector<T>>(full_column.get());
|
||||
|
||||
if (!vector_col)
|
||||
|
Loading…
Reference in New Issue
Block a user