Commit Graph

381 Commits

Author SHA1 Message Date
Alexey Zatelepin
d6b82a28fd clone query when populating MaterializedView so that it is not garbled [#CLICKHOUSE-3412] 2017-11-05 20:50:12 +03:00
Alexey Milovidov
783e812eb7 Fixed error [#CLICKHOUSE-2] 2017-11-04 19:46:14 +03:00
proller
1e961cc69d Fix complex queries with GLOBAL IN and UNION ALL (#CLICKHOUSE-3356) (#1339)
* TEST only: why initQueryAnalyzer ?

* Better tests

* missing file

* Missing file

* Add test

* Test fixes

* Fixed FREEZE PARTITION: using only active data parts; acquire snapshot of parts [#CLICKHOUSE-3369].

* Removed tcp_ssl_port by default [#CLICKHOUSE-2].

* Better tests

* comment

* clean

* REmove wrong code

* clean
2017-10-13 00:28:24 +03:00
Alexey Milovidov
4bf1f39190 Fixed build [#CLICKHOUSE-2]. 2017-09-12 20:21:02 +03:00
alexey-milovidov
af323d4e16 Update InterpreterSelectQuery.cpp 2017-09-12 20:06:31 +03:00
leozhang
a80ebcdbc2 fix union all bug #1059 2017-09-12 20:06:31 +03:00
Alexey Milovidov
d29c77adea Implemented some suggestions from clang-tidy (part 3) [#CLICKHOUSE-3301]. 2017-09-08 06:47:27 +03:00
Alexey Milovidov
e9ae193870 Implemented some suggestions from clang-tidy (part 1) [#CLICKHOUSE-3301]. 2017-09-08 05:29:47 +03:00
Vitaliy Lyudvichenko
566160c048 Use FIFO lock in IStorage. [#CLICKHOUSE-3246] 2017-09-01 20:45:05 +03:00
Alexey Zatelepin
64fa3ebc58 correctly choose number of merge threads for external aggregation [#CLICKHOUSE-2] 2017-07-25 22:43:23 +03:00
Alexey Zatelepin
4866a37a2b fix selecting max_threads for MergingAggregatedBlockInputStream [#CLICKHOUSE-3156] 2017-07-18 23:40:23 +03:00
Alexey Milovidov
9406b6a5aa Get rid of ASTSet, because it is not really an AST and it lead to bugs [#CLICKHOUSE-3148]. 2017-07-15 06:48:36 +03:00
Nikolai Kochetov
75be0b81d8 removed typeid_cast from IColumn.h 2017-07-13 23:58:19 +03:00
Alexey Milovidov
032d12d431 Fixed translation error [#CLICKHOUSE-2]. 2017-07-04 15:46:31 +03:00
Alexey Milovidov
727ce48c23 Fixed error with selecting number of threads for distributed query processing [#CLICKHOUSE-3115]. 2017-07-04 00:04:10 +03:00
Alexey Zatelepin
8ee85e6440 calculate isRemote() from underlying tables of StorageMerge [#CLICKHOUSE-2911] 2017-06-15 22:24:59 +03:00
Alexey Milovidov
45c76803a9 Moved table functions to separate library; fixed errors; improved testability [#CLICKHOUSE-31]. 2017-06-10 12:04:31 +03:00
Alexey Milovidov
a77369d082 Preparation: Storages do not modify query [#CLICKHOUSE-31]. 2017-05-25 04:12:41 +03:00
Alexey Milovidov
48f65e9097 Preparation: untangling [#CLICKHOUSE-31]. 2017-05-25 00:06:29 +03:00
Alexey Milovidov
59ac7f8063 Preparation: untangle settings manipulation in InterpreterSelectQuery [#CLICKHOUSE-31]. 2017-05-24 23:25:01 +03:00
Alexey Milovidov
cb83b200cb Preparation [#CLICKHOUSE-31]. 2017-05-24 23:13:04 +03:00
Alexey Milovidov
a822dedc45 Preparations, part 2 [#CLICKHOUSE-31]. 2017-05-23 21:24:43 +03:00
Yuri Dyachenko
c6d6f2de3d add DataStreams::DistinctSortedBlockInputStream 2017-04-14 23:00:44 +03:00
f1yegor
b4c23f122a Translated comments 2017-04-02 20:37:49 +03:00
Alexey Milovidov
310736cd7e Moved headers and sources to same place [#CLICKHOUSE-3]. 2017-04-01 12:22:42 +03:00
Alexey Milovidov
09e3134bf4 Revert "Using C++17 [#CLICKHOUSE-3]."
This reverts commit 431a735efe.
2017-04-01 11:51:30 +03:00
Alexey Milovidov
ecb0b87bd8 Using C++17 [#CLICKHOUSE-3]. 2017-04-01 11:51:30 +03:00
Alexey Milovidov
137ad95929 Changed tabs to spaces in code [#CLICKHOUSE-3]. 2017-04-01 11:35:09 +03:00
Alexey Milovidov
4e67e05835 Fixed error [#CLICKHOUSE-2]. 2017-03-14 03:14:19 +03:00
Alexey Milovidov
7532a1d564 Added support for NULLS FIRST and LAST in ORDER BY [#CLICKHOUSE-2882]. 2017-03-12 15:56:59 +03:00
Artemkin Pavel
cc62477403 extra distinct pass was eliminated in case of single stream mode [#METR-23942] (#492) 2017-02-16 00:17:46 +04:00
alexey-milovidov
ed5b521110 Less dependencies 2 (#378)
* Less dependencies [#CLICKHOUSE-2].

* Less dependencies [#CLICKHOUSE-2].

* Less dependencies [#CLICKHOUSE-2].

* Less dependencies [#CLICKHOUSE-2].

* Less dependencies [#CLICKHOUSE-2].

* Less dependencies [#CLICKHOUSE-2].

* Less dependencies [#CLICKHOUSE-2].

* Less dependencies [#CLICKHOUSE-2].

* Less dependencies [#CLICKHOUSE-2].

* Less dependencies [#CLICKHOUSE-2].

* Less dependencies [#CLICKHOUSE-2].

* Less dependencies [#CLICKHOUSE-2].

* Less dependencies [#CLICKHOUSE-2].

* Less dependencies [#CLICKHOUSE-2].

* Less dependencies [#CLICKHOUSE-2].

* Less dependencies [#CLICKHOUSE-2].

* Less dependencies [#CLICKHOUSE-2].

* Less dependencies [#CLICKHOUSE-2].

* Less dependencies [#CLICKHOUSE-2].

* Less dependencies [#CLICKHOUSE-2].

* Less dependencies [#CLICKHOUSE-2].

* Less dependencies [#CLICKHOUSE-2].

* Less dependencies [#CLICKHOUSE-2].
2017-01-21 08:24:28 +04:00
Alexey Milovidov
58e5dad1a1 Squashed commit of the following:
commit e712f469a5
Author: Alexey Milovidov <milovidov@yandex-team.ru>
Date:   Sat Jan 14 11:59:13 2017 +0300

    Less dependencies [#CLICKHOUSE-2]

commit 2a00282308
Author: Alexey Milovidov <milovidov@yandex-team.ru>
Date:   Sat Jan 14 11:58:30 2017 +0300

    Less dependencies [#CLICKHOUSE-2]

commit 9e06f407c8
Author: Alexey Milovidov <milovidov@yandex-team.ru>
Date:   Sat Jan 14 11:55:14 2017 +0300

    Less dependencies [#CLICKHOUSE-2]

commit 9581620f1e
Author: Alexey Milovidov <milovidov@yandex-team.ru>
Date:   Sat Jan 14 11:54:22 2017 +0300

    Less dependencies [#CLICKHOUSE-2]

commit 2a8564c68c
Author: Alexey Milovidov <milovidov@yandex-team.ru>
Date:   Sat Jan 14 11:47:34 2017 +0300

    Less dependencies [#CLICKHOUSE-2]

commit cf60632d78
Author: Alexey Milovidov <milovidov@yandex-team.ru>
Date:   Sat Jan 14 11:40:09 2017 +0300

    Less dependencies [#CLICKHOUSE-2]

commit ee3d1dc6e0
Author: Alexey Milovidov <milovidov@yandex-team.ru>
Date:   Sat Jan 14 11:22:49 2017 +0300

    Less dependencies [#CLICKHOUSE-2]

commit 65592ef711
Author: Alexey Milovidov <milovidov@yandex-team.ru>
Date:   Sat Jan 14 11:18:17 2017 +0300

    Less dependencies [#CLICKHOUSE-2]

commit 37972c2573
Author: Alexey Milovidov <milovidov@yandex-team.ru>
Date:   Sat Jan 14 11:17:06 2017 +0300

    Less dependencies [#CLICKHOUSE-2]

commit dd909d1499
Author: Alexey Milovidov <milovidov@yandex-team.ru>
Date:   Sat Jan 14 11:16:28 2017 +0300

    Less dependencies [#CLICKHOUSE-2]

commit 3cf43266ca
Author: Alexey Milovidov <milovidov@yandex-team.ru>
Date:   Sat Jan 14 11:15:42 2017 +0300

    Less dependencies [#CLICKHOUSE-2]

commit 6731a3df96
Author: Alexey Milovidov <milovidov@yandex-team.ru>
Date:   Sat Jan 14 11:13:35 2017 +0300

    Less dependencies [#CLICKHOUSE-2]

commit 1b5727e0d5
Author: Alexey Milovidov <milovidov@yandex-team.ru>
Date:   Sat Jan 14 11:11:18 2017 +0300

    Less dependencies [#CLICKHOUSE-2]

commit bbcf726a55
Author: Alexey Milovidov <milovidov@yandex-team.ru>
Date:   Sat Jan 14 11:09:04 2017 +0300

    Less dependencies [#CLICKHOUSE-2]

commit c03b477d5e
Author: Alexey Milovidov <milovidov@yandex-team.ru>
Date:   Sat Jan 14 11:06:30 2017 +0300

    Less dependencies [#CLICKHOUSE-2]

commit 2986e2fb04
Author: Alexey Milovidov <milovidov@yandex-team.ru>
Date:   Sat Jan 14 11:05:44 2017 +0300

    Less dependencies [#CLICKHOUSE-2]

commit 5d6cdef13d
Author: Alexey Milovidov <milovidov@yandex-team.ru>
Date:   Sat Jan 14 11:04:53 2017 +0300

    Less dependencies [#CLICKHOUSE-2]

commit f2b819b25c
Author: Alexey Milovidov <milovidov@yandex-team.ru>
Date:   Sat Jan 14 11:01:47 2017 +0300

    Less dependencies [#CLICKHOUSE-2]
2017-01-14 12:00:19 +03:00
artpaul
79eb282eda fix formatting of LIMIT BY; add tests with remote() [#METR-23881] 2017-01-09 18:24:54 +05:00
Alexey Milovidov
2b4f3b5d34 Renamed method (less confusion) [#METR-2944]. 2017-01-02 23:12:12 +03:00
artpaul
333d47ee2e don't allow partial sort in case if LIMIT BY is present [#METR-23881] 2016-12-30 17:56:07 +05:00
artpaul
9cfc019a12 fix calculation of condition for skipping all block [#METR-23881] 2016-12-30 16:15:17 +05:00
artpaul
1f49735581 disable some optimization related to LIMIT clause if LIMIT BY clause is present [#METR-23881] 2016-12-29 17:53:35 +05:00
artpaul
405382b092 getAliasOrColumnName instead of getColumnName [#METR-23881] 2016-12-29 15:42:08 +05:00
artpaul
3f064d9ff7 first dirty implementation of LIMIT BY clause [#METR-23881] 2016-12-28 20:12:54 +05:00
artpaul
9bfd80b412 style of constructor init list 2016-12-27 13:33:32 +05:00
Alexey Milovidov
9018906e1a Better [#METR-2944]. 2016-11-20 15:43:20 +03:00
artpaul
e1cda4b760 move impl of common parsers to cpp 2016-11-12 22:55:40 +05:00
Alexey Milovidov
9af5ce1e3b Separate compilation of ProfileEvents; comments [#METR-23237]. 2016-10-24 05:02:37 +03:00
Alexey Milovidov
6b2755bf2a Non significant change [#METR-2944]. 2016-09-23 23:33:06 +03:00
Alexey Milovidov
130ec8b58b Compatibility with new parser and AST of tables list [#METR-2944]. 2016-07-22 23:39:28 +03:00
Alexey Milovidov
75632fe3ae Better diagnostics [#METR-21926]. 2016-06-30 23:39:35 +03:00
Alexey Milovidov
e336ba10eb Using std::shared_ptr for functions and AST [#METR-21503]. 2016-05-28 18:56:51 +03:00
Alexey Milovidov
fc65afb6f0 Using std::shared_ptr for functions and AST [#METR-21503]. 2016-05-28 18:46:03 +03:00
Alexey Milovidov
8c4abcdd43 Using std::shared_ptr for functions and AST [#METR-21503]. 2016-05-28 18:42:22 +03:00
Alexey Milovidov
3c1c9d46f7 Using std::shared_ptr for data types [#METR-21503]. 2016-05-28 15:22:22 +03:00
Alexey Milovidov
12363ed329 Added limited support for expressions in INSERT ... VALUES [#METR-20048]. 2016-02-13 09:37:19 +03:00
Alexey Milovidov
b3e4adfb6d dbms: fixed error [#METR-19758]. 2016-01-24 09:38:10 +03:00
Alexey Milovidov
e720a53cf2 dbms: return early on WHERE 0 [#METR-19758]. 2016-01-22 23:43:16 +03:00
Alexey Milovidov
ab1b725779 dbms: less dependencies [#METR-2944]. 2016-01-13 03:32:59 +03:00
Alexey Milovidov
13c7d0983a dbms: cutting dependency [#METR-2944].. 2016-01-12 00:46:36 +03:00
Andrey Mironov
9d16702f84 dbms: unconditionally move evaluation of storage ALIASes to InterpterSelectQuery [#METR-19317] 2015-12-15 17:15:06 +03:00
Alexey Milovidov
fa76a1a452 dbms: MergingAggregatedMemoryEfficientBlockInputStream: reading data in parallel [#METR-17000]. 2015-12-05 07:20:37 +03:00
Alexey Milovidov
6859f2085e dbms: fixed error with TOTALS [#METR-19259]. 2015-12-04 23:33:38 +03:00
Alexey Milovidov
0ceb0280f7 dbms: added setting 'aggregation_memory_efficient_merge_threads' [#METR-17000]. 2015-12-03 08:03:23 +03:00
Alexey Milovidov
99d7aa59b8 dbms: allowed to merge partial-aggregated streams memory-efficient in parallel [#METR-17000]. 2015-12-02 01:35:48 +03:00
Alexey Milovidov
fe8f947a43 dbms: allowed external aggregation with non-parallel aggregation [#METR-17000]. 2015-12-01 17:43:51 +03:00
Alexey Milovidov
48e840a199 dbms: external aggregation: development [#METR-17000]. 2015-11-30 22:57:46 +03:00
Alexey Milovidov
83cf1f81ec dbms: Aggregator: preparation [#METR-17000]. 2015-11-30 19:57:05 +03:00
Alexey Milovidov
2d00e5d84f dbms: SAMPLE ... OFFSET development: using rational numbers [#METR-18847]. 2015-11-20 00:34:53 +03:00
Alexey Milovidov
d21307c535 dbms: fixed error with views [#METR-18748]. 2015-11-10 23:07:38 +03:00
Alexey Arno
29dc5f91d1 Merge 2015-11-06 20:44:01 +03:00
Andrey Mironov
37ba429c1e dbms: handle ALIAS columns differently, support them in ARRAY JOIN. [#METR-18221] 2015-10-29 18:42:40 +03:00
Alexey Milovidov
23144fb2c1 Revert "dbms: fixed error with ARRAY JOIN, ORDER BY and LIMIT when no aggregation and joined arrays is not used before ORDER BY [#METR-18534]."
This reverts commit d5a33de26e7f69f65d7c056394e6a1d70b3a3f2a.
2015-10-27 03:50:01 +03:00
Alexey Milovidov
6affd9f342 dbms: fixed error with ARRAY JOIN, ORDER BY and LIMIT when no aggregation and joined arrays is not used before ORDER BY [#METR-18534]. 2015-10-23 22:05:21 +03:00
Alexey Arno
5f17c9d55d Merge 2015-10-12 17:53:16 +03:00
Alexey Milovidov
767a3c8090 dbms: fixed error with WITH TOTALS in subquery with distributed table with one shard and LIMIT [#METR-17561]. 2015-09-04 22:40:55 +03:00
Alexey Milovidov
845758e378 Merge 2015-08-03 23:12:23 +03:00
Alexey Milovidov
70f4887d74 dbms: tiny modifications [#METR-2944]. 2015-08-03 23:11:57 +03:00
Alexey Milovidov
5b0b5dc9cf dbms: added memory-efficient mode of distributed aggregation [#METR-17536]. 2015-07-31 02:41:02 +03:00
Alexey Milovidov
6acbf3db3e dbms: fixed progress bar for INSERT SELECT and CREATE AS SELECT queries [#METR-17470]. 2015-07-25 13:38:52 +03:00
Alexey Milovidov
d660d987ce dbms: FULL and RIGHT JOIN: development [#METR-15418]. 2015-07-22 22:43:09 +03:00
Alexey Milovidov
b0387d5ccf dbms: FULL and RIGHT JOINs: partial implementation [#METR-15418]. 2015-07-22 05:59:47 +03:00
Alexey Milovidov
d44cc0ca08 dbms: preparations [#METR-15418]. 2015-07-22 04:46:35 +03:00
Alexey Milovidov
71ae4a9931 dbms: preparation [#METR-15418]. 2015-07-22 03:59:22 +03:00
Alexey Milovidov
ca17e5f14a dbms: FULL and RIGHT JOIN: preparation [#METR-15418]. 2015-07-22 00:29:02 +03:00
Alexey Milovidov
45bfe8e361 dbms: fixed error with DISTINCT [#METR-17364]. 2015-07-21 00:43:53 +03:00
Alexey Milovidov
c0e029bb1b dbms: renamed ColumnWithNameAndType to ColumnWithTypeAndName for clarification [#METR-2944]. 2015-07-17 04:27:35 +03:00
Alexey Milovidov
6815bd7c00 dbms: addition to prev. revision [#METR-15553]. 2015-07-15 05:58:28 +03:00
Alexey Milovidov
bc3a0de6ab dbms: fixed GLOBAL IN inside subquery [#METR-15553]. 2015-07-15 05:52:19 +03:00
Alexey Milovidov
226731128b dbms: get rid of columns inside Context [#METR-15553]. 2015-07-15 04:26:35 +03:00
Alexey Arno
aa30036fd4 dbms: Server: Cosmetic changes that make easier to read, understand, and maintain the code that handles UNION ALL. [#METR-14099] 2015-07-13 18:02:29 +03:00
Alexey Arno
135cac6d77 dbms: Server: Performance improvement. [#METR-16778] 2015-07-11 18:16:59 +03:00
Alexey Arno
8410736612 dbms: Server: Correctly handle backward linking of SELECT queries inside UNION ALL. [#METR-16778] 2015-07-11 03:44:45 +03:00
Alexey Arno
10b695465a dbms: Server: Fixed the bug in a much nicer way: InterpreterSelectQuery does not split anymore its AST. [#METR-16778] 2015-07-10 21:26:46 +03:00
Alexey Milovidov
0719320758 dbms: improvement [#METR-2944]. 2015-06-18 05:11:05 +03:00
Alexey Milovidov
51be2693ee dbms: addition to SETTINGS [#METR-16354]. 2015-06-06 23:00:08 +03:00
Alexey Milovidov
854a2f4cc8 dbms: added optional section SETTINGS to SELECT query [#METR-16354]. 2015-06-06 00:28:04 +03:00
Alexey Milovidov
0984363b9c dbms: removed passing DataTypeFactory everywhere [#METR-16545]. 2015-05-28 06:49:28 +03:00
Alexey Milovidov
566b62854b dbms: more unform distribution of work among threads (experimental) [#METR-2944]. 2015-05-11 03:11:22 +03:00
Alexey Milovidov
c57063be27 Merge 2015-05-07 02:35:54 +03:00
Alexey Milovidov
a5afb7a863 dbms: cut dependency [#METR-2944]. 2015-05-07 02:35:37 +03:00
Alexey Arno
8ff005e909 dbms: Server: Fixed incorrect behavior with the DISTINCT keyword [#METR-14408] 2015-05-05 17:02:57 +03:00
Alexey Arno
14823c82a5 dbms: Server: Added comment. [#METR-15354] 2015-04-30 16:00:56 +03:00
Alexey Arno
999bc75dfe dbms: Server: Removed unneeded optimization (ii). [#METR-14408] 2015-04-23 16:16:42 +03:00