Commit Graph

1407 Commits

Author SHA1 Message Date
alexey-milovidov
878a159538
Merge pull request #25773 from ClickHouse/system-query-log-map-type-merge
Merging #23934
2021-06-29 04:19:53 +03:00
Azat Khuzhin
e590d9c8bb Add comments for VERSION_REVISION vs DBMS_TCP_PROTOCOL_VERSION 2021-06-28 22:01:14 +03:00
Kseniia Sumarokova
9d02af7d8b
Merge pull request #25676 from sand6255/MaterializeMySQL-Support-Enum-Data-Type
MaterializeMySQL: support ENUM data type
2021-06-28 19:15:00 +03:00
Maksim Kita
352e1f27ff Update using Map datatyle in system log tables before merge 2021-06-28 14:42:21 +03:00
neng.liu
ec7604b013 add parquet test and fix add interval error when type is date32 2021-06-28 16:36:54 +08:00
Maksim Kita
294b937a39
Merge branch 'system-query-log-map-type-merge' into system-querylog-map-continue 2021-06-28 11:27:59 +03:00
kssenii
aa7133c239 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-06-27 20:08:00 +00:00
kssenii
c3a2fc0584 Review fixes 2021-06-27 19:17:17 +00:00
alexey-milovidov
0a26687115
Merge pull request #23864 from azat/dist-split-batch-and-retry
Add ability to split distributed batch on failures (i.e. due to memory limits)
2021-06-27 19:28:26 +03:00
kssenii
db998c3f6c More robust 2021-06-27 16:28:10 +00:00
kssenii
3d90f0710c Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-06-26 22:04:47 +00:00
alexey-milovidov
6662e7ab0f
Merge pull request #25732 from matwey/missed_include_optional_2
Fix some more missed includes
2021-06-26 14:04:06 +03:00
Kostiantyn Storozhuk
7516d39091 Style fixes 2021-06-25 16:44:28 +08:00
Storozhuk Kostiantyn
4a3145f586 Materialize my sql support enum data type
* Implemented Enum for MaterializeMySQL
2021-06-25 16:42:25 +08:00
Azat Khuzhin
a0209178cc Add ability to split distributed batch on failures
Add distributed_directory_monitor_split_batch_on_failure setting (OFF by
default), that will split the batch and send files one by one in case of
retriable errors.

