Commit Graph

70 Commits

Author SHA1 Message Date
kssenii
ac55183d2e Null as default for insert select / with union 2021-04-22 18:11:36 +00:00
Ivan
495c6e03aa
Replace all Context references with std::weak_ptr (#22297)
* Replace all Context references with std::weak_ptr

* Fix shared context captured by value

* Fix build

* Fix Context with named sessions

* Fix copy context

* Fix gcc build

* Merge with master and fix build

* Fix gcc-9 build
2021-04-11 02:33:54 +03:00
Maxim Akhmedov
725fa17961 Introduce IStorage::distributedWrite method for distributed INSERT SELECT. 2021-04-05 02:14:27 +03:00
Nikolai Kochetov
a669f7d641 Merge branch 'master' into refactor-actions-dag 2021-03-05 18:21:14 +03:00
Nikolai Kochetov
9a39459888 Refactor ActionsDAG 2021-03-04 20:38:12 +03:00
Azat Khuzhin
456cbaf747 Distributed: Hide private part of the interface 2021-03-03 23:29:11 +03:00
Nikolai Kochetov
15921fbfcb Remove index by name from ActionsDAG 2021-03-03 23:01:07 +03:00
alexey-milovidov
263d751d64
Merge pull request #20169 from ClickHouse/no-excessive-squash-memory
Disable excessive squashing of blocks for StorageMemory #13052
2021-02-11 16:38:24 +03:00
Nikolai Kochetov
27d607a955 Respect header in addMissingDefaults 2021-02-09 22:48:34 +03:00
Alexey Milovidov
c75e34c291 Corrections 2021-02-07 05:39:53 +03:00
Alexey Milovidov
905793a7e4 Disable excessive squashing of blocks for StorageMemory #13052 2021-02-07 04:57:17 +03:00
tavplubix
49e1321df4
Merge pull request #19072 from ClickHouse/fix_19021
Fix checkpoint in PeekableReadBuffer over ConcatReadBuffer
2021-01-22 21:00:04 +03:00
Alexander Tokmakov
547c7af1b1 fix checkpoint in PeekableReadBuffer over ConcatReadBuffer 2021-01-14 17:38:59 +03:00
tavplubix
94c0433d9f
Update InterpreterInsertQuery.cpp 2021-01-13 16:55:34 +03:00
Alexey Milovidov
dab4719aac Remove some headers 2021-01-05 06:22:06 +03:00
Yatsishin Ilya
ce1e2b18a3 Fix codespell warnings. Split style checks. Update style checks docker 2020-12-24 13:17:52 +03:00
Alexey Milovidov
9be5fa9ef2 Merge branch 'master' into Enmk-Optimize_deduplicate 2020-12-20 09:57:10 +03:00
Amos Bird
2a28c127eb
Better code for real 2020-12-18 14:13:59 +08:00
Azat Khuzhin
5b3ab48861 More forward declaration for generic headers
The following headers are pretty generic, so use forward declaration as
much as possible:
- Context.h
- Settings.h
- ConnectionTimeouts.h
(Also this shows that some missing some includes -- this has been fixed)

And split ConnectionTimeouts.h into ConnectionTimeoutsContext.h (since
module part cannot be added for it, due to recursive build dependencies
that will be introduced)

Also remove Settings from the RemoteBlockInputStream/RemoteQueryExecutor
and just pass the context, since settings was passed only in speicifc
places, that can allow making a copy of Context (i.e. Copier).

Approx results (How much units will be recompiled after changing file X?):

- ConnectionTimeouts.h
  - mainline: 100

- Context.h:
  - mainline: ~800
  - patched:  415

- Settings.h:
  - mainline: 900-1K
  - patched:  440 (most of them because of the Context.h)
2020-12-12 17:43:10 +03:00
Vasily Nemkov
70ea507dae OPTIMIZE DEDUPLICATE BY columns
Extended OPTIMIZE ... DEDUPLICATE syntax to allow explicit (or implicit with asterisk/column transformers) list of columns to check for duplicates on.

Following syntax variants are now supported:

OPTIMIZE TABLE table DEDUPLICATE; -- the old one
OPTIMIZE TABLE table DEDUPLICATE BY *;
OPTIMIZE TABLE table DEDUPLICATE BY * EXCEPT colX;
OPTIMIZE TABLE table DEDUPLICATE BY * EXCEPT (colX, colY);
OPTIMIZE TABLE table DEDUPLICATE BY col1,col2,col3;
OPTIMIZE TABLE table DEDUPLICATE BY COLUMNS('column-matched-by-regex');
OPTIMIZE TABLE table DEDUPLICATE BY COLUMNS('column-matched-by-regex') EXCEPT colX;
OPTIMIZE TABLE table DEDUPLICATE BY COLUMNS('column-matched-by-regex') EXCEPT (colX, colY);

Note that * behaves just like in SELECT: MATERIALIZED, and ALIAS columns are not used for expansion.
Also, it is an error to specify empty list of columns, or write an expression that results in an empty list of columns, or deduplicate by an ALIAS column.
Column transformers other than EXCEPT are not supported.
2020-12-07 09:44:07 +03:00
Alexander Kuzmenkov
412c2fe079 Merge remote-tracking branch 'origin/master' into HEAD 2020-11-23 19:51:18 +03:00
Nikolai Kochetov
13eceff55c Remove Converting transform and step. 2020-11-17 20:16:55 +03:00
feng lv
0f9065a91f fix
fix
2020-11-11 02:15:40 +00:00
feng lv
1a34abadbc fix
fix

fix
2020-11-02 10:46:58 +00:00
feng lv
3dce3c6a21 fix 2020-11-02 05:28:37 +00:00
alesapin
c53f59dece
Merge pull request #15984 from ClickHouse/fix_insert_mv_dangling_ref
Fix possibly dangling reference to target table of MV
2020-10-21 12:13:51 +03:00
Alexander Tokmakov
de06a79738 fix possibly dangling reference when inserting into mv 2020-10-14 22:25:31 +03:00
Alexander Tokmakov
72b1339656 Revert "Revert "Write structure of table functions to metadata""
This reverts commit c65d1e5c70.
2020-10-14 15:19:29 +03:00
tavplubix
c65d1e5c70
Revert "Write structure of table functions to metadata" 2020-10-14 13:59:29 +03:00
alexey-milovidov
f60ccb4edf
Merge pull request #14295 from ClickHouse/write_structure_of_table_functions
Write structure of table functions to metadata
2020-10-13 23:56:09 +03:00
alesapin
17b86dec96 Recursive defaults 2020-10-02 15:38:50 +03:00
Alexander Tokmakov
1ca9a92b21 Merge branch 'master' into write_structure_of_table_functions 2020-09-18 21:09:23 +03:00
alexey-milovidov
882206c0b6
Update InterpreterInsertQuery.cpp 2020-09-14 16:45:32 +03:00
Amos Bird
016f707ea1
column transformers in insert select 2020-09-13 10:21:13 +08:00
Alexander Tokmakov
56695727b2 Merge branch 'master' into write_structure_of_table_functions 2020-09-01 20:15:13 +03:00
Alexander Tokmakov
3a9779adb4 slightly better code 2020-09-01 17:41:49 +03:00
Alexander Kuzmenkov
c4fc434a13
Merge pull request #14060 from azat/parallel_distributed_insert_select-2
Extend parallel_distributed_insert_select to run INSERT into local table
2020-08-26 20:37:36 +03:00
Azat Khuzhin
50a312534c Extend parallel_distributed_insert_select to run INSERT into local table
Before this patch there was:

- parallel_distributed_insert_select=1, that executes:

    INSERT INTO dist_out SELECT ... FROM underlying_dist_in

After this patch there will be:

- parallel_distributed_insert_select=2, that executes:

    INSERT INTO underlying_dist_out SELECT ... FROM underlying_dist_in

And cover the behaviour w/o integration test, by using the following
techincs:
- SYSTEM STOP DISTRIBUTED SENDS
- prefer_localhost_replica=0
2020-08-25 22:49:13 +03:00
Alexey Milovidov
1fa4978685 Make the code more clear; add comments 2020-08-24 17:29:31 +03:00
feng lv
aaedf02d2b fix conflict 2020-08-16 12:38:39 +08:00
Nikolai Kochetov
20e63d2271 Refactor Pipe [part 6] 2020-08-06 15:24:05 +03:00
feng lv
a827462f55 fix 2020-08-02 20:30:41 +08:00
feng lv
88e48168d9 fix 2020-08-02 13:35:58 +08:00
feng lv
fdf646283d fix
fix
2020-08-02 09:59:25 +08:00
feng lv
2cce811dda optimize trivial insert select
style fix

update

fix

fix

fix
2020-07-09 20:12:30 +08:00
alesapin
b9e74f4e82 Merge branch 'master' into atomic_metadata5 2020-06-22 12:03:53 +03:00
Nikolai Kochetov
8a048340b0 Fix tests. 2020-06-19 21:23:44 +03:00
Nikolai Kochetov
7bfb5c9a47 Fix build. 2020-06-18 21:40:02 +03:00
alesapin
d79982f497 Better locks in Storages 2020-06-18 19:10:47 +03:00
alesapin
dffdece350 getColumns in StorageInMemoryMetadta (only compilable) 2020-06-17 19:39:58 +03:00