Update MergeTreeDataSelectExecutor.cpp

This commit is contained in:
Vadim 2018-08-14 13:03:32 +03:00 committed by GitHub
parent 3c0f6ce87b
commit 537a8f0240
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -338,7 +338,7 @@ BlockInputStreams MergeTreeDataSelectExecutor::readFromParts(
if (relative_sample_size == RelativeSize(1))
relative_sample_size = 0;
if (relative_sample_offset > 0 && 0 == relative_sample_size)
if (relative_sample_offset > 0 && RelativeSize(0) == relative_sample_size)
throw Exception("Sampling offset is incorrect because no sampling", ErrorCodes::ARGUMENT_OUT_OF_BOUND);
if (relative_sample_offset > 1)
@ -389,7 +389,7 @@ BlockInputStreams MergeTreeDataSelectExecutor::readFromParts(
if (!data.sampling_expression)
throw Exception("Illegal SAMPLE: table doesn't support sampling", ErrorCodes::SAMPLING_NOT_SUPPORTED);
if (sample_factor_column_queried && relative_sample_size != 0)
if (sample_factor_column_queried && relative_sample_size != RelativeSize(0))
used_sample_factor = 1.0 / boost::rational_cast<Float64>(relative_sample_size);
RelativeSize size_of_universum = 0;