v2: more error codes
2021-06-23 02:48:47 +03:00
Neng Liu
7ed1728a37 Merge branch 'master' into datatype-date32
# Conflicts:
#	src/DataTypes/IDataType.h
#	src/Functions/CustomWeekTransforms.h
2021-06-22 10:00:18 +08:00
Anton Popov
c2754c34f4 Merge remote-tracking branch 'upstream/master' into HEAD 2021-06-21 12:42:48 +03:00
Kruglov Pavel
a54cbef5b7
Merge pull request #24341 from Avogar/arrow
Support complex types in Arrow/Parquet/ORC
2021-06-21 11:05:57 +03:00
Anton Popov
e409ead64a fix tests 2021-06-20 23:18:05 +03:00
Anton Popov
d8b6f15ef4
Merge pull request #23027 from azat/distributed-push-down-limit
Add ability to push down LIMIT for distributed queries
2021-06-20 23:08:50 +03:00
Amos Bird
c56df3e134
Update again 2021-06-19 22:59:53 +08:00
Amos Bird
972e3a5156
Update 2021-06-19 14:41:37 +08:00
Amos Bird
f2ed5ef42b
Nullable primary key with correct KeyCondition 2021-06-18 23:04:24 +08:00
kssenii
f33387837e Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into disk-over-web-server 2021-06-18 14:27:48 +00:00
mergify[bot]
c723dd7d40
Merge branch 'master' into arrow 2021-06-18 12:18:57 +00:00
Matwey V. Kornilov
37180e0842 Add missed #include <optional>
std::optional<> is used multiple times here.

Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
2021-06-17 13:14:56 +03:00
Neng Liu
b6eab5fd2f add datetype32 function support 2021-06-17 16:05:30 +08:00
Amos Bird
31815f4a68
Proper documentation of the setting 2021-06-17 14:27:33 +08:00
Amos Bird
c8ea6527cb
Add prefer_global_in_and_join setting 2021-06-17 14:27:29 +08:00
alexey-milovidov
04be5437d9
Merge pull request #25296 from abyss7/http-issues
Add settings for HTTP header limitations
2021-06-17 01:50:48 +03:00
Maksim Kita
67e9b85951 Merge ext into common 2021-06-16 23:28:41 +03:00
Anton Popov
ea9b890618
Merge branch 'master' into add-compatibility-setting 2021-06-16 21:10:56 +03:00
Anton Popov
8bd7cbd925 add compatibility setting for name of columns 2021-06-16 21:10:07 +03:00
Ivan Lezhankin
ba08a580f8 Add test 2021-06-16 17:33:14 +03:00
Maksim Kita
0414d1b39e Setting min_count_to_compile_expression fix 2021-06-16 15:18:55 +03:00
alexey-milovidov
7180cf2367
Merge pull request #25265 from ClickHouse/minor-changes-3
Minor change
2021-06-16 08:33:12 +03:00
Ivan Lezhankin
b182d87d9c Add settings for HTTP header limitations 2021-06-15 17:33:46 +03:00
Pavel Kruglov
a4decd0848 Support Map type, fix and add tests 2021-06-15 16:15:27 +03:00
Pavel Kruglov
c8b37977da Fix bugs, support dictionary for Arrow format 2021-06-15 16:15:27 +03:00
Maksim Kita
e9bfcd20e6 ExpressionJIT fix loop 2021-06-15 10:56:08 +03:00
Alexey Milovidov
4e982a3ae6 Merge branch 'master' into minor-changes-3 2021-06-15 00:45:45 +03:00
Azat Khuzhin
b5a2fad993 More generic VersionNumber 2021-06-14 10:38:26 +03:00
Azat Khuzhin
1b5ca07ff4 Convert VersionNumber::fromString() to constructor 2021-06-14 10:38:26 +03:00
Azat Khuzhin
c08daa3ca5 Detect linux version at runtime (for worked nested epoll)
The #22109 adds the check but at compilation time, which is pointless,
move the check into runtime.

Remember nested epoll is required for
async_socket_for_remote/use_hedged_requests, otherwise remote queries
may stuck.
2021-06-14 10:38:26 +03:00
Alexey Milovidov
447d7bb8cd Minor changes 2021-06-14 07:13:35 +03:00
Alexey Milovidov
cae9b25074 Minor change 2021-06-14 06:05:27 +03:00
kssenii
2cfcc9980c Better 2021-06-13 19:38:31 +00:00
Amos Bird
7d9a1106b8
Add initial_query_start_time to query log 2021-06-11 22:24:53 +08:00
neng.liu
2bd7e6e454 date32 2021-06-09 06:38:42 -07:00
Anton Popov
bb6f0dfbb8
Merge pull request #24406 from CurtizJ/rewrite-functions-to-subcolumns
Optimize some functions to subcolumns
2021-06-09 11:07:09 +03:00
Azat Khuzhin
18e8f0eb5e Add ability to push down LIMIT for distributed queries
This way the remote nodes will not need to send all the rows, so this
will decrease network io and also this will make queries w/
optimize_aggregation_in_order=1/LIMIT X and w/o ORDER BY faster since it
initiator will not need to read all the rows, only first X (but note
that for this you need to your data to be sharded correctly or you may
get inaccurate results).

Note, that having lots of processing stages will increase the complexity
of interpreter (it is already not that clean and simple right now).

Although using separate QueryProcessingStage looks pretty natural.

