Commit Graph

476 Commits

Author SHA1 Message Date
Vladimir
7224e25156
Revert "Pass Settings to aggregate function creator" 2021-05-26 14:46:42 +03:00
Vladimir
6650c67b01
Merge pull request #22762 from vdimir/create-aggregate-func-settings 2021-05-26 14:32:14 +03:00
alesapin
301dc848f5 Merge branch 'master' into nvartolomei-parts-move 2021-05-19 17:17:01 +03:00
Alexander Kuzmenkov
e9b69bbd70
Merge pull request #23906 from azat/fix-distributed_group_by_no_merge
distributed_group_by_no_merge fixes
2021-05-19 16:16:08 +03:00
alesapin
17f229857c Merge branch 'master' into nvartolomei-parts-move 2021-05-17 13:52:48 +03:00
Azat Khuzhin
a44ddd2064 Update distributed_group_by_no_merge description 2021-05-15 15:03:13 +03:00
Alexander Kuzmenkov
5ed6a273d3
Merge pull request #24058 from ClickHouse/aku/uniq-two-level
lower two-level aggregation threshold for uniq test to avoid jitter
2021-05-14 15:50:48 +03:00
Alexander Kuzmenkov
6f16d92cfe
Update Settings.h 2021-05-14 15:50:30 +03:00
Alexander Kuzmenkov
220f5b512e
try even smaller value 2021-05-13 06:15:44 +03:00
Alexander Kuzmenkov
f6cb9f95df lower two-level aggregation threshold for uniq test to avoid jitter 2021-05-12 16:01:48 +03:00
alesapin
46e136b5c4
Merge branch 'master' into nv/parts-uuid-move-shard 2021-05-11 15:36:40 +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
vdimir
905e54a0af
Merge branch 'master' into create-aggregate-func-settings 2021-05-11 11:18:24 +03:00
Maksim Kita
9daf5b8308 Updated Settings 2021-05-08 17:39:34 +03:00
kssenii
912878ad7f Review fixes 2021-05-07 12:05:34 +00:00
kssenii
8662078b35 Review fixes 2021-05-07 09:55:18 +00:00
Nicolae Vartolomei
1fa5871ff7 Fix bad rebase and introduce part_moves_between_shards_enable setting 2021-04-27 14:20:13 +01:00
Nicolae Vartolomei
53d57ffb52 Part movement between shards
Integrate query deduplication from #17348
2021-04-27 14:20:12 +01:00
Nikolai Kochetov
29fd51e37d Enable async_socket_for_remote 2021-04-27 13:30:12 +03:00
Vladimir
fd777bcd4b
Merge branch 'master' into create-aggregate-func-settings 2021-04-26 11:12:09 +03:00
kssenii
459612c895 Use a separate setting 2021-04-22 22:14:14 +00:00
Nikolai Kochetov
44112587d4
Merge pull request #23309 from ClickHouse/try-fix-crash-with-unknown-packet
Fix crash in case of unknown packet
2021-04-21 08:47:17 +03:00
alexey-milovidov
a311a5c0b5
Merge pull request #23322 from azat/disable-min_bytes_to_use_mmap_io
Disable min_bytes_to_use_mmap_io by default
2021-04-20 19:27:47 +03:00
Nikolai Kochetov
ecb2a96af8 Revert "Enable async_socket_for_remote"
This reverts commit ff908baa06.
2021-04-20 17:14:54 +03:00
Nikita Mikhaylov
f55eacee7d
Merge pull request #22988 from excitoon-favorites/s3connectionresetretries
Retries on HTTP connection drops during reads from S3
2021-04-20 14:59:21 +03:00
Kseniia Sumarokova
b43656bf89
Merge pull request #22697 from TCeason/feature/add_MaterializeMySQL_sync_bytes_judgment
Add MySQL read history data bytes judgment
2021-04-20 10:26:42 +03:00
Azat Khuzhin
6fba6f7ddd Disable min_bytes_to_use_mmap_io by default
Reading files using mmap() does not have any significant benefits over
plain read() [1].

  [1]: https://gist.github.com/azat/3d6c8d82bdd91e7a38d997fd6bcfd574

And not only it does not have significant benefits, it also has some
issues, due to max_server_memory_usage (default to 90% of available
RAM), since when you read files with mmap() eventually process RSS may
exceed max_server_memory_usage, and in this case any allocation will
fail (with "Memory limit exceeded (total)") error (yes kernel will
unload pages, but likely it will happens after queries will starting to
fail), like in this test [2].

  [2]: https://gist.github.com/azat/4813489828162e6c2ce131963c6a1acb

