Skip to content

Commit

Permalink
fixed NULL value for range hased dictionary range_min and range_max k…
Browse files Browse the repository at this point in the history
…eys [#CLICKHOUSE-3521]
  • Loading branch information
KochetovNicolai committed Dec 26, 2017
1 parent 5a3506e commit ca77f3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dbms/src/Dictionaries/DictionarySourceFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Block createSampleBlock(const DictionaryStructure & dict_struct)

if (dict_struct.id)
block.insert(ColumnWithTypeAndName{
ColumnUInt64::create(1), std::make_shared<DataTypeUInt64>(), dict_struct.id->name});
ColumnUInt64::create(1, 0), std::make_shared<DataTypeUInt64>(), dict_struct.id->name});

if (dict_struct.key)
{
Expand All @@ -70,7 +70,7 @@ Block createSampleBlock(const DictionaryStructure & dict_struct)
if (dict_struct.range_min)
for (const auto & attribute : { dict_struct.range_min, dict_struct.range_max })
block.insert(ColumnWithTypeAndName{
ColumnUInt16::create(1), std::make_shared<DataTypeDate>(), attribute->name});
ColumnUInt16::create(1, 0), std::make_shared<DataTypeDate>(), attribute->name});

for (const auto & attribute : dict_struct.attributes)
{
Expand Down

0 comments on commit ca77f3d

Please sign in to comment.