Another option is to make WithMergeableStateAfterAggregation always, but
in this case you will not be able to disable only this optimization,
i.e. if there will be some issue with it.

v2: fix OFFSET
v3: convert 01814_distributed_push_down_limit test to .sh and add retries
v4: add test with OFFSET
v5: add new query stage into the bash completion
v6/tests: use LIMIT O,L syntax over LIMIT L OFFSET O since it is broken in ANTLR parser
          https://clickhouse-test-reports.s3.yandex.net/23027/a18a06399b7aeacba7c50b5d1e981ada5df19745/functional_stateless_tests_(antlr_debug).html#fail1
v7/tests: set use_hedged_requests to 0, to avoid excessive log entries on retries
          https://clickhouse-test-reports.s3.yandex.net/23027/a18a06399b7aeacba7c50b5d1e981ada5df19745/functional_stateless_tests_flaky_check_(address).html#fail1
2021-06-09 02:29:50 +03:00
alesapin
5736eaf8fd Increase background schedule pool default size 2021-06-08 13:55:14 +03:00
neng.liu
120da1fd73 date32 initial code 2021-06-07 06:41:58 -07:00
Alexey Milovidov
8d85145725 Remove experimental compression codecs 2021-06-06 02:26:52 +03:00
Alexey Milovidov
17962459f5 Merge branch 'master' into issue-16775 2021-06-06 02:18:28 +03:00
Nikita Mikhaylov
f1733a93e5
Merge pull request #24857 from kssenii/postgresql_protocol
Fix NULL values in postgresql protocol
2021-06-04 14:43:47 +03:00
kssenii
e23bc14582 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-06-03 19:44:55 +00:00
Vladimir
17f0900c31
Merge pull request #19766 from achimbab/pr_sequenceNextNode 2021-06-03 13:16:42 +03:00
alesapin
4a1bf51ad1
Merge branch 'master' into limited_fetches 2021-06-02 23:01:47 +03:00
vdimir
ec09dfe635
Set allow_experimental_funnel_functions = false by default (not used before) 2021-06-02 09:16:31 +03:00
vdimir
1b936c8af6
Remove example usage of allow_experimental_funnel_functions from windowFunnel 2021-06-02 09:16:21 +03:00
kssenii
12ea45e956 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-06-01 17:43:34 +00:00
kssenii
ccf5455624 Allow null values in postgresql protocol 2021-06-01 15:00:32 +00:00
alesapin
c3321bef30 Merge branch 'master' into limited_fetches 2021-06-01 13:09:02 +03:00
Anton Popov
b24f65e1ad Merge remote-tracking branch 'upstream/master' into HEAD 2021-05-31 23:04:52 +03:00
Alexey Milovidov
3791c1c99d Someone added useful settings to the section with obsolete settings 2021-05-31 22:26:34 +03:00
Alexey Milovidov
4187aa444b Fix typo. Remove "allow_experimental_bigint_types" setting. 2021-05-31 22:21:28 +03:00
Nikolai Kochetov
afc1fe7f3d Make ContextPtr const by default. 2021-05-31 17:49:02 +03:00
alesapin
42b2383e01 Basic throttler implementation 2021-05-26 23:37:44 +03:00
Vladimir
fc15cad7e0
Pass Settings to aggregate function creator 2021-05-26 14:58:31 +03:00
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
Anton Popov
a36c1793d0 Merge remote-tracking branch 'upstream/master' into HEAD 2021-05-24 15:57:43 +03:00
Alexey Milovidov
6f70feed2f Merge branch 'master' into issue-16775 2021-05-24 05:56:57 +03:00
Alexey Milovidov
8d2fa6cf50 Allow to build without experimental compression libraries and remove from fasttest 2021-05-24 01:18:12 +03:00
kssenii
da32f66122 More tests 2021-05-23 12:47:52 +00:00
kssenii
a78c9e63e7 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-05-23 12:07:26 +00:00
alesapin
6c0b683d3a
Merge pull request #17871 from nvartolomei/nv/parts-uuid-move-shard
Part movement between shards
2021-05-23 10:20:57 +03:00
Alexey Milovidov
e000b994e5 Add missing whitespace 2021-05-23 03:26:31 +03:00
alexey-milovidov
1ed30f7246
Merge branch 'master' into issue-16775 2021-05-22 17:14:23 +03:00
Anton Popov
e3ca1cf94d Merge remote-tracking branch 'upstream/master' into rewrite-functions-to-subcolumns 2021-05-22 03:06:36 +03:00
alexey-milovidov
a25f1910cc
Merge pull request #24320 from ClickHouse/remove-auto-array
Remove AutoArray
2021-05-22 02:19:59 +03:00
Anton Popov
13cfedd188 optimize some functions to subcolumns 2021-05-21 21:48:19 +03:00
Alexey Milovidov
ea30bb7abf Improve implementation 2021-05-21 04:17:18 +03:00
alesapin
deb784a321 Merge branch 'master' into nvartolomei-parts-move 2021-05-20 21:24:55 +03:00
Maksim Kita
25fe0e88f8 Compile expressions added partition by test 2021-05-20 11:16:15 +03:00
Maksim Kita
b0476c1fa2
Merge pull request #24273 from kitaisreal/expression-actions-compile-only-necessary-places
ExpressionActions compile only necessary places
2021-05-20 10:53:30 +03:00
alesapin
cf94bc9b8c
Merge pull request #24059 from ClickHouse/standalone_keeper
Standalone keeper server
2021-05-20 10:10:51 +03:00
Alexey Milovidov
2b6ffc557a Remove useless file 2021-05-20 09:31:17 +03:00
Maksim Kita
c50909468f Updated ExpressionActionSettings 2021-05-19 17:32:07 +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
31181095e7 Review fixes 2021-05-18 17:08:56 +03:00
alesapin
17f229857c Merge branch 'master' into nvartolomei-parts-move 2021-05-17 13:52:48 +03:00
kssenii
8a4711b716 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-05-16 20:55:18 +00: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
kssenii
407db17e2e Remove setting, use native transaction 2021-05-12 22:33:15 +00:00
Alexander Gololobov
748d1b6e9c Generate ya.make for missing UUID.cpp 2021-05-12 20:32:29 +03:00
kssenii
0955e5f0be Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-05-12 15:11:15 +00: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
Alexey Milovidov
b2ca5cd98b Merge branch 'master' into normalize-bigint 2021-05-11 02:05:40 +03:00
alexey-milovidov
066acc71b6
Merge pull request #8482 from ClickHouse/enable-compile-expressions
Enable "compile_expressions" by default
2021-05-10 21:09:18 +03:00
kssenii
626e87bae5 Some fixes 2021-05-10 13:51:05 +00:00
kssenii
4ac023e511 Small fixes 2021-05-10 08:45:52 +00:00
kssenii
993823bcc4 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-05-09 21:26:41 +00:00
Alexey Milovidov
18b7e38994 Remove redundant template 2021-05-10 00:26:34 +03:00
kssenii
1b827ac424 Correct merge, finish refactoring 2021-05-09 14:45:33 +00:00
Alexey Milovidov
903c306e04 Fix some PVS-Studio warnings 2021-05-09 01:10:10 +03:00
Alexey Milovidov
ab9b116310 Fix some PVS-Studio warnings 2021-05-09 01:09:16 +03:00
Alexey Milovidov
e905883c75 More fixes for PVS-Studio 2021-05-08 19:12:31 +03:00
Alexey Milovidov
8d62c42eb9 A bunch of changes for PVS-Studio 2021-05-08 19:11:50 +03:00
Alexey Milovidov
2fbecf36ca More fixes for PVS-Studio 2021-05-08 18:20:40 +03:00
kssenii
5c24f0943c Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-05-08 14:54:44 +00:00
Alexey Milovidov
9e1a5f41fc A bunch of changes for PVS-Studio 2021-05-08 17:43:03 +03:00
Maksim Kita
9daf5b8308 Updated Settings 2021-05-08 17:39:34 +03:00
Alexey Milovidov
47a4c101b9 Merge branch 'master' into normalize-bigint 2021-05-08 16:41:15 +03:00
Alexey Milovidov
04d85db385 Fix weird error in code 2021-05-08 02:42:52 +03:00
Alexey Milovidov
55f86851f1 Less strange templates 2021-05-08 02:35:11 +03:00
Alexey Milovidov
734df081da Fix terrible exception message 2021-05-08 02:12:48 +03:00
Alexey Milovidov
7dfb7664f7 Messing with the code (removed trash) 2021-05-07 21:16:27 +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
hexiaoting
a1d521902c Merge remote-tracking branch 'origin/master' into dev-continue-sundyli 2021-05-07 14:22:53 +08:00
Alexey Milovidov
6651e5e951 Fix test 2021-05-07 04:51:35 +03:00
Alexey Milovidov
df0d6a8d24 Fix error; add a test 2021-05-07 01:37:23 +03:00
Alexey Milovidov
b461542388 If for UUID 2021-05-06 18:45:58 +03:00
fibersel
cb53bbb7b0 add experimental codecs flag, add integration test for experimental codecs 2021-05-06 14:57:22 +03:00
Alexey Milovidov
9f379918ea Fix error in wide_integer implementation 2021-05-06 03:06:24 +03:00
Alexey Milovidov
1ec7a1f0ca Fix NaN comparison 2021-05-06 01:02:00 +03:00
Alexey Milovidov
cb74831788 Update test 2021-05-05 02:15:35 +03:00
Alexey Milovidov
77ebbdaeda Simplification 2021-05-05 02:09:32 +03:00
Alexey Milovidov
acd0d9b34c Fix error (amend) 2021-05-05 02:08:42 +03:00
Alexey Milovidov
75ac3c96df Fix error 2021-05-05 02:07:14 +03:00
Alexey Milovidov
962a7113f6 Remove code that I do not like (crazy templates) 2021-05-04 20:26:09 +03:00
Alexey Milovidov
eea47a65d2 PVS-Studio 2021-05-04 15:13:47 +03:00
Alexey Milovidov
02ce9cc725 Untangle UUID 2021-05-04 01:46:51 +03:00
Alexey Milovidov
b0bd9fd3b0 Add UInt128 where it is needed 2021-05-03 19:12:28 +03:00
Alexey Milovidov
9f74565948 PVS-Studio 2021-05-03 01:42:01 +03:00
Alexey Milovidov
eaa8f922b2 Fix errors, add a test 2021-05-03 00:52:59 +03:00
Alexey Milovidov
1fda866881 Merge branch 'master' into normalize-bigint 2021-05-02 21:24:45 +03:00
kssenii
7643d84095 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-04-30 22:02:51 +00:00
Maksim Kita
318c4bb80d Add examples folder filter to ya.make.in 2021-04-30 11:25:52 +03:00
Maksim Kita
0d0a14a925 Poco::Timespan reference fix 2021-04-29 19:11:20 +03:00
Nikolai Kochetov
c508868570
Merge pull request #23082 from ClickHouse/explain-output
JSON output for EXPLAIN
2021-04-28 15:39:06 +03:00
Nikolai Kochetov
181273730d
Merge pull request #23683 from ClickHouse/enable_async_socket_for_remote
Enable async_socket_for_remote
2021-04-28 12:29:50 +03: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
Nikita Mikhaylov
9f55424250 move to examples everywhere 2021-04-27 01:51:42 +03:00
Vladimir
fd777bcd4b
Merge branch 'master' into create-aggregate-func-settings 2021-04-26 11:12:09 +03:00
Alexey Milovidov
649550c5ab Attempt to normalize big integers 2021-04-25 12:30:43 +03:00
Alexey Milovidov
8f01af62d9 Merge branch 'master' into normalize-bigint 2021-04-25 06:57:44 +03:00
kssenii
d032651aba Try fix 2021-04-23 17:29:22 +00:00
kssenii
8f34199538 Fixes 2021-04-23 12:36:40 +00:00
kssenii
459612c895 Use a separate setting 2021-04-22 22:14:14 +00:00
kssenii
28c4436246 Better 2021-04-22 21:30:31 +00:00
mergify[bot]
71bca99bbf
Merge branch 'master' into explain-output 2021-04-22 07:02:47 +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
Nikolai Kochetov
9ec6fd1943
Merge pull request #23359 from ClickHouse/try-fix-23029
Fix #23029
2021-04-21 08:46:21 +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
Nikolai Kochetov
5e589ca6b2 Try fix #23029 2021-04-20 14:55:23 +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
alexey-milovidov
4cef8c68f7
Merge pull request #23258 from azat/wundef
Add -Wundef for gcc builds
2021-04-19 22:45:22 +03:00
Nikolai Kochetov
8c2d58333a Merge branch 'master' into explain-output 2021-04-19 17:40:27 +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
Maksim Kita
1bfd4f7568 Function toDateTime decimal overflow ubsan fix 2021-04-19 02:00:33 +03:00
Azat Khuzhin
2561a67fd8 Replace !__clang__ with !defined(__clang) to fix gcc builds
$ gg 'if !__clang__' | cut -d: -f1 | sort -u | xargs sed -i 's/#if !__clang__/#if !defined(__clang__)/g'
2021-04-18 23:37:50 +03:00
kssenii
88b50621d4 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-04-18 14:40:37 +00:00
Alexey Milovidov
21ff5d85d9 Disable hedged requests 2021-04-18 15:13:57 +03:00
alexey-milovidov
786f340256
Merge pull request #22755 from kssenii/postgresql-protocol-with-row-policy
Allow row policy in postgresql protocol
2021-04-17 01:55:30 +03:00
Nikolai Kochetov
1bf420cbcf Update json description for other steps. 2021-04-16 19:36:59 +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
Ivan
2b78765957
Merge branch 'master' into postgresql-protocol-with-row-policy 2021-04-14 14:50:28 +03:00
Nikita Mikhaylov
024374a2ec review fixes 2021-04-13 22:39:43 +03:00
Nikita Mikhaylov
a743442a17 build fixes 2021-04-13 22:39:43 +03:00
Nikita Mikhaylov
c333c3dedb review fixes 2021-04-13 22:39:42 +03:00
Nikita Mikhaylov
8a4b5a586e fixed uuid 2021-04-13 22:39:42 +03:00
Nikita Mikhaylov
4843f86329 use only one connection between initiator and worker 2021-04-13 22:39:42 +03:00
Nikita Mikhaylov
31b4f9b17f save 2021-04-13 22:39:41 +03:00
Nikita Mikhaylov
44ca65a9a4 save 2021-04-13 22:39:41 +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
alesapin
56f0e290de
Merge pull request #22945 from ClickHouse/increase-fetches-pool-size
More conservative value of `background_fetches_pool_size` setting
2021-04-12 22:41:04 +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
kssenii
7a287e6fe9 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into nanodbc 2021-04-11 21:36:08 +00:00
kssenii
792d57d630 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into postgresql-protocol-with-row-policy 2021-04-11 21:10:33 +00:00
kssenii
01075677cf Better 2021-04-11 20:22:33 +00:00
kssenii
beae1c5fa4 Use ContextPtr 2021-04-11 08:08:32 +00:00
kssenii
c1adece94f Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-04-11 06:00:18 +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
kssenii
bc228f4010 Better way to drop nested table for single storage 2021-04-10 19:26:53 +00:00
kssenii
1c501e7d97 Support replica identity index 2021-04-10 16:10:28 +00:00
kssenii
dba1fe1989 Add doc draft 2021-04-10 08:20:20 +00:00
Alexey Milovidov
173c0e5c43 More conservative value of background_fetches_pool_size setting 2021-04-09 23:45:14 +03:00
Alexander Kuzmenkov
e44b3822e3
Merge pull request #21850 from fastio/handle_errors_for_kafka_engine
Handle errors for Kafka engine
2021-04-09 22:59:40 +03:00
kssenii
8bdcac4f06 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-04-09 13:12:15 +00:00
Alexander Kuzmenkov
0264124146
Merge pull request #21942 from ucasFL/distributed_depth
Add settings max_distributed_depth
2021-04-09 15:52:58 +03:00
kssenii
72d89bc933 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into nanodbc 2021-04-09 11:13:01 +00:00
kssenii
f7361250b2 Fixes 2021-04-09 11:02:12 +00:00
kssenii
12f98e8b11 Much better 2021-04-09 10:22:06 +00:00
kssenii
f0be5c6938 Fix style, build, ya check 2021-04-09 08:07:56 +00:00
kssenii
8586565ce9 Move connection-related filed to Core/PostgreSQL 2021-04-08 12:43:02 +00:00
kssenii
9fa21a6272 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-04-08 12:18:54 +00:00
kssenii
15ae912b56 Fix postgresql protocol with row policy 2021-04-07 12:56:09 +00:00
feng lv
78afb5b23c fix 2021-04-07 01:58:57 +00:00
kssenii
0b39480d51 Better 2021-04-06 20:01:23 +00:00
Nikolai Kochetov
6102652c99 Merge branch 'master' into better-filter-push-down 2021-04-06 13:38:03 +03:00
Nikolai Kochetov
44700d97e9 Add setting to disable query plan optimization. Fix perftest. 2021-04-06 11:25:54 +03:00
kssenii
dc42d5189d Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into replicas-shards-for-mysql-and-postgres 2021-04-05 15:36:35 +00:00
feng lv
f6e4e13f89 fix conflict 2021-04-05 14:08:30 +00:00
feng lv
56073db22d max distributed depth
Add settings max_distributed_depth

