mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
DictionarySource unknown column name in dictionary fix
This commit is contained in:
parent
2811a0ae7d
commit
9e5337b5d4
@ -7,6 +7,7 @@ namespace DB
|
||||
namespace ErrorCodes
|
||||
{
|
||||
extern const int LOGICAL_ERROR;
|
||||
extern const int UNSUPPORTED_METHOD;
|
||||
}
|
||||
|
||||
bool DictionarySourceCoordinator::getKeyColumnsNextRangeToRead(ColumnsWithTypeAndName & key_columns, ColumnsWithTypeAndName & data_columns)
|
||||
@ -56,7 +57,7 @@ void DictionarySourceCoordinator::initialize(const Names & column_names)
|
||||
{
|
||||
column_with_type.type = dictionary_structure.range_max->type;
|
||||
}
|
||||
else
|
||||
else if (dictionary_structure.key.has_value())
|
||||
{
|
||||
const auto & dictionary_key_attributes = *dictionary_structure.key;
|
||||
for (const auto & attribute : dictionary_key_attributes)
|
||||
@ -68,6 +69,12 @@ void DictionarySourceCoordinator::initialize(const Names & column_names)
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw Exception(ErrorCodes::UNSUPPORTED_METHOD, "No such column name {} in dictionary {}",
|
||||
column_name,
|
||||
dictionary->getDictionaryID().getNameForLogs());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user