clickhouse: OLAP-server compatibility: development [#CONV-6318].

This commit is contained in:
Michael Kolupaev 2012-12-20 11:32:52 +00:00
parent f415b5f8e1
commit ee3cc4f815

View File

@ -184,10 +184,12 @@ std::string QueryConverter::convertAggregateFunction(const std::string & attribu
if (name == "count_non_minus_one")
return "sum((" + numeric + ") == -1 ? 0 : 1)";
if (!formatting_aggregated_attribute_map.count(attribute))
throw Exception("Cannot apply aggregate function " + name + " to attribute " + attribute, ErrorCodes::AGGREGATE_FUNCTION_NOT_APPLICABLE);
std::string format;
if (formatting_aggregated_attribute_map.count(attribute))
format = formatting_aggregated_attribute_map[attribute];
else
format = "%s";
std::string format = formatting_aggregated_attribute_map[attribute];
std::string s;
if (name == "sum")