MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / extractASTOption

Function extractASTOption

src/Storages/MergeTree/MergeTreeIndexText.cpp:1689–1704  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1687}
1688
1689ASTPtr extractASTOption(std::unordered_map<String, ASTPtr> & options, const String & option, bool is_required)
1690{
1691 auto it = options.find(option);
1692
1693 if (it != options.end())
1694 {
1695 ASTPtr ast = it->second;
1696 options.erase(it);
1697 return ast;
1698 }
1699
1700 if (is_required)
1701 throw Exception(ErrorCodes::BAD_ARGUMENTS, "Text index argument '{}' is required", option);
1702
1703 return nullptr;
1704}
1705
1706std::pair<String, ASTPtr> parseNamedArgument(const ASTFunction * ast_equal_function)
1707{

Callers 2

textIndexCreatorFunction · 0.85
textIndexValidatorFunction · 0.85

Calls 4

ExceptionClass · 0.50
findMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected