From 2e0374fbd4f6baf04ca5787b6337861301fa6a47 Mon Sep 17 00:00:00 2001 From: dmitriiut Date: Sun, 21 Apr 2019 05:33:03 +0300 Subject: [PATCH] fix WITH TIES --- dbms/src/Interpreters/InterpreterSelectQuery.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbms/src/Interpreters/InterpreterSelectQuery.cpp b/dbms/src/Interpreters/InterpreterSelectQuery.cpp index 1fb62ce7f10..0cff5abd45f 100644 --- a/dbms/src/Interpreters/InterpreterSelectQuery.cpp +++ b/dbms/src/Interpreters/InterpreterSelectQuery.cpp @@ -1547,8 +1547,8 @@ void InterpreterSelectQuery::executeUnion(Pipeline & pipeline) void InterpreterSelectQuery::executePreLimit(Pipeline & pipeline) { auto & query = getSelectQuery(); - /// If there is LIMIT and no WITH TIES - if (query.limitLength() && !query.limit_with_ties) + /// If there is LIMIT + if (query.limitLength()) { auto [limit_length, limit_offset] = getLimitLengthAndOffset(query, context); pipeline.transform([&, limit = limit_length + limit_offset](auto & stream)