TL;DR;

Note that there was also an idea to take those mmap()'ed regions in
memory tracking (#23211), but there are some drawbacks (since accounting
mmap() is tricky, first of all you need to account only once per inode
for file and plus kernel can unload some pages and those memory will not
be used by the server anymore).

And as an adddition to #23211 there was #23212, that adds
max_bytes_to_use_mmap_io, but since mmap is not a subject for memory
accounting there is no need in it.
2021-04-20 00:25:16 +03:00
Nikolai Kochetov
ff908baa06 Enable async_socket_for_remote 2021-04-19 17:31:46 +03:00
Nikolai Kochetov
0c23d44b99 Add test. 2021-04-19 17:12:08 +03:00
Alexander Kuzmenkov
2a4bcb6e3f
Merge pull request #23159 from ClickHouse/aku/merge-fusecount
merging sumCount fusion PR #21337
2021-04-19 16:47:13 +03:00
Vladimir Chebotarev
9d4295f261 Removed infinite retries. 2021-04-19 11:02:36 +03:00
TCeason
b4bf53dfc9 add some comment and modify a parameter type 2021-04-19 15:34:27 +08:00
TCeason
63403c709c modify settings name to external_xxx and rewrite Storage MySQL max_block_size 2021-04-19 10:51:50 +08:00
TCeason
87aa904440 Modify according to review opinion 2021-04-19 10:51:50 +08:00
TCeason
472c131420 Add MySQL read history data bytes judgment 2021-04-19 10:51:50 +08:00
Alexey Milovidov
21ff5d85d9 Disable hedged requests 2021-04-18 15:13:57 +03:00
vdimir
92e813c806
Merge branch 'master' into create-aggregate-func-settings 2021-04-16 15:48:39 +03:00
Alexey Milovidov
9110a76d00 Reordered settings to avoid confusion 2021-04-16 00:14:37 +03:00
Alexander Kuzmenkov
2489b6af96 cleanup 2021-04-15 19:40:49 +03:00
Alexander Kuzmenkov
3b95b637a5 Merge remote-tracking branch 'origin/master' into HEAD 2021-04-15 18:19:53 +03:00
vdimir
33a9189151
Merge remote-tracking branch 'upstream/master' into create-aggregate-func-settings 2021-04-15 13:41:21 +03:00
Vladimir Chebotarev
10bf56e540 Attempt to add retries to S3 reads. 2021-04-15 09:47:19 +03:00
alexey-milovidov
1945d01719
Merge pull request #21972 from kssenii/nanodbc
Switch to nanodbc
2021-04-13 12:23:57 +03:00
Maksim Kita
e687fc320f
Merge pull request #22997 from ClickHouse/increase-max-uri-size
Increase `max_uri_size` to 1 MiB by default
2021-04-13 11:26:23 +03:00
hexiaoting
77c460e8d1 Merge remote-tracking branch 'origin/master' into dev-sumcount 2021-04-13 11:14:14 +08:00
alexey-milovidov
d239c66fd3
Merge pull request #21511 from azat/optimize_skip_unused_shards-improvement
Rewrite IN in query for remote shards to exclude values that do not belong to the shard
2021-04-13 01:18:11 +03:00
Alexey Milovidov
e260b2a60a Increase max_uri_size to 1 MiB by default 2021-04-12 21:06:47 +03:00
vdimir
f2c109cc86
Merge branch 'master' into create-aggregate-func-settings 2021-04-12 11:38:20 +03:00
vdimir
f022f0744b
Add setting allow_experimental_funnel_functions and use in windowFunnel 2021-04-12 11:35:07 +03:00
Azat Khuzhin
fbb386dca5 Rewrite IN in query for remote shards to exclude values that does not belongs to shard
v2: fix optimize_skip_unused_shards_rewrite_in for sharding_key wrapped into function
v3: fix column name for optimize_skip_unused_shards_rewrite_in
v4: fix optimize_skip_unused_shards_rewrite_in with Null
v5:
- squash with Remove query argument for IStreamFactory::createForShard()
- use proper column after function execution (using sharding_key_column_name)
- update the test reference since (X) now is tuple(X)
2021-04-12 10:37:28 +03:00