Commit Graph

1797 Commits

Author SHA1 Message Date
alesapin
fbd6f10ff7 Use default codec instead of throwing exception 2020-09-21 19:07:14 +03:00
alesapin
8517dda807 First working test 2020-09-21 17:47:10 +03:00
alesapin
4debccb7fe Almost working version 2020-09-21 17:22:13 +03:00
alesapin
a3e999784b Buildable code 2020-09-21 14:24:10 +03:00
Alexander Tokmakov
13e41cdd20 try enable atomic database by default 2020-09-21 13:55:34 +03:00
alesapin
387b97aba5 Merge branch 'master' into codecs_for_nested_types 2020-09-21 11:06:28 +03:00
alesapin
7fc5a2dae1 Some intermediate stage 2 2020-09-21 10:18:23 +03:00
alesapin
09f6a454ae Some intermediate stage 2020-09-21 10:17:58 +03:00
alexey-milovidov
3e0509af69
Merge pull request #13573 from amosbird/rms
specific ReplicatedMergeTree settings
2020-09-21 01:36:33 +03:00
alexey-milovidov
85483f8532
Merge pull request #14853 from ClickHouse/akz/optimized_index_binary_search
Optimized marks selection algorithm for continuous marks ranges
2020-09-20 19:48:45 +03:00
alexey-milovidov
f7cae4a57d
Merge pull request #14975 from ClickHouse/fix_merge_tree_settings_check
Fix check for merge tree settings sanity on server startup
2020-09-20 19:43:40 +03:00
alesapin
5ffee8808a
Alter remove column properties and TTLs (#14742) 2020-09-20 16:27:33 +03:00
alexey-milovidov
1474b80ecc
Merge pull request #15008 from ClickHouse/clang-tidy-11-without-enabling
Fix terribly wrong code
2020-09-20 02:00:54 +03:00
alexey-milovidov
cd7354117c
Update StorageJoin.cpp 2020-09-19 19:38:36 +03:00
Alexander Tokmakov
de540c6955 minor fixes 2020-09-19 15:59:37 +03:00
Alexey Milovidov
76147cc0c1 Generate ya.make 2020-09-19 15:52:17 +03:00
Alexey Milovidov
3003ebabc2 Merge branch 'master' into Vxider-disable_set_and_join_persistency 2020-09-19 15:51:40 +03:00
alexey-milovidov
eb9ee723c3
Merge pull request #11913 from ClickHouse/compact-parts-by-default
Enable compact parts by default for small parts
2020-09-19 15:31:15 +03:00
Alexey Milovidov
4d06bc62b1 Allow concurrent reads while writing to TinyLog 2020-09-19 14:02:11 +03:00
Alexey Milovidov
111acdc63b Continuation 2020-09-19 14:02:11 +03:00
Alexey Milovidov
bc8fc3e280 Simplification 2020-09-19 14:02:11 +03:00
Alexey Milovidov
66ea3c0c43 Remove useless method 2020-09-19 14:02:11 +03:00
Alexey Milovidov
8193da847b Simplification 2020-09-19 14:02:11 +03:00
Alexey Milovidov
3bb0088c86 Whitespace 2020-09-19 14:02:11 +03:00
Alexey Milovidov
dc7e3b75d3 Whitespace 2020-09-19 14:02:11 +03:00
Alexey Milovidov
8a8284ce31 Avoid deadlocks in Log/TinyLog 2020-09-19 14:02:11 +03:00
alexey-milovidov
1fcebce926
Merge pull request #15000 from Jokser/disable-ttl-move-on-insert
Option to disable TTL move on data part insert
2020-09-19 13:45:02 +03:00
alexey-milovidov
3463d97f8c
Merge pull request #14973 from amosbird/bm2
Ignore key constraints when doing mutations.
2020-09-19 13:44:30 +03:00
Alexey Milovidov
ef5363b87f Fix terribly wrong code 2020-09-19 02:05:13 +03:00
alexey-milovidov
4e77c2e48e
Update MergeTreeDataMergerMutator.cpp 2020-09-19 01:29:31 +03:00
Alexey Milovidov
24b334258b Resolve review comment 2020-09-18 22:25:56 +03:00
Alexey Milovidov
e1ffa07a39 Resolve review comments 2020-09-18 22:08:53 +03:00
Alexey Milovidov
21ca9fce63 Merge branch 'master' into storages-small-improvements 2020-09-18 22:03:19 +03:00
Amos Bird
d842cb704f
Allow mutations to work with key constraints. 2020-09-19 02:40:02 +08:00
Alexander Tokmakov
1ca9a92b21 Merge branch 'master' into write_structure_of_table_functions 2020-09-18 21:09:23 +03:00
Pavel Kovalenko
da04a130ed Add option to disable ttl move on data part insert - minor fixes. 2020-09-18 20:45:30 +03:00
Pavel Kovalenko
6b4b5898a7 Renaming. 2020-09-18 18:41:14 +03:00
Pavel Kovalenko
0da19ab46d Add option to disable ttl move on data part insert 2020-09-18 18:30:00 +03:00
alesapin
e38b537017
Merge pull request #11684 from ClickHouse/manual-write-duplicate-parts-to-replicas
Don't ignore duplicate parts written to replicas
2020-09-18 16:50:00 +03:00
Alexander Kazakov
1ee2e3d2b3 Review fix 2020-09-18 16:03:48 +03:00
Vxider
c9249f77c7 rename persistency to persistent 2020-09-18 20:58:27 +08:00
Vxider
0c535062fc rename disable_persistency to persistency 2020-09-18 20:48:55 +08:00
alesapin
e96a3ac5f3 DataType in enumerate streams 2020-09-18 14:37:58 +03:00
Vitaly Baranov
f43714cd76
Merge pull request #14880 from vitlibar/fix-removing-live-view-after-watching
Fix removing a live view after watching and after timeout has passed.
2020-09-18 14:17:44 +03:00
Nikolai Kochetov
c7aff19937
Merge pull request #14221 from hagen1778/settings-leaf-limits
[settings]: introduce new query complexity settings for leaf-nodes
2020-09-18 14:05:10 +03:00
alesapin
96a693baec Better message 2020-09-18 10:46:23 +03:00
alesapin
e6914acb3b Fix check for merge tree settings on server startup 2020-09-18 10:44:17 +03:00
alesapin
3536ac1b17
Merge pull request #14926 from ClickHouse/better-drop-replicated-table
Better drop for Replicated tables
2020-09-18 09:51:39 +03:00
roman
ddca262fe6 fix review comments 2020-09-17 20:54:21 +01:00
Alexey Milovidov
7fb4dfea2c Small improvements for IStorage::rename 2020-09-17 22:50:43 +03:00
alesapin
447205c525 More comments 2020-09-17 22:30:45 +03:00
alesapin
dc677b93fb Comments and fix test 2020-09-17 22:30:17 +03:00
alexey-milovidov
7152fec241
Update JoinSettings.cpp 2020-09-17 21:24:14 +03:00
alesapin
b07c00ef7c Ugly, but probably working implementation 2020-09-17 18:33:50 +03:00
alexey-milovidov
84eece69ba
Merge pull request #14876 from amosbird/ns
Get rid of query settings after initialization.
2020-09-17 17:49:25 +03:00
Alexey Milovidov
c1e9ce2cf2 Remove questionable code 2020-09-17 17:38:06 +03:00
Alexander Kuzmenkov
fb64cf210a straighten the protocol version 2020-09-17 17:37:29 +03:00
Vitaly Baranov
3356d75b23
Merge pull request #13156 from azat/cluster-secure
Secure inter-cluster query execution (with initial_user as current query user) [v3]
2020-09-17 17:11:00 +03:00
alesapin
d09fd8ca8b Add comment 2020-09-17 17:01:17 +03:00
alesapin
6601f4f786 Better errors, fix merge 2020-09-17 15:10:06 +03:00
alesapin
6c369c8dc6 Fix merge error 2020-09-17 15:01:03 +03:00
Alexey Milovidov
a5560cd62d Better drop replicated tables 2020-09-17 14:27:17 +03:00
alesapin
40b2f203b6 Merge branch 'master' into manual-write-duplicate-parts-to-replicas 2020-09-17 13:21:00 +03:00
roman
b41421cb1c [settings]: introduce new query complexity settings for leaf-nodes
The new setting should allow to control query complexity on leaf nodes
excluding the final merging stage on the root-node. For example, distributed
query that reads 1k rows from 5 shards will breach the `max_rows_to_read=5000`,
while effectively every shard reads only 1k rows. With setting `max_rows_to_read_leaf=1500`
this limit won't be reached and query will succeed since every shard reads
not more that ~1k rows.
2020-09-17 10:37:05 +01:00
alesapin
f104c382f8
Merge pull request #14887 from azat/StorageFile-write-to-fd
Fix SIGSEGV for an attempt to INSERT into StorageFile(fd)
2020-09-17 10:25:02 +03:00
alesapin
5f9e7ed169
Merge pull request #14834 from ClickHouse/fix_compression_codec_perf
Fix performance degradation during parts selection for merge
2020-09-17 10:09:41 +03:00
alesapin
73544a3781
Merge pull request #14845 from ClickHouse/fix_alias_array
Fix recursive column defaults
2020-09-17 10:02:39 +03:00
Azat Khuzhin
138e953429 Fix SIGSEGV for an attempt to INSERT into StorageFile(fd) 2020-09-17 01:26:34 +03:00
Anton Popov
8e9828d2ff Merge remote-tracking branch 'upstream/master' into HEAD 2020-09-16 21:07:35 +03:00
Alexey Milovidov
26eb49b48d Fix typo 2020-09-16 20:02:55 +03:00
Amos Bird
96a202c0fb
Get rid of query settings after initialization. 2020-09-16 22:35:39 +08:00
alesapin
cbe85327e2 Check stack size 2020-09-16 16:24:07 +03:00
Vitaly Baranov
d99a011d07 Fix removing a live view after watching and after timeout has passed. 2020-09-16 15:53:58 +03:00
alesapin
97baa67f2b
Merge pull request #14839 from Jokser/distributed-storage-multiple-volumes
Don't throw exception if Distributed storage has multi-volume storage policy configuration
2020-09-16 10:13:14 +03:00
Nikolai Kochetov
13edfeea1f Fix build. 2020-09-15 20:23:49 +03:00
Nikolai Kochetov
e29f27e333
Merge pull request #14815 from ClickHouse/storage-read-query-plan
Return query plan from storage.
2020-09-15 18:34:11 +03:00
Vitaly Baranov
74d5b43fe6
Merge pull request #14828 from vitlibar/change-columns-of-system-user-directories
Add 'params' column to system.user_directories table.
2020-09-15 18:25:50 +03:00
Alexander Kazakov
7465e00163 Optimized marks selection algorithm for continuous marks ranges 2020-09-15 17:22:32 +03:00
alesapin
e20c54998c Better exception on non physical columns 2020-09-15 16:29:11 +03:00
Anton Popov
3e855daefd Merge remote-tracking branch 'upstream/master' into HEAD 2020-09-15 15:31:29 +03:00
alesapin
8828a78174 Fix alias on default columns 2020-09-15 14:17:58 +03:00
Vxider
e136eba3f8 fix style check 2020-09-15 18:58:16 +08:00
Nikolai Kochetov
6eac433c55 Review fixes. 2020-09-15 13:40:39 +03:00
Artem Zuikov
51ba12c2c3
Try speedup build (#14809) 2020-09-15 12:55:57 +03:00
Nikolai Kochetov
c1f61984e5
Merge pull request #14513 from amosbird/mf1
Binary operator monotonicity
2020-09-15 12:45:23 +03:00
Pavel Kovalenko
01ab28a182 Don't throw exception if Distributed storage has multi-volume storage policy configuration. 2020-09-15 12:26:56 +03:00
Nikolai Kochetov
8c2aa7ce8c Added comment. 2020-09-15 12:22:45 +03:00
Vxider
1c82d2eb23 use table-level setting 2020-09-15 17:16:10 +08:00
alesapin
6f8da7dfdf Merge branch 'master' into fix_compression_codec_perf 2020-09-15 09:59:45 +03:00
Vitaly Baranov
0f53b449fd Add 'params' column to system.user_directories table. 2020-09-15 01:51:53 +03:00
Azat Khuzhin
0159c74f21 Secure inter-cluster query execution (with initial_user as current query user) [v3]
Add inter-server cluster secret, it is used for Distributed queries
inside cluster, you can configure in the configuration file:

  <remote_servers>
      <logs>
          <shard>
              <secret>foobar</secret> <!-- empty -- works as before -->
              ...
          </shard>
      </logs>
  </remote_servers>

And this will allow clickhouse to make sure that the query was not
faked, and was issued from the node that knows the secret. And since
trust appeared it can use initial_user for query execution, this will
apply correct *_for_user (since with inter-server secret enabled, the
query will be executed from the same user on the shards as on initator,
unlike "default" user w/o it).

v2: Change user to the initial_user for Distributed queries if secret match
v3: Add Protocol::Cluster package
v4: Drop Protocol::Cluster and use plain Protocol::Hello + user marker
v5: Do not use user from Hello for cluster-secure (superfluous)
2020-09-15 01:36:28 +03:00
Alexander Tokmakov
da6beb1a91 Merge branch 'master' into enable_some_tests_with_database_atomic 2020-09-14 23:00:14 +03:00
alesapin
e96256d367 Trying to improve performance 2020-09-14 22:15:25 +03:00
Nikita Mikhaylov
ddea62211d
Merge pull request #11948 from CurtizJ/fsync-parts
Experiment. Allow to turn on fsync on inserts, merges and fetches.
2020-09-14 22:37:14 +04:00
Nikolai Kochetov
bcfc83022a Return query plan from storage. 2020-09-14 17:13:58 +03:00
Vxider
407bccdefa Support default arguments for Replicated engine 2020-09-14 15:46:27 +08:00
alesapin
06575970aa
Merge pull request #14705 from amosbird/misc1
Add merge_algorithm to system.merges
2020-09-14 09:58:30 +03:00
Vxider
b5498e6ed2 update code style 2020-09-14 09:39:32 +08:00
Vxider
cbf8282701 add disable_set_and_join_persistency 2020-09-13 23:11:18 +08:00
Amos Bird
5cc8fd395c
Fix empty key segfault 2020-09-13 21:55:16 +08:00
Amos Bird
34b9547ce1
Binary operator monotonicity 2020-09-13 21:55:12 +08:00
Amos Bird
c2d79bc5cc
Add merge_algorithm to system.merges 2020-09-13 10:00:03 +08:00
Vitaly Baranov
70b0fe88b1
Merge pull request #14604 from vitlibar/no-detach-threads-2
Use join() instead of detach() for threads #2
2020-09-12 02:07:46 +03:00
alesapin
2c4047b280 Revert accident changes 2020-09-11 20:07:00 +03:00
alesapin
6dd75182f0 Better 2020-09-11 20:04:55 +03:00
alesapin
a4c43e51b9 Add a test 2020-09-11 20:04:55 +03:00
alesapin
a5f8899874 First implementation 2020-09-11 20:04:55 +03:00
Anton Popov
a64331d79f fix syncing of WAL 2020-09-11 16:09:26 +03:00
tavplubix
1f47b1ff6b
Merge pull request #14704 from ClickHouse/fix_misleading_message_uuid_macro
Fix misleading exception message about uuid macro
2020-09-11 12:45:32 +03:00
Anton Popov
f2a5216e97 add waiting for fsync in WAL 2020-09-11 02:28:50 +03:00
Anton Popov
af4089c606 Merge remote-tracking branch 'upstream/master' into HEAD 2020-09-11 00:39:21 +03:00
tavplubix
4581e3a18a
Merge pull request #14563 from bharatnc/ncb/zk-conn-fail-do-cleanup
ReplicatedMergeTree - cleanup data directory after Zookeeper exceptions
2020-09-10 19:19:57 +03:00
bharatnc
3b3b7bd5e7 minor changes to comment 2020-09-10 09:09:48 -07:00
tavplubix
a6c9dd0465
Merge pull request #14664 from ClickHouse/fix_missed_database_when_altering_mv
Fix missed database name when altering MaterializedView
2020-09-10 17:55:31 +03:00
Alexander Tokmakov
f19f02028b fix misleading exception message about uuid macro 2020-09-10 17:50:10 +03:00
Alexander Tokmakov
20b3823770 do not remove directory on attach 2020-09-10 13:21:13 +03:00
Anton Popov
b9bf67b6ac allow to randomize part type in MergeTree 2020-09-10 04:27:36 +03:00
Alexander Tokmakov
7080d56470 fix missed database name when altering mv 2020-09-09 22:59:34 +03:00
Vitaly Baranov
2a9ab48279 Use join() instead of detach() for the no_users_thread in StorageLiveView. 2020-09-09 22:39:27 +03:00
Alexander Tokmakov
dee1fefeb4 add more tests 2020-09-09 20:39:49 +03:00
bharatnc
fe6d6f16ea Merge remote-tracking branch 'upstream/master' into ncb/zk-conn-fail-do-cleanup 2020-09-09 09:25:34 -07:00
alesapin
bd14c79b0b
Merge pull request #14494 from ClickHouse/recompression_in_background
Recompression TTL
2020-09-09 17:46:01 +03:00
Alexander Tokmakov
d278d849e4 Merge branch 'master' into write_structure_of_table_functions 2020-09-09 17:12:35 +03:00
Alexander Tokmakov
b68782d285 enable more tests with Atomic database 2020-09-09 16:32:50 +03:00
Winter Zhang
3d1d64ec60
Fix currentDatabase function cannot be used in ON CLUSTER ddl query. (#14211) 2020-09-09 12:58:59 +03:00
Anton Popov
32135d96f9
Merge pull request #12183 from CurtizJ/polymorphic-parts-2
Support codecs in compact parts
2020-09-09 12:34:13 +03:00
alesapin
485b104898 Use max ttl and add introspection to system parts about recompression 2020-09-09 12:15:42 +03:00
alesapin
a696cf12f6 Merge branch 'master' into recompression_in_background 2020-09-09 10:12:03 +03:00
bharatnc
f37814b367 Merge remote-tracking branch 'upstream/master' into ncb/zk-conn-fail-do-cleanup 2020-09-08 23:45:20 -07:00
alexey-milovidov
f2e9a09b11
Merge pull request #14585 from ClickHouse/join-processor
Remove Join from ExpressionActions
2020-09-08 23:56:09 +03:00
Anton Popov
a419267dc6 minor fixes 2020-09-08 19:28:49 +03:00
robot-clickhouse
8def718661 Auto version update to [20.10.1.1] [54440] 2020-09-08 17:04:41 +03:00
alesapin
f0f7f2b5d2 Merge branch 'master' into recompression_in_background 2020-09-08 15:43:37 +03:00
alesapin
6ad91d1018
Merge pull request #14490 from ClickHouse/control_ttl_merges_in_pool
Control ttl merges in pool
2020-09-08 15:42:20 +03:00
Nikolai Kochetov
39aad9979a Remove Join from ExpressionActions. 2020-09-08 13:40:53 +03:00
Ilya Yatsishin
11a247d2f4
Merge pull request #14556 from ClickHouse/fix-arcadia-2
Lower binary size in "Arcadia" build
2020-09-08 12:08:35 +03:00
Nikolai Kochetov
c3eeb8f71e
Merge pull request #14412 from ClickHouse/pipes-and-creating-sets
Pipes and creating sets
2020-09-08 10:47:56 +03:00
alesapin
4364bff3bc
Merge pull request #12761 from kssenii/rabbitmq-improvements
RabbitMQ improvements
2020-09-08 09:38:25 +03:00
alesapin
8ff0aedebe Merge branch 'control_ttl_merges_in_pool' into recompression_in_background 2020-09-08 09:34:03 +03:00
alesapin
405a204514 Lower timeout for TTL merges 2020-09-08 09:33:00 +03:00
alesapin
f4846e2ef1
Update src/Storages/MergeTree/ReplicatedMergeTreeQueue.cpp
Co-authored-by: Anton Popov <pad11rus@gmail.com>
2020-09-08 09:30:54 +03:00
bharatnc
0c00b992d5 StorageReplicatedMergeTree - cleanup data dir after Zk exceptions
It's possible for `getZooKeeper()` to timeout if  zookeeper host(s) can't
be reached. In such cases `Poco::Exception` is thrown after a connection
timeout - refer to `src/Common/ZooKeeper/ZooKeeperImpl.cpp:866` for more info.

Side effect of this is that the CreateQuery gets interrupted and it exits.
But the data Directories for the tables being created aren't cleaned up.
This unclean state will hinder table creation on any retries and will
complain that the Directory for table already exists.

To achieve a clean state on failed table creations, catch this error if
the exception is of type Poco::Exception and call `dropIfEmpty()` method,
then proceed throwing the exception. Without this, the Directory for the
tables need to be manually deleted before retrying the CreateQuery.
2020-09-07 18:09:09 -07:00
Alexey Milovidov
e3924b8057 Fix "Arcadia" 2020-09-08 01:14:13 +03:00
alexey-milovidov
e1104135c8
Merge pull request #13939 from fastio/master
Multithreading implementation of Kafka engine
2020-09-07 20:12:06 +03:00
kssenii
40c8290dde Tiny fixes, better tests 2020-09-07 14:48:50 +00:00
alesapin
17650e803f Tiny improvements 2020-09-07 14:08:53 +03:00
alesapin
f6237dc334 Better name 2020-09-07 12:32:45 +03:00
alesapin
4ce975c512 Merge branch 'master' into kssenii-rabbitmq-improvements 2020-09-07 11:36:08 +03:00
alesapin
f274ffc9d1 Add comments 2020-09-07 10:59:14 +03:00
alesapin
ba70de63f8 Fix diff 2020-09-07 10:28:04 +03:00
alesapin
7f301eab63 Merge branch 'master' into recompression_in_background 2020-09-07 09:31:16 +03:00
Dmitry
9639846ca9 Merge branch 'master' into system_events_show_zero_values 2020-09-06 14:55:14 +03:00
Peng Jian
fd82272cfe Fix code style, and update docs for Kafka engine 2020-09-06 11:17:19 +08:00
Peng Jian
e6bfd9d586 1. Add new setting for Kafka engine, named kafka_thread_per_consumer which default value is false. 2. Create separate thread pool for Kafka engine. 2020-09-06 11:17:19 +08:00
Peng Jian
de0a40aedc fix code style 2020-09-06 11:17:19 +08:00
Peng Jian
61ac52cf29 Multithreading implementation of Kafka engine 2020-09-06 11:17:18 +08:00
Anton Popov
3b9be70c8c Merge remote-tracking branch 'upstream/master' into HEAD 2020-09-05 18:53:55 +03:00
Nikolai Kochetov
499405504f Merge branch 'master' into pipes-and-creating-sets 2020-09-04 23:41:20 +03:00
Anton Popov
c73bb98002 fix clang-tidy 2020-09-04 19:50:40 +03:00
Anton Popov
f1cf03f1bb Merge remote-tracking branch 'upstream/master' into HEAD 2020-09-04 17:40:22 +03:00
alesapin
37a2bd0bfd less debug 2020-09-04 17:23:32 +03:00
alesapin
de911aaabe Merge branch 'master' into recompression_in_background 2020-09-04 17:21:27 +03:00
alesapin
2d1042614e Less comments 2020-09-04 17:19:41 +03:00
alesapin
79ef72178e Less garbage 2020-09-04 17:18:49 +03:00
alesapin
f48d654d35 Less garbage 2020-09-04 17:15:34 +03:00
alesapin
fecb2f1311 Less copypaste 2020-09-04 17:08:43 +03:00
alesapin
ea7168580b Fixes 2020-09-04 16:55:07 +03:00
Alexander Tokmakov
ed5f827708 Merge branch 'master' into write_structure_of_table_functions 2020-09-04 16:38:57 +03:00
Anton Popov
68913eab62 better reading from compact parts with differents codecs 2020-09-04 15:48:55 +03:00
alesapin
f8aa6cfe8a
Merge pull request #14438 from ClickHouse/apply_ttl_if_not_calculated
Apply TTL if it's not calculated for part
2020-09-04 15:32:50 +03:00
alesapin
f9dd4cc98d Merge branch 'control_ttl_merges_in_pool' into recompression_in_background 2020-09-04 14:32:25 +03:00
alesapin
e42d0f60da Fix several bugs 2020-09-04 14:27:27 +03:00
alesapin
4079636f81 Merge 2020-09-04 13:52:51 +03:00
alesapin
6f5ba4d8e5 Fix ya.make 2020-09-04 13:31:29 +03:00
alesapin
69b31ab90d More comments 2020-09-04 13:29:55 +03:00
alesapin
82c56349a5 Some comments 2020-09-04 13:08:09 +03:00
Alexander Tokmakov
b840d741d0 Merge branch 'master' into write_structure_of_table_functions 2020-09-04 13:00:07 +03:00
Nikolai Kochetov
c761970bc5 Merge branch 'master' into pipes-and-creating-sets 2020-09-04 11:38:35 +03:00
Nikolai Kochetov
b7e53208d1 Fix tests. 2020-09-04 11:36:47 +03:00
alesapin
c96a2b4f22
Merge pull request #14444 from ClickHouse/fix_select_parts_for_merge
Fix select parts for merge
2020-09-04 09:55:48 +03:00
alesapin
61ecaebcb1 Simplify settings for TTL merges 2020-09-04 09:55:19 +03:00
Anton Popov
6883ee7eea create less compressed streams while writing compact parts 2020-09-04 01:38:17 +03:00
Anton Popov
d5da58918e create less compressed streams while writing compact parts 2020-09-04 01:04:46 +03:00
Anton Popov
98011f6fc3 Merge remote-tracking branch 'upstream/master' into HEAD 2020-09-03 17:53:05 +03:00
alesapin
0dab4d9485 Merge branch 'fix_select_parts_for_merge' into control_ttl_merges_in_pool 2020-09-03 17:41:23 +03:00
alesapin
bd24c3a059 Fix build useless binary 2020-09-03 17:38:56 +03:00
Kseniia Sumarokova
4b7c303eaf
Merge branch 'master' into rabbitmq-improvements 2020-09-03 17:26:04 +03:00
alesapin
15a02321bf Merge branch 'fix_select_parts_for_merge' into control_ttl_merges_in_pool 2020-09-03 17:16:29 +03:00
alesapin
55adb6f9f2
Update src/Storages/MergeTree/MergeSelector.h
Co-authored-by: Nikita Mikhaylov <mikhaylovnikitka@gmail.com>
2020-09-03 16:55:34 +03:00
alesapin
e48e4309b2 Better names 2020-09-03 16:29:18 +03:00
alesapin
565555e55c Fix bug in parts selection 2020-09-03 16:04:28 +03:00
alesapin
13248a744b Fix bug in parts selection 2020-09-03 16:02:24 +03:00
alesapin
f4c7ff0376 Add fixed size of Merge TTLS 2020-09-03 16:00:13 +03:00
alesapin
aa47d0aabc Merge branch 'apply_ttl_if_not_calculated' into recompression_in_background 2020-09-03 12:07:03 +03:00
alesapin
acc0ee0657 Apply TTL if it's not calculated for part 2020-09-03 11:59:41 +03:00
kssenii
e1ef558a2d Fixes 2020-09-03 06:50:20 +00:00
alexey-milovidov
edea940e17
Update StorageDistributed.cpp 2020-09-03 04:39:36 +03:00
Azat Khuzhin
fffeeeba06 Force WithMergeableStateAfterAggregation via distributed_group_by_no_merge (convert to UInt64)
Possible values:
- 1 - Do not merge aggregation states from different servers for distributed query processing - in case it is for certain that there are different keys on different shards.
- 2 - same as 1 but also apply ORDER BY and LIMIT stages
2020-09-03 00:52:51 +03:00
Azat Khuzhin
10b4f3b41f Optimize queries with LIMIT/LIMIT BY/ORDER BY for distributed with GROUP BY sharding_key
Previous set of QueryProcessingStage does not allow to do this.
But after WithMergeableStateAfterAggregation had been introduced the
following queries can be optimized too under
optimize_distributed_group_by_sharding_key:
- GROUP BY sharding_key LIMIT
- GROUP BY sharding_key LIMIT BY
- GROUP BY sharding_key ORDER BY

And right now it is still not supports:
- WITH TOTALS (looks like it can be supported)
- WITH ROLLUP (looks like it can be supported)
- WITH CUBE
- SETTINGS extremes=1 (looks like it can be supported)
But will be implemented separatelly.

vX: fixes
v2: fix WITH *
v3: fix extremes
v4: fix LIMIT OFFSET (and make a little bit cleaner)
v5: fix HAVING
v6: fix ORDER BY
v7: rebase against 20.7
v8: move out WithMergeableStateAfterAggregation
v9: add optimize_distributed_group_by_sharding_key into test names
2020-09-03 00:52:51 +03:00
Azat Khuzhin
4043be3121 Add new query processing stage WithMergeableStateAfterAggregation
Process query until the stage where the aggregate functions were
calculated and finalized.

It will be used for optimize_distributed_group_by_sharding_key.

v2: fix aliases
v3: Fix protocol ABI breakage due to WithMergeableStateAfterAggregation
    Conditions >= for QueryProcessingStage::Enum has been verified, and they
    are ok (in InterpreterSelectQuery).
2020-09-03 00:51:08 +03:00