Fix tests with group by

This commit is contained in:
Anastasiya Rodigina 2019-05-18 15:54:04 +03:00
parent 5978ca040b
commit 63a56f4bd9

View File

@ -1510,7 +1510,7 @@ void InterpreterSelectQuery::executeOrder(Pipeline & pipeline, SelectQueryInfo &
settings.max_bytes_before_external_sort, context.getTemporaryPath());
};
if (settings.optimize_pk_order)
if (settings.optimize_pk_order && !query.groupBy())
{
if (const auto * merge_tree = dynamic_cast<const MergeTreeData *>(storage.get()))
{