mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 11:02:08 +00:00
dbms: change fields names for sending external tables through http [METR-10071]
This commit is contained in:
parent
8f39a1177a
commit
23e06540cb
@ -200,14 +200,14 @@ public:
|
||||
|
||||
/// Получаем параметры
|
||||
name = content.get("name", "_data");
|
||||
format = params.get("format" + name, "TabSeparated");
|
||||
format = params.get(name + "_format", "TabSeparated");
|
||||
|
||||
if (params.has("structure" + name))
|
||||
parseStructureFromStructureField(params.get("structure" + name));
|
||||
else if (params.has("types" + name))
|
||||
parseStructureFromTypesField(params.get("types" + name));
|
||||
if (params.has(name + "_structure"))
|
||||
parseStructureFromStructureField(params.get(name + "_structure"));
|
||||
else if (params.has(name + "_types"))
|
||||
parseStructureFromTypesField(params.get(name + "_types"));
|
||||
else
|
||||
throw Exception("Neither structure nor types have not been provided for external table " + name + ". Use fields structure" + name + " or types" + name + " to do so.", ErrorCodes::BAD_ARGUMENTS);
|
||||
throw Exception("Neither structure nor types have not been provided for external table " + name + ". Use fields " + name + "_structure or " + name + "_types to do so.", ErrorCodes::BAD_ARGUMENTS);
|
||||
|
||||
ExternalTableData data = getData(context);
|
||||
|
||||
|
@ -99,9 +99,9 @@ void HTTPHandler::processQuery(Poco::Net::HTTPServerRequest & request, Poco::Net
|
||||
/// Удаляем уже нененужные параметры из хранилища, чтобы впоследствии не перепутать их с натройками контекста и параметрами запроса.
|
||||
for (const auto & it : handler.names)
|
||||
{
|
||||
params.erase("format" + it);
|
||||
params.erase("types" + it);
|
||||
params.erase("structure" + it);
|
||||
params.erase(it + "_format");
|
||||
params.erase(it + "_types");
|
||||
params.erase(it + "_structure");
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user