dbms: purported fix

This commit is contained in:
Andrey Mironov 2014-11-14 12:30:35 +03:00
parent 52410ac7e2
commit 4a70c452a7
2 changed files with 7 additions and 1 deletions

View File

@ -164,7 +164,7 @@ protected:
injectRequiredColumns(columns);
injectRequiredColumns(pre_columns);
UncompressedCache * uncompressed_cache = use_uncompressed_cache ? storage.context.getUncompressedCache() : NULL;
UncompressedCache * uncompressed_cache = use_uncompressed_cache ? storage.context.getUncompressedCache() : nullptr;
reader.reset(new MergeTreeReader(path, owned_data_part, columns, uncompressed_cache, storage, all_mark_ranges));
if (prewhere_actions)
pre_reader.reset(new MergeTreeReader(path, owned_data_part, pre_columns, uncompressed_cache, storage,

View File

@ -168,6 +168,8 @@ public:
if (!minimum_size_column)
throw std::logic_error{"could not find a column of minimum size in MergeTree"};
minimum_size_column_name = minimum_size_column->name;
ColumnWithNameAndType column{
minimum_size_column->type->createColumn(),
minimum_size_column->type,
@ -242,6 +244,9 @@ public:
/// evaluate defaulted columns
evaluateMissingDefaults(res, columns, storage.column_defaults, storage.context);
if (!minimum_size_column_name.empty())
res.erase(minimum_size_column_name);
}
catch (const Exception & e)
{
@ -369,6 +374,7 @@ private:
bool use_uncompressed_cache;
MergeTreeData & storage;
const MarkRanges & all_mark_ranges;
String minimum_size_column_name;
void addStream(const String & name, const IDataType & type, const MarkRanges & all_mark_ranges, size_t level = 0)
{