From a259a1ef69d83f4e7026121a3323e53303b75bf1 Mon Sep 17 00:00:00 2001 From: Michael Kolupaev Date: Fri, 18 Jan 2013 14:59:46 +0000 Subject: [PATCH] clickhouse: fixed sorting in OLAP requests [#CONV-6318]. --- dbms/src/Server/OLAPQueryConverter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbms/src/Server/OLAPQueryConverter.cpp b/dbms/src/Server/OLAPQueryConverter.cpp index e3f5fc9e4d6..39c549ebb3c 100644 --- a/dbms/src/Server/OLAPQueryConverter.cpp +++ b/dbms/src/Server/OLAPQueryConverter.cpp @@ -123,7 +123,7 @@ void QueryConverter::OLAPServerQueryToClickhouse(const QueryParseResult & query, if (i > 0) out_query += ", "; - out_query += selected_expressions[column.index]; + out_query += selected_expressions[column.index - 1]; out_query += " " + convertSortDirection(column.direction); } }