mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Merge pull request #44517 from kssenii/better-error-message
Better error message if named collection does not exist
This commit is contained in:
commit
068f2f329b
@ -25,7 +25,7 @@ namespace
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
const auto & collection_name = identifier->name();
|
const auto & collection_name = identifier->name();
|
||||||
return NamedCollectionFactory::instance().tryGet(collection_name);
|
return NamedCollectionFactory::instance().get(collection_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<std::pair<std::string, Field>> getKeyValueFromAST(ASTPtr ast)
|
std::optional<std::pair<std::string, Field>> getKeyValueFromAST(ASTPtr ast)
|
||||||
|
@ -1013,6 +1013,9 @@ def test_predefined_connection_configuration(started_cluster):
|
|||||||
)
|
)
|
||||||
assert result == instance.query("SELECT number FROM numbers(10)")
|
assert result == instance.query("SELECT number FROM numbers(10)")
|
||||||
|
|
||||||
|
result = instance.query_and_get_error("SELECT * FROM s3(no_collection)")
|
||||||
|
assert "There is no named collection `no_collection`" in result
|
||||||
|
|
||||||
|
|
||||||
result = ""
|
result = ""
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user