Commit Graph

73 Commits

Author SHA1 Message Date
Nikolai Kochetov
a790d391c0 Merge branch 'master' into rewrite-pushing-to-views 2021-09-20 19:43:15 +03:00
Nikolai Kochetov
341553febd Fix build. 2021-09-16 20:40:42 +03:00
Nikolai Kochetov
b997214620 Rename QueryPipeline to QueryPipelineBuilder. 2021-09-14 20:48:18 +03:00
Azat Khuzhin
c99bd06195 copier: fix partition_key alias using WITH
After those changes it is not possible to add an alias for the tuple
element anymore, i.e.:

  $ clickhouse-local -q 'select ((1,2) = (1,2) as foo), foo'
  1       1
  $ clickhouse-upstream local -q 'select ((1,2) = ((1,2) as foo)), foo'
  1       (1,2)

But these can be done using WITH statement.
2021-09-12 00:15:31 +03:00
Nikolai Kochetov
66a76ab70f Rewrite PushingToViewsBlockOutputStream part 6 2021-09-03 20:29:36 +03:00
Amos Bird
dbfb699690
Asynchronously drain connections. 2021-07-19 21:53:29 +08:00
Maksim Kita
67e9b85951 Merge ext into common 2021-06-16 23:28:41 +03:00
Nikita Mikhaylov
f6932026d5 delete partition from original table in case of errors while moving 2021-06-04 14:21:47 +00:00
Nikita Mikhaylov
68c92cd93e style 2021-06-03 23:58:47 +00:00
Nikita Mikhaylov
b978405f4a fix 2021-06-03 15:50:44 +00:00
Nikita Mikhaylov
4382aac25d support for ReplicatedTable creation without arguments 2021-06-02 15:46:37 +03:00
Nikita Mikhaylov
f57863b974 fix tests 2021-06-02 01:03:08 +03:00
Nikita Mikhaylov
33dcebbb24 style 2021-05-31 17:41:35 +03:00
Nikita Mikhaylov
01511d0cbe better 2021-05-31 17:40:07 +03:00
Nikita Mikhaylov
1c548058e6 add status json 2021-05-31 17:38:55 +03:00
Nikita Mikhaylov
ac072243d6 style + enable trivial test 2021-05-31 17:38:55 +03:00
Nikita Mikhaylov
6d19dea761 better 2021-05-31 17:38:20 +03:00
Nikita Mikhaylov
e9f66a0045 delete alter table optimize 2021-05-31 17:38:20 +03:00
Nikita Mikhaylov
fa22b41d5a added allow_to_drop_target_partitions with test 2021-05-31 17:38:20 +03:00
Nikita Mikhaylov
9022646633 support copying of tables with data skipping indices 2021-05-31 17:38:20 +03:00
Nikita Mikhaylov
24af47063e allow to copy materialized and alias 2021-05-31 17:37:10 +03:00
Nikita Mikhaylov
c41cc36046 support TTL on columns 2021-05-31 17:37:10 +03:00
Nikita Mikhaylov
90ab394769 better 2021-05-31 17:37:10 +03:00
Amos Bird
264cff6415
Projections
TODO (suggested by Nikolai)

1. Build query plan fro current query (inside storage::read) up to WithMergableState
2. Check, that plan is simple enough: Aggregating - Expression - Filter - ReadFromStorage (or simplier)
3. Check, that filter is the same as filter in projection, and also expression calculates the same aggregation keys as in projection
4. Return WithMergableState if projection applies

3 will be easier to do with ActionsDAG, cause it sees all functions, and dependencies are direct (but it is possible with ExpressionActions also)

Also need to figure out how prewhere works for projections, and
row_filter_policies.

wip
2021-05-11 18:12:23 +08: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
Nikita Mikhaylov
18dc213cee
Merge pull request #21912 from songenjie/clickhouse-copier-create-destination-once
[ClickHouse][Copier] Improve copier work
2021-03-30 14:42:00 +03:00
turbo jason
22c9cb1aa3 fix code style 2021-03-23 15:35:15 +08:00
turbo jason
f4be05ca25 fix code style 2021-03-23 15:04:25 +08:00
turbo jason
6aa89d0ee3 remove duplicated code 2021-03-23 11:00:06 +08:00
turbo jason
1b1d425e42 remove duplicated code 2021-03-22 10:27:32 +08:00
turbo jason
a4d3732091 [ClickHouse][Copier] Improve copier work 2021-03-19 20:51:29 +08:00
Anton Popov
bc417cf54a refactoring of serializations 2021-03-09 17:46:52 +03:00
madianjun
198a8d3b27 Drop helping tables when the whole table is done in clickhouse-copier 2021-02-08 10:54:03 +08:00
alexey-milovidov
8c0ec5105b
Add a patch from @FishermanZzhang, #19952 2021-02-02 06:53:11 +03: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
Nikita Mikhaylov
d6dd133bee
Merge pull request #17363 from nikitamikhaylov/copier-uninitialized-var
Initialize unitialized variable
2020-11-25 15:12:42 +03:00
chenqi
302cd55f45 Fix #15235. When clickhouse-copier handle non-partitioned table, throw segfault error. 2020-11-25 11:52:00 +08:00
nikitamikhaylov
ebd51db987 better 2020-11-24 21:22:50 +03:00
nikitamikhaylov
31505fb279 done 2020-11-24 17:40:38 +03:00
Alexander Tokmakov
b94cc5c4e5 remove more stringstreams 2020-11-10 21:22:26 +03:00
Alexander Tokmakov
a8266a3d3c fix DDDL with cross-replication and Atomic 2020-09-23 21:28:59 +03:00
Alexey Milovidov
0cbbe153cd Fix typos, the last 1% 2020-08-08 04:21:04 +03:00
alexey-milovidov
e4f923097e
Update ClusterCopier.cpp 2020-08-02 01:43:43 +03:00
Alexey Milovidov
47e9ec3d58 Smaller stack frames 2020-08-01 17:55:20 +03:00
Alexey Milovidov
72257061d5 Avoid errors due to implicit int<->bool conversions when using ZK API 2020-06-12 18:09:12 +03:00
alexey-milovidov
3de876b2bc
Merge pull request #11313 from ClickHouse/fix-race-condition-cluster-copier
Fix data race in clickhouse-copier
2020-05-31 17:00:54 +03:00
Alexey Milovidov
26100b64de Remove function parameter 2020-05-30 23:30:08 +03:00
Alexey Milovidov
ff8a1c04fb Fix data race in clickhouse-copier 2020-05-30 20:53:55 +03:00
Nikolai Kochetov
134f9f2b5b Fix copier. 2020-05-30 11:07:12 +03:00
Nikolai Kochetov
96568566ee Fix copier. 2020-05-30 10:50:45 +03:00