fix style

fix

fix

fix

fix test

fix

fix
2021-04-05 14:00:54 +00:00
Alexey Milovidov
e50d82ab45 Merge branch 'master' into change-accurate-comparison 2021-04-05 01:38:55 +03:00
Alexey Milovidov
6e93d936d3 Highlight potential bugs in code 2021-04-05 01:38:47 +03:00
Alexey Milovidov
32f9a407ff More precise and safe accurate comparison of int vs. float 2021-04-04 14:49:48 +03:00
Alexey Milovidov
d67ced585a Fix engrish 2021-04-04 13:09:39 +03:00
kssenii
13d1f17d3e Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into replicas-shards-for-mysql-and-postgres 2021-04-03 08:00:09 +00:00
kssenii
2de6b99f84 Better names 2021-04-02 16:12:14 +00:00
kssenii
99f0b08ac3 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into replicas-shards-for-mysql-and-postgres 2021-04-01 13:48:33 +00:00
Ivan Lezhankin
cc1c439ad8 Merge remote-tracking branch 'upstream/master' into poco-http2 2021-04-01 16:20:15 +03:00
kssenii
2c70183652 Fix settings 2021-04-01 11:41:22 +00:00
Alexey Milovidov
e67d93d165 Merge branch 'master' into stress-oom 2021-04-01 01:43:40 +03:00
Peng Jian
86a76bbfe4 fix compilation error 2021-03-31 17:38:46 +08:00
Peng Jian
278d2d7df0 fix typo 2021-03-31 17:16:51 +08:00
Peng Jian
85cfb927e6 move HandleKafkaErrorMode to KafkaSettings 2021-03-31 17:16:51 +08:00