mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Better exception messages
This commit is contained in:
parent
0b939fae5d
commit
2aaddcce18
@ -684,7 +684,7 @@ InterpreterSelectQuery::InterpreterSelectQuery(
|
||||
if (!options.only_analyze)
|
||||
{
|
||||
if (query.sampleSize() && (input_pipe || !storage || !storage->supportsSampling()))
|
||||
throw Exception(ErrorCodes::SAMPLING_NOT_SUPPORTED, "Illegal SAMPLE: table doesn't support sampling");
|
||||
throw Exception(ErrorCodes::SAMPLING_NOT_SUPPORTED, "Illegal SAMPLE: table {} doesn't support sampling", storage->getStorageID().getNameForLogs());
|
||||
|
||||
if (query.final() && (input_pipe || !storage || !storage->supportsFinal()))
|
||||
{
|
||||
|
@ -629,7 +629,7 @@ MergeTreeDataSelectSamplingData MergeTreeDataSelectExecutor::getSampling(
|
||||
|
||||
RelativeSize size_of_universum = 0;
|
||||
const auto & sampling_key = metadata_snapshot->getSamplingKey();
|
||||
DataTypePtr sampling_column_type = sampling_key.data_types[0];
|
||||
DataTypePtr sampling_column_type = sampling_key.data_types.at(0);
|
||||
|
||||
if (sampling_key.data_types.size() == 1)
|
||||
{
|
||||
|
@ -458,7 +458,7 @@ void ReadFromMerge::initializePipeline(QueryPipelineBuilder & pipeline, const Bu
|
||||
|
||||
/// If sampling requested, then check that table supports it.
|
||||
if (sampling_requested && !storage->supportsSampling())
|
||||
throw Exception(ErrorCodes::SAMPLING_NOT_SUPPORTED, "Illegal SAMPLE: table doesn't support sampling");
|
||||
throw Exception(ErrorCodes::SAMPLING_NOT_SUPPORTED, "Illegal SAMPLE: table {} doesn't support sampling", storage->getStorageID().getNameForLogs());
|
||||
|
||||
Aliases aliases;
|
||||
auto storage_metadata_snapshot = storage->getInMemoryMetadataPtr();
|
||||
|
Loading…
Reference in New Issue
Block a user