mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-29 21:20:49 +00:00
Merge branch 'ISSUES-2581' of github.com:VadimPE/ClickHouse into ISSUES-2581
This commit is contained in:
commit
74aded610f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user