clickhouse: fixed sampling [#CONV-7363].

This commit is contained in:
Michael Kolupaev 2013-05-15 11:32:31 +00:00
parent 8685024166
commit 5c386bb038

View File

@ -180,7 +180,7 @@ BlockInputStreams StorageMergeTree::read(
}
UInt64 sampling_column_max = 0;
DataTypePtr type = Expression(sampling_expression, context).getReturnTypes()[0];
DataTypePtr type = Expression(sampling_expression, context, *columns).getReturnTypes()[0];
if (type->getName() == "UInt64")
sampling_column_max = std::numeric_limits<UInt64>::max();