Commit Graph

10893 Commits

Author SHA1 Message Date
kssenii
2aad067e7c Support conversion for postgres numeric without precision and scale 2021-02-18 12:16:58 +00:00
zlx19950903
c92e613b82
Add a function htmlOrXmlCoarseParse to extract content from html or xml format string. (#19600)
* add html and xml coarse parse

* add test file

* add conditional check: hyperscan

* fix style error

* add conditional check

* bug fix

* delete unit

* typos check fix

* add unit test

* style check fix

* fix build error: case style

* acradis_skip test fix

* LINT error fix

* Remove comments

Co-authored-by: guojiantao <guojiantao15@mails.ucas.ac.cn>
Co-authored-by: Ivan <5627721+abyss7@users.noreply.github.com>
Co-authored-by: Ivan Lezhankin <ilezhankin@yandex-team.ru>
2021-02-18 15:05:55 +03:00
alesapin
904b4754cc Fix tidy 2021-02-18 14:47:37 +03:00
alesapin
7f815325ba More tests for broken changelog read 2021-02-18 14:42:09 +03:00
Kruglov Pavel
142a541361
Merge branch 'master' into hedged-requests 2021-02-18 14:23:00 +03:00
Pavel Kruglov
2f5b4c20ae Fix 2021-02-18 14:21:48 +03:00
Nikolai Kochetov
7231a97085 Remove MaterializingStep 2021-02-18 14:15:16 +03:00
alesapin
5b597fdf44 Force sync setting and ability to start with broken log 2021-02-18 13:23:48 +03:00
Maksim Kita
4278098f9a Reinterpret function added Decimal, DateTim64 support 2021-02-18 13:09:01 +03:00
Maksim Kita
dcabbc95ed
Merge pull request #20623 from kitaisreal/dictionary-create-source-with-functions-fix
Dictionary create source with functions crash fix
2021-02-18 11:50:20 +03:00
Vitaly Baranov
3cbb325913
Merge pull request #20506 from vitlibar/refactor-protobuf-format-io
Improved serialization in Protobuf format.
2021-02-18 11:31:37 +03:00
Nikolai Kochetov
d582160af4 Merge branch 'master' into filter-push-down 2021-02-18 10:58:27 +03:00
Alexey Milovidov
04cb91a0fd Fix error 2021-02-18 06:02:41 +03:00
Alexey Milovidov
5007f7f018 Fix typo 2021-02-18 05:57:15 +03:00
Alexey Milovidov
634be2b933 Fix error 2021-02-18 03:52:09 +03:00
Alexey Milovidov
b7011f4f9c Fix build 2021-02-18 02:52:07 +03:00
Anton Popov
dcba99f4b1 fix usage of 'distinct' combinator with 'state' combinator 2021-02-18 02:19:58 +03:00
Alexey Milovidov
1781a64370 Whitespaces 2021-02-18 02:11:41 +03:00
Alexey Milovidov
9b72255ca4 Implement compression for all columns except LowCardinality 2021-02-18 02:09:46 +03:00
Alexey Milovidov
9069318fa6 Merge branch 'master' into in-memory-compression 2021-02-18 00:48:39 +03:00
alesapin
ff663dc511 Fsync at server shutdown 2021-02-17 23:36:25 +03:00
alesapin
6e244e7bb1 Trying without fsync 2021-02-17 22:32:38 +03:00
Nikolai Kochetov
ec4dafaa5f Fix build. 2021-02-17 22:19:39 +03:00
Pavel Kruglov
80b6db7f72 Style 2021-02-17 22:07:14 +03:00
Nikolai Kochetov
56a5d1dafa Skip stateful functions 2021-02-17 21:48:26 +03:00
alexey-milovidov
80e6ad7aae
Merge pull request #20610 from ucasFL/fix-union-distinct-limit
fix subquery with limit
2021-02-17 21:24:10 +03:00
alexey-milovidov
3891dd6284
Update InterpreterSelectQuery.cpp 2021-02-17 21:23:27 +03:00
Vitaly Baranov
18e036d19b Improved serialization for data types combined of Arrays and Tuples.
Improved matching enum data types to protobuf enum type.
Fixed serialization of the Map data type.
Omitted values are now set by default.
2021-02-17 20:50:09 +03:00
Pavel Kruglov
e19f62f645 Merge branch 'hedged-requests' of github.com:Avogar/ClickHouse into hedged-requests 2021-02-17 20:44:32 +03:00
Pavel Kruglov
bc6fe4f28c Minor fixes 2021-02-17 20:44:11 +03:00
Kruglov Pavel
794c3449ca
Merge branch 'master' into hedged-requests 2021-02-17 20:36:36 +03:00
Pavel Kruglov
1b78de2142 Use fibers in HedgedRequests 2021-02-17 20:34:52 +03:00
Pavel Kruglov
c57daf2140 Merge branch 'hedged-requests' of github.com:Avogar/ClickHouse into hedged-requests 2021-02-17 20:34:11 +03:00
Nikolai Kochetov
f6278ed429 Support for DIstinct, sorting steps. 2021-02-17 19:56:17 +03:00
Nikolai Kochetov
6522bfc402 Support for DIstinct, sorting steps. 2021-02-17 19:54:11 +03:00
Maksim Kita
50e135db0f
Added comment 2021-02-17 19:24:04 +03:00
Kseniia Sumarokova
20ff183549
Merge branch 'master' into rabbit-format-settings 2021-02-17 19:01:53 +03:00
alesapin
2de201dd5f Merge branch 'fix_fast_test_retry' into persistent_nukeeper_log_storage 2021-02-17 17:51:50 +03:00
Nikita Mikhaylov
d15bac31ff
Merge pull request #20399 from nikitamikhaylov/keen-wolf-filefuncwithreadbuf
Merging #19204
2021-02-17 16:11:22 +03:00
Maksim Kita
b2c09f002f Dictionary create source with functions crash fix 2021-02-17 15:26:00 +03:00
alesapin
0de1535b23
Merge pull request #20596 from kssenii/rabbitmq-add-vhost
Support vhost for rabbitmq engine
2021-02-17 15:18:22 +03:00
alesapin
9396bae2e2 More reliable test keeper tests 2021-02-17 14:53:47 +03:00
Nikolai Kochetov
a8647096ed Try fix tests. 2021-02-17 13:27:47 +03:00
Vladimir
2c99a36228
Merge pull request #19685 from hexiaoting/dev_joinon 2021-02-17 13:22:55 +03:00
Maksim Kita
c608fa1e6a Added error reinterpretation tests 2021-02-17 12:53:12 +03:00
Vitaly Baranov
753f5b84d9
Merge pull request #20106 from vitlibar/fix-quota-consuming
Fix quota consuming
2021-02-17 12:52:43 +03:00
alesapin
acf843a01a Slightly more optimal 2021-02-17 12:00:12 +03:00
feng lv
3b40099578 fix subquery with limit 2021-02-17 08:26:52 +00:00
Maksim Kita
5f88f5817f Rename untyped function reinterpretAs into reinterpret 2021-02-17 11:23:24 +03:00
alesapin
af95db2fcf Test log storage instead of changelog 2021-02-17 11:00:17 +03:00
alesapin
dfaa79b88e Add missed file 2021-02-17 10:10:46 +03:00
Alexey Milovidov
fa20016091 Enable distributed_aggregation_memory_efficient by default 2021-02-17 09:53:18 +03:00
alexey-milovidov
6363d44488
Merge pull request #20498 from azat/dist-parse-dirs-sigsegv-fix
Add proper checks while parsing directory names for async INSERT (fixes SIGSEGV)
2021-02-17 09:43:11 +03:00
kssenii
d79f7c04f6 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into rabbit-format-settings 2021-02-17 06:03:19 +00:00
kssenii
29362bb483 Support vhost 2021-02-16 22:05:14 +00:00
Alexander Tokmakov
1aac7b3471 Merge branch 'master' into database_replicated 2021-02-17 00:39:56 +03:00
Nikita Mikhaylov
5f8a6ab9c1 remove probably useless code 2021-02-16 23:54:05 +03:00
Vitaly Baranov
d357fb9129 Fix reading from the table system.quota_usage. 2021-02-16 23:54:05 +03:00
Vitaly Baranov
298130402e SYSTEM queries now consume quota. 2021-02-16 23:54:05 +03:00
Vitaly Baranov
d8d2bd885c Fix calculation of interval's end in quota consumption. 2021-02-16 23:54:05 +03:00
Vitaly Baranov
f83be158ba SHOW TABLES is now considered as one query in the quota calculations, not two queries. 2021-02-16 23:53:58 +03:00
alesapin
d3e87701d4 Persistent storage 2021-02-16 22:02:18 +03:00
alesapin
b76b8013ba Fix tests 2021-02-16 20:47:12 +03:00
alesapin
b029f3e5cf Border test 2021-02-16 20:32:35 +03:00
alesapin
16bcd9d247 Add changelog tests 2021-02-16 20:28:54 +03:00
tavplubix
68b427a99d
Merge pull request #20448 from ClickHouse/better_ddl_queue_cleanup
Better distributed DDL queue cleanup
2021-02-16 19:29:50 +03:00
M0r64n
75117389ec Add a couple of QOL file engine settings 2021-02-16 18:50:11 +04:00
Maksim Kita
55d51bc595
Merge pull request #20489 from kitaisreal/hash-table-fix-bug-during-resize-with-nonstandard-grower
(unrealistic case, never possible in prod) HashTable fix potential bug during resize with nonstandard grower
2021-02-16 17:42:58 +03:00
vdimir
3e2c9ad011
Merge remote-tracking branch 'origin/master' into dev_joinon 2021-02-16 17:08:10 +03:00
Alexander Tokmakov
7b54b892b5 fix 2021-02-16 17:05:58 +03:00
Nikolai Kochetov
0b315fccc2 Merge branch 'master' into fix-number-of-threads-in-subqueries 2021-02-16 16:29:30 +03:00
Nikolai Kochetov
bcf30d8412 Try fix tests. 2021-02-16 15:57:00 +03:00
Nikita Mikhailov
6ee98ead05 Merge branch 'master' of github.com:ClickHouse/ClickHouse into keen-wolf-filefuncwithreadbuf 2021-02-16 15:38:03 +03:00
Nikita Mikhailov
7c5d845866 refactor function 2021-02-16 15:37:49 +03:00
Nikolai Kochetov
c933fefa99
Merge pull request #20547 from azat/fix-sigsegv-on-unknown-packet
Fix SIGSEGV on Unknown packet for Distributed queries
2021-02-16 13:12:24 +03:00
tavplubix
d4b2a37393
Merge pull request #20350 from amosbird/tviewf
Disable table function view in expression
2021-02-16 13:01:13 +03:00
Nikita Mikhaylov
cb2beb475e
Merge pull request #20516 from nikitamikhaylov/more-checks-filesegmentation-engine
More checks in fileSegmentationEngine
2021-02-16 12:39:27 +03:00
Nikolai Kochetov
a14b6c2650 Fix trivial count optimization 2021-02-16 12:37:19 +03:00
alesapin
daee018ea8 Merge branch 'master' into persistent_nukeeper_log_storage 2021-02-16 11:42:54 +03:00
Nikolai Kochetov
a72ef6f026 Fix number of threads for scalar subqueries and subqueries for index. 2021-02-16 11:26:24 +03:00
vdimir
e39215e38b
Fix has_some condition on CollectJoinOnKeysVisitor 2021-02-16 11:03:02 +03:00
Pavel Kruglov
0e1d67ad9a Add LOG_DEBUG to debug test_distributed_load_balancing 2021-02-16 10:56:45 +03:00
Azat Khuzhin
e485d4cad8 Fix SIGSEGV on Unknown packet for Distributed queries
On Unknown packet disconnect() will be called, which will reset the
input stream, so no need to call setAsyncCallback():

    [ 42015 ] {} <Fatal> BaseDaemon: (version 21.3.1.1, build id: 4F9644AF560F6BB6) (from thread 45051) (no query) Received signal Segmentation fault (11)
    [ 42015 ] {} <Fatal> BaseDaemon: Address: 0x90 Access: read. Address not mapped to object.
    [ 42015 ] {} <Fatal> BaseDaemon: Stack trace: 0xf82e0f4 0xf82de19 0xf83b9a5 0xf83c0e0 0xe9a6fa7 0xf95016c 0xf950939 0xf95020c 0xf950939 0xf95020c 0xf950939 0xf95020c 0xf9508f9 0xf953e40 0xf958376 0x88056af 0x8809143 0x7f4b3e1aaf27 0x7f4b3e0dc31f
    [ 42015 ] {} <Fatal> BaseDaemon: 2. ext::basic_scope_guard<DB::Connection::receivePacket(std::__1::function<void (Poco::Net::Socket&)>)::$_3>::~basic_scope_guard() @ 0xf82e0f4 in /usr/lib/debug/.build-id/4f/9644af560f6bb6.debug
    [ 42015 ] {} <Fatal> BaseDaemon: 3. DB::Connection::receivePacket(std::__1::function<void (Poco::Net::Socket&)>) @ 0xf82de19 in /usr/lib/debug/.build-id/4f/9644af560f6bb6.debug
    [ 42015 ] {} <Fatal> BaseDaemon: 4. DB::MultiplexedConnections::receivePacketUnlocked(std::__1::function<void (Poco::Net::Socket&)>) @ 0xf83b9a5 in /usr/lib/debug/.build-id/4f/9644af560f6bb6.debug
    [ 42015 ] {} <Fatal> BaseDaemon: 5. DB::MultiplexedConnections::drain() @ 0xf83c0e0 in /usr/lib/debug/.build-id/4f/9644af560f6bb6.debug
    [ 42015 ] {} <Fatal> BaseDaemon: 6. DB::RemoteQueryExecutor::finish(std::__1::unique_ptr<DB::RemoteQueryExecutorReadContext, std::__1::default_delete<DB::RemoteQueryExecutorReadContext> >*) @ 0xe9a6fa7 in /usr/lib/debug/.build-id/4f/9644af560f6bb6.debug
    [ 42015 ] {} <Fatal> BaseDaemon: 7. DB::PipelineExecutor::tryAddProcessorToStackIfUpdated() @ 0xf95016c in /usr/lib/debug/.build-id/4f/9644af560f6bb6.debug
    ...
2021-02-16 09:32:20 +03:00
Nikolai Kochetov
f139ad8080 Comment debug output. 2021-02-16 09:15:12 +03:00
Alexander Tokmakov
bf6f64a3fb Merge branch 'master' into database_replicated 2021-02-16 01:28:19 +03:00
kssenii
2a887b9772 Add missing format factory settings 2021-02-15 22:06:10 +00:00
Kruglov Pavel
6dcb306060
Style 2021-02-16 00:46:51 +03:00
Pavel Kruglov
937a3192eb Fix data race 2021-02-16 00:06:34 +03:00
vdimir
5273242f86
Minor changes move ON to WHERE for INNER JOIN 2021-02-15 23:26:29 +03:00
Alexander Tokmakov
cf57c3b4a2 update comments 2021-02-15 23:01:21 +03:00
Nikolai Kochetov
85277d6a41 Comment debug output. 2021-02-15 22:54:47 +03:00
Nikolai Kochetov
ae73600fb0 Refactor row level security actions. 2021-02-15 22:48:06 +03:00
Maksim Kita
e3003add57 HashTable fix bug during resize with nonstandard grower 2021-02-15 22:23:10 +03:00
alesapin
ed9f2b5eb9 Linkable code 2021-02-15 21:01:01 +03:00
alesapin
5401116988 Compileable code 2021-02-15 20:59:40 +03:00
Kruglov Pavel
28dec516ac
Style 2021-02-15 19:12:03 +03:00
alesapin
d9a0af5a27
Merge pull request #20496 from ClickHouse/disable_snapshots_in_tests
Disable testkeeper snapshots for tests
2021-02-15 19:10:44 +03:00
alesapin
3ce3360379 Some initial code 2021-02-15 18:36:25 +03:00
Pavel Kruglov
454b1e0d60 Merge branch 'hedged-requests' of github.com:Avogar/ClickHouse into hedged-requests 2021-02-15 17:44:29 +03:00
Pavel Kruglov
eb0847e2b6 Style 2021-02-15 17:44:05 +03:00
Kruglov Pavel
598576ce70
Merge branch 'master' into hedged-requests 2021-02-15 16:51:45 +03:00
Pavel Kruglov
df09a5cac9 Refactor 3.0 and fix tests 2021-02-15 16:21:36 +03:00
Nikita Mikhailov
d41b2a4d06 Merge branch 'master' of github.com:ClickHouse/ClickHouse into keen-wolf-filefuncwithreadbuf 2021-02-15 16:15:52 +03:00
Anton Popov
b67b16cdf3
Merge pull request #20476 from amosbird/ctefix2
Fix global-with with subqueries
2021-02-15 16:14:50 +03:00
Nikita Mikhailov
d615b8e516 more checks
(cherry picked from commit b45168ecaf37d0061edfd12c67a8c5300d45d2e3)
2021-02-15 16:11:16 +03:00
alexey-milovidov
c7ab86b8c3
Merge pull request #20472 from ClickHouse/improve-performance-group-by-multiple-fixed-keys
Improve performance of GROUP BY multiple fixed size keys
2021-02-15 15:27:39 +03:00
alexey-milovidov
a299790522
Merge pull request #19748 from excitoon-favorites/s3ssec
Added Server Side Encryption Customer Keys support in S3 client
2021-02-15 15:23:14 +03:00
tavplubix
3f86ce4c67
Update StorageReplicatedMergeTree.cpp 2021-02-15 15:04:30 +03:00
Nikita Mikhaylov
92e13d76d3
Merge pull request #18508 from depressed-pho/runningConcurrency
Add function runningConcurrency()
2021-02-15 14:39:38 +03:00
Alexander Tokmakov
9c7cf9e92e remove some debug code 2021-02-15 13:26:34 +03:00
Nikita Mikhaylov
a77b740a7c
Merge pull request #20286 from nikitamikhaylov/json-import-bugfix
Error from allocator on JSON import
2021-02-15 12:40:09 +03:00
alesapin
9557bca4af
Merge pull request #20464 from azat/abnormal-server-termination-fix
Fix abnormal server termination when http client goes away
2021-02-15 11:10:29 +03:00
Azat Khuzhin
02198d091e Add proper checks while parsing directory names for async INSERT (fixes SIGSEGV) 2021-02-15 10:53:41 +03:00
alesapin
c1550814ca Disable snapshots for tests 2021-02-15 10:30:08 +03:00
Alexey Milovidov
bc3b0d61f9 Merge branch 'master' into in-memory-compression 2021-02-15 04:12:22 +03:00
Alexey Milovidov
8b7063acf4 Merge branch 'master' into improve-performance-group-by-multiple-fixed-keys 2021-02-15 04:11:01 +03:00
alexey-milovidov
71acb2ffda
Merge pull request #20475 from ClickHouse/intdiv-ubsan-2
Fix UBSan report in intDiv
2021-02-15 04:05:16 +03:00
Alexander Tokmakov
320fd6b264 startup without zk 2021-02-15 03:04:46 +03:00
alexey-milovidov
bde4da0ff0
Merge pull request #20465 from azat/write-abnormal-server-termination-fixes
Fix abnormal server terminations due to write failures
2021-02-15 00:05:48 +03:00
Alexey Milovidov
459ea4132d Merge branch 'master' into in-memory-compression 2021-02-15 00:00:47 +03:00
Alexey Milovidov
96dc69609c Fix Arcadia 2021-02-15 00:00:18 +03:00
Alexey Milovidov
d529db5498 Adjustments 2021-02-14 23:57:25 +03:00
alexey-milovidov
8be8746643
Merge pull request #20461 from azat/join_use_nulls-logical-error-fix
Fix LOGICAL_ERROR for join_use_nulls=1 when JOIN contains const from SELECT
2021-02-14 23:28:50 +03:00
Denis Glazachev
45e90961f7 Store and process alias_actions in FilterInfo 2021-02-14 21:16:40 +04:00
Alexey Milovidov
f409a6d4a7 Fix build 2021-02-14 19:00:47 +03:00
Alexey Milovidov
3bba2cc8b7 Merge branch 'master' into improve-performance-group-by-multiple-fixed-keys 2021-02-14 19:00:04 +03:00
Amos Bird
ed49367fc7
Fix global-with with subqueries 2021-02-14 14:20:23 +08:00
Alexey Milovidov
55c17ac93f Fix UBSan report in intDiv 2021-02-14 06:11:12 +03:00
alexey-milovidov
d39398baa6
Merge pull request #20468 from ClickHouse/speedup-memory
Performance improvement of StorageMemory by Nikolai Kochetov
2021-02-14 06:07:04 +03:00
Alexey Milovidov
ddb2cbcf6d Merge branch 'master' into in-memory-compression 2021-02-14 04:32:41 +03:00
alexey-milovidov
9db6f4a452
Merge pull request #20466 from azat/mt-logging
Improve logging during reading from MergeTree
2021-02-14 04:30:31 +03:00
alexey-milovidov
a0fbc0656b
Merge pull request #20206 from ClickHouse/tavplubix-patch-3
Suppress signed overflow in AggregateFunctionGroupArrayMoving
2021-02-14 03:32:16 +03:00
Alexey Milovidov
5bdc570046 Improve performance of GROUP BY multiple fixed size keys 2021-02-14 01:56:04 +03:00
Denis Glazachev
99a04b6c64 Merge branch 'master' into row-policy-with-prewhere
* master: (759 commits)
  Suppress UBSan report in Decimal comparison
  Suppress UBSan report in Decimal comparison
  Fix UBSan report in arrayDifference
  Update README.md
  Non significant change in AggregationCommon
  Print stack trace on SIGTRAP
  Fix dependent test
  Fix tests for better parallel run
  Add test for already working code
  Revert "Fix access control manager destruction order"
  Update index.md
  Update index.md
  Update index.md
  Bit more complicated example for isIPv4String - ru
  Bit more complicated example for isIPv4String
  cleanup
  Replace database with ordinary
  Added comments
  Split tests to make them stable
  Fixes
  ...

# Conflicts:
#	src/Storages/MergeTree/MergeTreeRangeReader.cpp
2021-02-14 02:24:00 +04:00
Denis Glazachev
79592b73f8 Store filter info in prewhere info instead of multiple prewheres
Some cleanups
2021-02-14 02:07:13 +04:00
Alexander Tokmakov
96cc01926c Merge branch 'master' into better_ddl_queue_cleanup 2021-02-14 00:22:09 +03:00
Alexey Milovidov
179a0f9d8b Performance improvement by Nikolai Kochetov 2021-02-13 22:51:38 +03:00
alexey-milovidov
024d8491d6
Merge pull request #20454 from ClickHouse/aggregation-common-non-significant-change
Non significant change in AggregationCommon
2021-02-13 19:36:33 +03:00
alexey-milovidov
3e9f1dc83b
Merge pull request #20458 from ClickHouse/array-difference-ubsan
Fix UBSan report in arrayDifference
2021-02-13 19:34:44 +03:00
Azat Khuzhin
68f23b7087 Improve logging during MergeTree reading
- Remove "Not using primary index on part {}" message (too noisy)
- Add number of total marks before filtering by primary key into the
  common message
- Make "Index {} has dropped {} / {} granules." not per-part, but
  per-query
2021-02-13 18:08:55 +03:00
Amos Bird
a551edd8d6
Do not parse view function in expression 2021-02-13 22:12:44 +08:00
Amos Bird
69d4120982
Disable table function view in expression 2021-02-13 21:39:37 +08:00
Azat Khuzhin
33f54cdb3c Fix abnormal server termination when http client goes away
In [1] stress tests found:

    2021.02.12 14:20:58.800988 [ 17728 ] {de3e7894-b401-4f7d-8530-90cd5ab06682} <Debug> executeQuery: (from [::1]:45792, using production parser) (comment: /usr/share/clickhouse-test/queries/0_stateless/01520_client_print_query_id.expect) SELECT * FROM numbers(34599)
    2021.02.12 14:20:58.916484 [ 17728 ] {de3e7894-b401-4f7d-8530-90cd5ab06682} <Trace> ContextAccess (default): Access granted: CREATE TEMPORARY TABLE ON *.*
    2021.02.12 14:20:59.071980 [ 17728 ] {de3e7894-b401-4f7d-8530-90cd5ab06682} <Trace> InterpreterSelectQuery: FetchColumns -> Complete
    2021.02.12 14:21:10.708202 [ 17728 ] {de3e7894-b401-4f7d-8530-90cd5ab06682} <Information> executeQuery: Read 34599 rows, 270.30 KiB in 11.876294055 sec., 2913 rows/sec., 22.76 KiB/sec.
    2021.02.12 14:22:10.506261 [ 17728 ] {de3e7894-b401-4f7d-8530-90cd5ab06682} <Debug> DynamicQueryHandler: Done processing query
    2021.02.12 14:22:18.238037 [ 375 ] {} <Fatal> BaseDaemon: (version 21.3.1.5996, build id: 8DBCED54529C989F7AD4D991F51410774D55DE6C) (from thread 17728) Terminate called for uncaught exception:
    Code: 24, e.displayText() = DB::Exception: Cannot write to ostream at offset 262994, Stack trace (when copying this message, always include the lines below):

    0. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/exception:0: Poco::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x15c976cb in /usr/bin/clickhouse
    1. ./obj-x86_64-linux-gnu/../src/Common/Exception.cpp:56: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0x8c9320e in /usr/bin/clickhouse
    2. ./obj-x86_64-linux-gnu/../src/IO/WriteBufferFromOStream.cpp:0: DB::WriteBufferFromOStream::nextImpl() @ 0x8d54da5 in /usr/bin/clickhouse
    3. ./obj-x86_64-linux-gnu/../src/IO/BufferBase.h:39: DB::WriteBufferFromOStream::~WriteBufferFromOStream() @ 0x8d551d7 in /usr/bin/clickhouse
    4. ./obj-x86_64-linux-gnu/../src/IO/WriteBufferFromOStream.cpp:44: DB::Write

    2021.02.12 14:22:18.811071 [ 18134 ] {} <Fatal> BaseDaemon: ########################################
    2021.02.12 14:22:18.878935 [ 18134 ] {} <Fatal> BaseDaemon: (version 21.3.1.5996, build id: 8DBCED54529C989F7AD4D991F51410774D55DE6C) (from thread 17728) (query_id: de3e7894-b401-4f7d-8530-90cd5ab06682) Received signal Aborted (6)
    2021.02.12 14:22:18.943148 [ 18134 ] {} <Fatal> BaseDaemon:
    2021.02.12 14:22:19.007073 [ 18134 ] {} <Fatal> BaseDaemon: Stack trace: 0x7f109932018b 0x7f10992ff859 0x8bb33ae 0x8e301dd 0x17dac8c4 0x17dac7c7 0x8c3fe0b 0x8d552c5 0x8d552ea 0x11a29914 0x11a2a2ca 0x12f96092 0x12f8c65e 0x12f84300 0x15b84110 0x15bc0913 0x15bc103f 0x15d29a12 0x15d27fb0 0x15d267b8 0x8badbad 0x7f10994d5609 0x7f10993fc293
    2021.02.12 14:22:19.255998 [ 18134 ] {} <Fatal> BaseDaemon: 5. raise @ 0x4618b in /usr/lib/x86_64-linux-gnu/libc-2.31.so
    2021.02.12 14:22:19.270203 [ 18134 ] {} <Fatal> BaseDaemon: 6. abort @ 0x25859 in /usr/lib/x86_64-linux-gnu/libc-2.31.so
    2021.02.12 14:22:50.108918 [ 370 ] {} <Fatal> Application: Child process was terminated by signal 6.

  [1]: https://clickhouse-test-reports.s3.yandex.net/19580/6aecb62416ece880cbb8ee3a803e14d841388dde/stress_test_(thread).html#fail1

Verified locally by commenting out->next() call in
WriteBufferFromHTTPServerResponse::nextImpl(), adding a sleep(1) and
canceling HTTP request before it finished, the stacktrace as follow:

    [ 6351 ] {} <Fatal> BaseDaemon: (version 21.3.1.1, build id: 9B40466BF3D2F5AED78A52A995A4A2FD3116787C) (from thread 6677) Terminate called for uncaught exception:
    Code: 24, e.displayText() = DB::Exception: Cannot write to ostream at offset 4, Stack trace (when copying this message, always include the lines below):

    0. /src/ch/clickhouse/.cmake/../src/Common/StackTrace.cpp:298: StackTrace::tryCapture() @ 0x30a52a in /src/ch/clickhouse/.cmake/src/libclickhouse_common_iod.so
    1. /src/ch/clickhouse/.cmake/../src/Common/StackTrace.cpp:260: StackTrace::StackTrace() @ 0x30a4e5 in /src/ch/clickhouse/.cmake/src/libclickhouse_common_iod.so
    2. /src/ch/clickhouse/.cmake/../src/Common/Exception.cpp:53: DB::Exception::Exception(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, bool) @ 0x2a61ae in /src/ch/clickhouse/.cmake/src/libclickhouse_common_iod.so
    3. /src/ch/clickhouse/.cmake/../src/IO/WriteBufferFromOStream.cpp:22: DB::WriteBufferFromOStream::nextImpl() @ 0x3b468a in /src/ch/clickhouse/.cmake/src/libclickhouse_common_iod.so
    4. /src/ch/clickhouse/.cmake/../src/IO/WriteBuffer.h:47

    <snip>
    [ 8966 ] {} <Fatal> BaseDaemon: 7. __cxxabiv1::__terminate(void (*)()) @ 0x1784ca in /src/ch/clickhouse/.cmake/contrib/replxx-cmake/libreplxxd.so
    <snip>
    [ 8966 ] {} <Fatal> BaseDaemon: 10. /src/ch/clickhouse/.cmake/../src/IO/WriteBufferFromOStream.cpp:0: DB::WriteBufferFromOStream::~WriteBufferFromOStream() @ 0x3b48c1 in /src/ch/clickhouse/.cmake/src/libclickhouse_common_iod.so
    [ 8966 ] {} <Fatal> BaseDaemon: 11. /src/ch/clickhouse/.cmake/../src/IO/WriteBufferFromOStream.cpp:44: DB::WriteBufferFromOStream::~WriteBufferFromOStream() @ 0x3b48ec in /src/ch/clickhouse/.cmake/src/libclickhouse_common_iod.so
    <snip>
    [ 8966 ] {} <Fatal> BaseDaemon: 14. /src/ch/clickhouse/.cmake/../src/IO/WriteBufferFromHTTPServerResponse.cpp:218: DB::WriteBufferFromHTTPServerResponse::~WriteBufferFromHTTPServerResponse() @ 0x3b33cd in /src/ch/clickhouse/.cmake/src/libclickhouse_common_iod.so
    <snip>
    [ 8966 ] {} <Fatal> BaseDaemon: 22. /src/ch/clickhouse/.cmake/../src/Server/HTTPHandler.h:43: DB::HTTPHandler::Output::~Output() @ 0x260421 in /src/ch/clickhouse/.cmake/src/libclickhouse_serverd.so
    [ 8966 ] {} <Fatal> BaseDaemon: 23. /src/ch/clickhouse/.cmake/../src/Server/HTTPHandler.cpp:778: DB::HTTPHandler::handleRequest(Poco::Net::HTTPServerRequest&, Poco::Net::HTTPServerResponse&) @ 0x253fd4 in /src/ch/clickhouse/.cmake/src/libclickhouse_serverd.so
2021-02-13 13:23:03 +03:00
Azat Khuzhin
592f62d0af Remove superfluous out->next() call in HTTPHandler 2021-02-13 13:22:37 +03:00
Azat Khuzhin
06e8065ee6 Add missing sync of underlying files 2021-02-13 13:19:51 +03:00
Azat Khuzhin
fa329808e5 Call next() from sync()/finalize() in WriteBuffer 2021-02-13 13:14:11 +03:00
Ilya Yatsishin
8ff458a2bf
Merge pull request #20459 from ClickHouse/decimal-comparison-ubsan 2021-02-13 12:34:40 +03:00
Azat Khuzhin
cbeda6c60e Fix LOGICAL_ERROR for join_use_nulls=1 when JOIN contains const from SELECT 2021-02-13 11:05:25 +03:00
alesapin
f80137626a
Merge pull request #19580 from ClickHouse/in_memory_raft
In memory coordination inside ClickHouse
2021-02-13 10:19:23 +03:00
Alexey Milovidov
1546f5bcb9 Suppress UBSan report in Decimal comparison 2021-02-13 03:54:38 +03:00
Alexey Milovidov
1c55be261c Fix UBSan report in arrayDifference 2021-02-13 03:45:06 +03:00
Alexander Kuzmenkov
716a3df6eb
Merge pull request #20337 from ClickHouse/aku/window-prototype
window function rank() and friends
2021-02-13 03:03:49 +03:00
alexey-milovidov
2fe2190a20
Merge pull request #19721 from azat/buffer-profile
Add separate config directive for Buffer profile
2021-02-13 02:43:41 +03:00
alexey-milovidov
04701376ac
Merge pull request #20232 from ClickHouse/fix_int_field_to_decimal_conversion
Fix integer Field to Decimal conversion
2021-02-13 02:22:32 +03:00
alexey-milovidov
371e84957a
Merge pull request #20303 from azat/constant-folding-fixes
Do not allow early constant folding of explicitly forbidden functions
2021-02-13 02:20:06 +03:00
Alexey Milovidov
34f5ea00e4 Merge branch 'master' into in-memory-compression 2021-02-13 02:08:40 +03:00
Alexey Milovidov
3f8336963b Non significant change in AggregationCommon 2021-02-13 00:30:58 +03:00
Alexey Milovidov
b5826121db Fix Arcadia 2021-02-13 00:29:06 +03:00
Alexey Milovidov
453450985f Performance improvement by Nikolai Kochetov 2021-02-13 00:26:25 +03:00
Alexey Milovidov
1c656830fc Fix clang-tidy 2021-02-13 00:26:12 +03:00
Alexander Tokmakov
184ec67dac better ddl queue cleanup 2021-02-12 22:23:50 +03:00
Nikita Mikhailov
2a52aa8ca3 fix test 2021-02-12 20:25:40 +03:00
Alexander Tokmakov
f64f9b672b fix 2021-02-12 19:22:01 +03:00
alesapin
a25ce1c166
Revert "Fix access control manager destruction order" 2021-02-12 19:13:57 +03:00
Nikolai Kochetov
f1c32c4690 Merge branch 'master' into filter-push-down 2021-02-12 18:26:08 +03:00
Nikolai Kochetov
90c7cf5a52 Push down for ArrayJoin 2021-02-12 18:24:31 +03:00
Nikolai Kochetov
bbed905461 Fix ActionsDAG::removeUnusedResult 2021-02-12 18:20:54 +03:00
Nikita Mikhailov
fcd080631f Merge branch 'master' of github.com:ClickHouse/ClickHouse into keen-wolf-filefuncwithreadbuf 2021-02-12 17:53:18 +03:00
alexey-milovidov
f669a9f97a
Merge pull request #20348 from kitaisreal/common-types-template-instantiations
Common types template instantiations
2021-02-12 15:53:00 +03:00
Nikolai Kochetov
2ba503a9cc
Merge pull request #20110 from vitlibar/mongodb-doesnt-connect-before-read
MongoDB table engine now establishes connection only when it reads data.
2021-02-12 15:49:45 +03:00
Nikita Mikhaylov
3174c57562
Update src/Formats/JSONEachRowUtils.cpp
Co-authored-by: tavplubix <tavplubix@gmail.com>
2021-02-12 15:29:19 +03:00
Nikolai Kochetov
93e1428f21 Fix limit push down. 2021-02-12 13:51:16 +03:00
Alexander Kuzmenkov
824475b224 cleanup 2021-02-12 13:37:27 +03:00
Nikolai Kochetov
443a3e7e6f Fix limit push down. 2021-02-12 13:12:31 +03:00
alesapin
a94e223cee
Merge pull request #20344 from azat/join_use_nulls-fix
Fix null dereference with join_use_nulls=1
2021-02-12 12:48:53 +03:00
Nikolai Kochetov
7e75965af8 Fix ActionsDAG::splitActionsForFilter 2021-02-12 12:35:26 +03:00
alesapin
9aadbde86c
Merge pull request #20339 from kitaisreal/decimal-binary-operation-constants-fix
Decimal binary operation constants fix
2021-02-12 12:32:58 +03:00
Maksim Kita
f9527738c9 Added comments 2021-02-12 12:12:04 +03:00
Maksim Kita
e141367bcf
Merge pull request #20345 from azat/RANGE_HASHED-dict-fix
Avoid invalid dereference in RANGE_HASHED() dictionary
2021-02-12 11:05:10 +03:00
alesapin
a2bb586170
Merge pull request #20335 from ClickHouse/fix_scheduling_of_non_successful_background_tasks
Fix backoff for failed background tasks in replicated merge tree
2021-02-12 10:06:04 +03:00
Alexey Milovidov
170daa5d65 Generate ya.make 2021-02-12 05:33:39 +03:00
Alexey Milovidov
71d84b9f67 Fix style 2021-02-12 03:52:53 +03:00
Alexey Milovidov
ed7270dd8b Better interface 2021-02-12 03:25:00 +03:00
alexey-milovidov
4e32dbd024
Merge pull request #19317 from abyss7/dwarf-folly
Print inline frames for fatal stacktraces
2021-02-12 02:38:50 +03:00
Alexander Tokmakov
c9cf63e958 fix 2021-02-12 01:23:40 +03:00
alexey-milovidov
5a4a5fda20
Update ColumnVector.h 2021-02-12 01:04:55 +03:00
Maksim Kita
b276eac197 Common types template instantiations 2021-02-12 00:54:50 +03:00
Alexey Milovidov
5355175e49 Development 2021-02-12 00:26:14 +03:00
Alexey Milovidov
a2da05039e Merge branch 'master' into in-memory-compression 2021-02-11 23:59:14 +03:00
Alexey Milovidov
b61ce427a8 Whitespaces 2021-02-11 23:59:00 +03:00
alesapin
5f32f65211 Merge branch 'master' into in_memory_raft 2021-02-11 23:09:29 +03:00
Azat Khuzhin
f6cfcd4da9 Fix null dereference with join_use_nulls=1
Found with MSan [1], the following query triggers null dereference:

```sql
SELECT
    Y.id - 1
FROM X
RIGHT JOIN Y ON (X.id + 1) = Y.id
SETTINGS join_use_nulls=1; -- { serverError 53 }
```

```
Received signal 11
(version 21.3.1.5916, build id: 2E9E84AA32AEAAC7C8B6EB45DA3EC0B4F15E9ED4) (from thread 100) (query_id: 9ab8cb0d-be8d-445e-8498-930a7268488b) Received signal Segmentation fault (11)
Address: 0x10 Access: read. Address not mapped to object.
Stack trace: 0x2d079d65 0x29bf1f30 0x12b12220 0x12b13098 0x12b17b08 0x12b20459 0x2ae37913 0x2ae352d9 0x2c746072 0x2c7585dd 0x2c7483e3 0x2c74e63d 0x2c7483e3 0x2c74e63d 0x2c7483e3 0x2c74e63d 0x2c7483e3 0x2c74e63d 0x2c7483e3 0x2c74e63d 0x2c7483e3 0x2c74e63d 0x2c7483e3 0x2c74e63d 0x2c7483e3 0x2c74e63d 0x2c7483e3 0x2c74e63d
4. ./obj-x86_64-linux-gnu/../contrib/boost/boost/smart_ptr/intrusive_ptr.hpp:0: DB::ColumnConst::ColumnConst(COW<DB::IColumn>::immutable_ptr<DB::IColumn> const&, unsigned long) @ 0x2d079d65 in /workspace/clickhouse
5. ./obj-x86_64-linux-gnu/../src/Common/COW.h:0: DB::createBlockWithNestedColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&) @ 0x29bf1f30 in /workspace/clickhouse
6. DB::FunctionOverloadResolverAdaptor::getReturnTypeDefaultImplementationForNulls(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::function<std::__1::shared_ptr<DB::IDataType const> (std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&)> const&) @ 0x12b12220 in /workspace/clickhouse
7. DB::FunctionOverloadResolverAdaptor::getReturnTypeWithoutLowCardinality(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&) const @ 0x12b13098 in /workspace/clickhouse
8. DB::FunctionOverloadResolverAdaptor::getReturnType(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&) const @ 0x12b17b08 in /workspace/clickhouse
9. DB::FunctionOverloadResolverAdaptor::build(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&) const @ 0x12b20459 in /workspace/clickhouse
```

  [1]: https://clickhouse-test-reports.s3.yandex.net/19451/64c0bf98290362fa216c05b070aa122a12af3c25/fuzzer_msan/report.html#fail1
2021-02-11 21:30:05 +03:00
alexey-milovidov
dc3ffd3fe2
Merge pull request #19451 from azat/safe-writes
Do not silently ignore write errors
2021-02-11 21:19:11 +03:00
Azat Khuzhin
2907385400 Avoid invalid dereference in RANGE_HASHED() dictionary
UBsan report the following [1], when query does not contains any columns
from the dictionary:

```sql
SELECT
    toUInt32(toUInt32(NULL, toUInt32(NULL, inf, NULL), NULL)),
    toUInt32(toUInt32(toUInt32(toUInt32(toUInt32(NULL, 1., NULL)), toUInt32(toUInt32(NULL, 0.5, NULL)), toUInt32(NULL, NULL)), toUInt32(toUInt32(NULL, 1., NULL)), toUInt32(NULL, NULL)), toUInt32(toUInt32(toUInt32(toUInt32(NULL, 1000.0001220703125, NULL)), toUInt32(toUInt32(NULL, 10.000100135803223, NULL)), toUInt32(NULL, NULL)), NULL, NULL, NULL))
FROM somedict
```

```
std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >::back() @ 0x128c07a6 in /workspace/clickhouse
./obj-x86_64-linux-gnu/../src/Dictionaries/RangeDictionaryBlockInputStream.h:0: DB::RangeDictionaryBlockInputStream<DB::RangeHashedDictionary, unsigned short, unsigned long>::fillBlock(DB::PODArray<unsigned long, 4096ul, Allocator<false, false>, 15ul, 16ul> const&, DB::PODArray<unsigned short, 4096ul, Allocator<false, false>, 15ul, 16ul> const&, DB::PODArray<unsigned short, 4096ul, Allocator<false, false>, 15ul, 16ul> const&) const @ 0x1692335e in /workspace/clickhouse
./obj-x86_64-linux-gnu/../src/Dictionaries/RangeDictionaryBlockInputStream.h:0: DB::RangeDictionaryBlockInputStream<DB::RangeHashedDictionary, unsigned short, unsigned long>::getBlock(unsigned long, unsigned long) const @ 0x16922f96 in /workspace/clickhouse
./obj-x86_64-linux-gnu/../src/Dictionaries/DictionaryBlockInputStreamBase.cpp:23: DB::DictionaryBlockInputStreamBase::getHeader() const @ 0x166ab57c in /workspace/clickhouse
```

  [1]: https://clickhouse-test-reports.s3.yandex.net/19451/64c0bf98290362fa216c05b070aa122a12af3c25/fuzzer_ubsan/report.html#fail1
2021-02-11 21:07:37 +03:00
alexey-milovidov
7b55eb8c58
Merge pull request #20178 from amosbird/delayinactive
Delay or throw insertion when too many inactive parts
2021-02-11 20:52:04 +03:00
alexey-milovidov
ef3c9b531c
Merge pull request #20287 from kitaisreal/delta-sum-aggregate-function-use-restrict-keyword
Aggregate function deltaSum use restrict keyword
2021-02-11 20:47:07 +03:00
alexey-milovidov
d15d340691
Merge pull request #20301 from azat/numbers-numeric-limit
Accept arbitrary numeric types for numbers() arguments (for scientific notation)
2021-02-11 20:41:15 +03:00
Nikolai Kochetov
93ea1e5e82 Comment output 2021-02-11 20:13:59 +03:00
Alexander Kuzmenkov
1275be58bf Merge remote-tracking branch 'origin/master' into HEAD 2021-02-11 19:49:37 +03:00
Alexander Kuzmenkov
ebb47595aa
Merge pull request #20293 from ClickHouse/aku/window-prototype-3
make window functions faster
2021-02-11 19:49:02 +03:00
Alexander Kuzmenkov
a77415781f reserve the result columns in advance 2021-02-11 19:48:27 +03:00
Alexander Kuzmenkov
62b3bf7b57 some tests and speedup 2021-02-11 19:20:57 +03:00
Nikolai Kochetov
a26c8d9eee Fix const filter resilt for filter push down. 2021-02-11 19:08:54 +03:00
Maksim Kita
369dc613c4 Decimal binary operation constants fix 2021-02-11 19:05:17 +03:00
Alexander Kuzmenkov
a2943fd196 cleanpu 2021-02-11 18:47:52 +03:00
Nikolai Kochetov
2deff0d9d0 Fix ActionsDAG::splitActionsForFilter 2021-02-11 18:44:10 +03:00
Alexander Kuzmenkov
d8f9a8d3cd first_value and last_value 2021-02-11 18:41:54 +03:00
Ivan
0854dccfde
Fix ANTLR parser tests 2021-02-11 18:21:21 +03:00
Alexander Tokmakov
9afb16759e fix 2021-02-11 18:14:38 +03:00
Alexander Kuzmenkov
ecbcf47f28 lag/lead stubs + cleanup 2021-02-11 18:07:42 +03:00
Alexander Kuzmenkov
772073a0db
Update WindowTransform.cpp 2021-02-11 17:01:09 +03:00
Alexey Milovidov
9b4f6fb711 Don't compress small blocks 2021-02-11 16:41:21 +03:00
Alexey Milovidov
4d650a2a56 Adjust config 2021-02-11 16:41:21 +03:00
Alexey Milovidov
280f459f71 Fix quadratic INSERT 2021-02-11 16:41:21 +03:00
Alexey Milovidov
d539948fe7 In memory compression: a prototype 2021-02-11 16:40:15 +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
Alexander Kuzmenkov
525400bc41 window function rank() and friends 2021-02-11 16:29:30 +03:00
alesapin
447fcfa1c9 Fix build 2021-02-11 15:12:01 +03:00
Nikolai Kochetov
e24b8e8a13 Fix ActionsDAG::splitActionsForFilter 2021-02-11 15:06:28 +03:00
alesapin
3253638969 Fix backoff for failed background tasks in replicated merge tree 2021-02-11 14:46:18 +03:00
alesapin
99a471e047 Add ability to start as follower 2021-02-11 13:25:10 +03:00
alesapin
0acd018361 Fix typo 2021-02-11 12:58:02 +03:00
alesapin
74630acff5 More debug in test 2021-02-11 12:49:49 +03:00
tavplubix
17af32a59b
Merge pull request #20215 from azat/dist-lockless-SYSTEM-FLUSH-DISTRIBUTED
Lockless SYSTEM FLUSH DISTRIBUTED
2021-02-11 12:30:46 +03:00
alesapin
b49b7f859d Simplify startup with fixed config 2021-02-11 12:17:57 +03:00
Nikolai Kochetov
3a020d2dd5 filter push down for Aggregating 2021-02-11 11:49:12 +03:00
Alexander Kuzmenkov
363007b964 fixes 2021-02-11 11:39:39 +03:00
alesapin
d88f7bc0c8
Merge pull request #20224 from ClickHouse/fix_config_reloader_destruction
Fix access control manager destruction order
2021-02-11 11:18:00 +03:00
alesapin
56453256b7
Merge pull request #20300 from ClickHouse/restrict_to_drop_version_column
Don't allow to drop or rename version column
2021-02-11 11:04:00 +03:00
alesapin
121c5c9605
Merge pull request #20279 from ClickHouse/relax_check_in_data_writer
Relax check in data writer for non adaptive tables
2021-02-11 10:57:07 +03:00
alesapin
c2bb2c2902
Merge pull request #20097 from ClickHouse/remove-adding-missed-step
Build actions dag to evaluate missing defaults.
2021-02-11 10:51:21 +03:00
Alexander Kuzmenkov
467ff74814 Merge remote-tracking branch 'origin/master' into HEAD 2021-02-11 10:42:39 +03:00
Alexander Kuzmenkov
38678ff484 Merge remote-tracking branch 'origin/master' into HEAD 2021-02-11 10:40:05 +03:00
Alexander Kuzmenkov
2571dac984
Merge pull request #20111 from ClickHouse/aku/window-prototype
RANGE OFFSET window frame
2021-02-11 10:39:21 +03:00
Vladimir Ch
73a0e2961b
Merge pull request #20175 from amosbird/countrewrite 2021-02-11 09:38:12 +03:00
Alexey Milovidov
dbb41ce4e2 Remove debug output 2021-02-11 02:55:52 +03:00
Alexey Milovidov
f442b30f30 Fix test 2021-02-11 01:23:27 +03:00
alexey-milovidov
e33477a16e
Merge pull request #20282 from ClickHouse/dont_allow_ttl_for_old_syntax
Don't allow TTL in old syntax
2021-02-11 00:46:30 +03:00
Azat Khuzhin
6b82e8ad19 Mark ignore() as not suitable for constant folding 2021-02-11 00:39:03 +03:00
Azat Khuzhin
53ea58810e Do not allow constant folding of explicitly forbidden functions 2021-02-11 00:38:47 +03:00
Alexey Milovidov
d3dba0e52a Merge branch 'master' into no-excessive-squash-memory 2021-02-10 23:45:12 +03:00
Alexander Tokmakov
15256d86e5 better replica recovery and queue cleanup 2021-02-10 23:30:40 +03:00
Azat Khuzhin
809fa7e4cc Sync SYSTEM FLUSH DISTRIBUTED with TRUNCATE 2021-02-10 23:10:37 +03:00
Anton Popov
365e2fb746
Merge pull request #20231 from fuwhu/refine-loadDataParts-code
refine code in MergeTreeData::loadDataParts to avoid parsing WAL file as data part
2021-02-10 22:42:31 +03:00
alesapin
6f837b41e3
Update inplaceBlockConversions.h 2021-02-10 22:32:34 +03:00
Azat Khuzhin
5001b19613 Accept arbitrary numeric types for numbers() arguments (for scientific notation)
This is to make the syntax simpler, i.e. avoid explicit cast to UInt64
if you want to use scientific notation (i.e. 1e9 over 1 000 000 000).

v2: use plain evaluateConstantExpression() over
evaluateConstantExpressionOrIdentifierAsLiteral() since identifier will
not work anyway
2021-02-10 22:32:32 +03:00
alesapin
891fce3275 Don't allow to drop or rename version column 2021-02-10 22:23:48 +03:00
Alexander Kuzmenkov
695e3a797a some optimizations 2021-02-10 21:55:11 +03:00
Azat Khuzhin
935870b2c2 Add separate config directive for Buffer profile
If you push data via Buffer engine then all your queries will be done
from one user, however this is not always desired behavior, since this
will not allow to limit queries with max_concurrent_queries_for_user and
similar.
2021-02-10 21:40:26 +03:00
Alexey Milovidov
30b2554fa3 Fix error 2021-02-10 20:48:39 +03:00
Nikolai Kochetov
a83885392e Split filter for predicate push down. 2021-02-10 20:47:48 +03:00
Anton Popov
ece7e87cfb
Merge pull request #20079 from ClickHouse/vdimir/fix-join-used-flag
Split use flags and RowRef in HashJoin
2021-02-10 20:34:22 +03:00
Nikolai Kochetov
48f6f7e490 Split filter for predicate push down. 2021-02-10 19:26:49 +03:00
Maksim Kita
86ff45c50e Aggregate function deltaSum use restrict keyword 2021-02-10 19:19:48 +03:00
Nikita Mikhailov
47f62e899b style 2021-02-10 17:52:28 +03:00
Nikita Mikhailov
6c9f5e4991 try 2021-02-10 17:16:27 +03:00
Alexander Kuzmenkov
e557d60cdb fixes for sort order 2021-02-10 16:27:22 +03:00
alesapin
b4d53886a3 Add sync request/response 2021-02-10 16:01:05 +03:00
Nikolai Kochetov
af214e794f Review fixes. 2021-02-10 15:45:39 +03:00
Alexander Kuzmenkov
d5b0f30732 cache the block size in the block itself for some speedup 2021-02-10 15:44:07 +03:00
Alexander Kuzmenkov
b57b3244f5 reuse sort order 2021-02-10 15:44:07 +03:00
Alexander Kuzmenkov
a67a54e2a5 cleanup 2021-02-10 15:44:07 +03:00
alesapin
a63d73db58 Don't allow TTL in old syntax 2021-02-10 15:09:12 +03:00
alesapin
e07bdad5c0 Fix test build 2021-02-10 14:44:21 +03:00
alesapin
420f2958e2
Merge pull request #19991 from ClickHouse/constant-propagation-fix
Do not use inputs which values are known constants in ActionsDAG.
2021-02-10 14:13:52 +03:00
alesapin
21faea1f68 Relax check in data writer for non adaptive tables 2021-02-10 13:43:31 +03:00
Maksim Kita
85396fc82e
Merge pull request #20057 from rf/rf/add-deltasum
Add `deltaSum` aggregate function, docs & test
2021-02-10 13:28:48 +03:00
alesapin
0d179e021b Add sync cmd 2021-02-10 13:15:42 +03:00
alesapin
57d8d81d59 Fix style 2021-02-10 13:02:09 +03:00
alesapin
9179fc8d96
Merge pull request #20226 from ClickHouse/fix_race_in_system_parts
Fix benign race in system.parts
2021-02-10 12:45:51 +03:00
alesapin
c95140d906 Better startup and non-verbose logging by default 2021-02-10 12:28:53 +03:00
Nikolai Kochetov
253c72afc4
Merge pull request #20251 from ClickHouse/fix-20242
Fix not closed ports in DelayedPortsProcessor
2021-02-10 12:28:28 +03:00
vdimir
d9afee55ba
Add RewriteCountVariantsVisitor.cpp to ya.make 2021-02-10 12:48:41 +08:00
Amos Bird
fc6c57f8e0
Fix 2021-02-10 12:48:41 +08:00
Amos Bird
565a148da9
Normalize count() variants 2021-02-10 12:48:41 +08:00
Amos Bird
afb5846a24
refactor 2021-02-10 11:22:24 +08:00
HuFuwang
4ac8860cea refine code in MergeTreeData::loadDataParts to avoid parsing WAL file as data part. 2021-02-10 10:13:43 +08:00
alexey-milovidov
4ff3a28a9f
Merge pull request #20211 from amosbird/fixcte2
Fix CTE in INSERT-SELECT
2021-02-10 02:12:05 +03:00
alexey-milovidov
21b1a3fc6d
Merge pull request #20246 from ucasFL/avg-optimize
fix a problem in ArithmeticOperationsInAgrFuncOptimize
2021-02-10 02:10:15 +03:00
alexey-milovidov
ec9808bf63
Merge pull request #20228 from ClickHouse/add_some_final_specifiers
Add final to some classes
2021-02-09 23:37:47 +03:00
Russ Frank
6b80ae6c4f style fixes 2021-02-09 15:01:57 -05:00
Nikolai Kochetov
8ba9576ed9 Added comment. 2021-02-09 22:52:48 +03:00
Nikolai Kochetov
27d607a955 Respect header in addMissingDefaults 2021-02-09 22:48:34 +03:00
alesapin
51c221f993 Fix outdated session kill 2021-02-09 21:29:06 +03:00
Vladimir Ch
a8acaafd56
Merge pull request #20223 from vdimir/fix-array-join-missing-arg
Handle syntax error for ARRAY JOIN with no args
2021-02-09 20:13:09 +03:00
alesapin
9d414d215e Merge branch 'master' into in_memory_raft 2021-02-09 20:00:50 +03:00
Alexander Kuzmenkov
a2a0d385c5 style 2021-02-09 19:50:39 +03:00
Nikolai Kochetov
db09d5a990 Fix not closed ports in DelayedPortsProcessor 2021-02-09 19:35:46 +03:00
Vitaly Baranov
9de7a0a779
Add comment 2021-02-09 18:55:36 +03:00
alesapin
c78f3ba204 Missed file 2021-02-09 18:39:15 +03:00
Alexander Kuzmenkov
8212976dc0 add boundary order check 2021-02-09 18:36:08 +03:00
Maksim Kita
a2560cecf4
Merge branch 'master' into fuse 2021-02-09 18:30:18 +03:00
Alexander Tokmakov
2c6a0e74fb better replica creation 2021-02-09 18:14:20 +03:00
alesapin
b130fbfd78 Add coordination settings 2021-02-09 17:47:18 +03:00
Alexander Kuzmenkov
c18749a704 fix a bug and add some tests 2021-02-09 17:44:04 +03:00
feng lv
5e0095c70b fix a problem in ArithmeticOperationsInAgrFuncOptimize 2021-02-09 14:17:48 +00:00
alexey-milovidov
faf28eeff3
Merge pull request #20183 from ucasFL/avg-optimize
rewrite avg for algebraic optimization
2021-02-09 16:36:13 +03:00
alesapin
9667bdcbd2 Merge branch 'master' into in_memory_raft 2021-02-09 16:06:31 +03:00
Alexander Kuzmenkov
6e40b9fb6c fix for the DESC frame 2021-02-09 14:56:58 +03:00
Alexander Kuzmenkov
fe8b414a69 cleanup 2021-02-09 14:56:58 +03:00
tavplubix
86530e603c
Merge pull request #20027 from bharatnc/ncb/event_time_micro_part_log
add event_time_microseconds field to system.part_log table
2021-02-09 14:46:40 +03:00
Alexander Tokmakov
4859657c42 fix int field to decimal conversion 2021-02-09 13:21:54 +03:00
hexiaoting
28b981a76b Fix style error and test cases error 2021-02-09 18:08:55 +08:00
alesapin
cb1194d37a Add final to some classes 2021-02-09 12:05:54 +03:00
alesapin
8da9f150de Fix race in system.parts 2021-02-09 11:51:17 +03:00
Nikolai Kochetov
798ffdc719 Fix build. 2021-02-09 11:37:55 +03:00
Nikolai Kochetov
229acbad5d
Merge pull request #20077 from ClickHouse/remove-adding-const-column-transform
Remove AddingConstColumn step and transform.
2021-02-09 11:28:44 +03:00
alesapin
accf48a21b
Merge pull request #20212 from nvartolomei/codespace-4851
Remove dead code
2021-02-09 11:27:27 +03:00
alesapin
15ce3dc112 Fix access control manager destruction order 2021-02-09 11:24:39 +03:00
vdimir
241769ee7c
Handle syntax error for ARRAY JOIN with no args 2021-02-09 11:21:26 +03:00
Russ Frank
2cde36a155 dont allow col type to be decimal 2021-02-08 22:53:45 -05:00
Russ Frank
b297e0ef36 feedback: use references, dont support decimal, rearrange struct members 2021-02-08 22:51:03 -05:00
Amos Bird
8911a038a0
Another fix 2021-02-09 11:46:06 +08:00
Pavel Kruglov
4cc7e2c5c6 Update comment 2021-02-09 05:13:47 +03:00
Pavel Kruglov
22b8bc6c99 Refactor 2.0 2021-02-09 05:01:09 +03:00
Pavel Kruglov
df5dc102c4 Don't use 'ReplicaStatePtr &' to prevent use-after-free 2021-02-08 23:58:02 +03:00
Russ Frank
746dc1ddae Merge remote-tracking branch 'origin/master' into rf/add-deltasum 2021-02-08 15:35:16 -05:00
alexey-milovidov
38c7ad3c38
Merge pull request #20204 from amosbird/fixubs
Fix ubsan error
2021-02-08 23:19:16 +03:00
Alexander Tokmakov
5e0cbfe972 Merge branch 'master' into database_replicated 2021-02-08 23:01:12 +03:00
alesapin
b8baf3a443 Fix some warnings 2021-02-08 22:40:44 +03:00
Alexander Tokmakov
78c1d69b8c better code 2021-02-08 22:36:17 +03:00
tavplubix
ac477d9850
Merge pull request #19771 from ClickHouse/thread_state_improvements
Minor code improvements around ThreadStatus
2021-02-08 22:34:55 +03:00
Nikolai Kochetov
e0a806c180
Delete filterPushDown.cpp 2021-02-08 22:10:27 +03:00
Azat Khuzhin
ce91c257b2 Lockless SYSTEM FLUSH DISTRIBUTED
Right now SYSTEM FLUSH DISTRIBUTED will block:
- INSERT into this Distributed table (requireDirectoryMonitor())
- SELECT * FROM system.distribution_queue
2021-02-08 22:07:30 +03:00
Maksim Kita
ebf5868652
Merge pull request #20164 from kitaisreal/cache-dictionaries-lru-cache
Added LRUHashMap
2021-02-08 21:00:27 +03:00
Nicolae Vartolomei
c336cac306 Remove dead code 2021-02-08 17:36:58 +00:00
Nicolae Vartolomei
a8f37e7704 Remove dead code 2021-02-08 17:19:35 +00:00
Amos Bird
46f2b4063f
Fix CTE in INSERT-SELECT 2021-02-09 00:25:24 +08:00
Ivan Lezhankin
a287443438 Merge remote-tracking branch 'upstream/master' into dwarf-folly 2021-02-08 18:36:41 +03:00
bharatnc
60c8dfa22c PartLog - populate event_time_microseconds for MergeParts 2021-02-08 07:25:44 -08:00
bharatnc
cb65515dc7 PartLog - fix style checks 2021-02-08 07:25:44 -08:00
bharatnc
46c843b004 PartLog - fix formatting 2021-02-08 07:25:44 -08:00
bharatnc
aa7f5cfe79 PartLog - use ColumnsWithTypeAndName for all columns 2021-02-08 07:25:44 -08:00
bharatnc
19cf5ca6c0 PartLog - try fix event_time_microseconds column 2021-02-08 07:25:44 -08:00
bharatnc
f1d2804bb0 PartLog - populate event_time s & us from same timespec 2021-02-08 07:25:44 -08:00
bharatnc
c98baf3496 PartLog - add field event_time_microseconds column 2021-02-08 07:25:44 -08:00
alesapin
f2feeb9b19 Missing fix 2021-02-08 18:20:12 +03:00
Nikolai Kochetov
4840d663e6
Merge pull request #20035 from ClickHouse/early-stop-for-delayed-ports-processor
Close input ports in DelayedPortsProcessor as soon as all outputs are finished
2021-02-08 18:18:11 +03:00
Pavel Kruglov
a594c738c2 Remove code duplication 2021-02-08 17:14:36 +03:00
Pavel Kruglov
7b45860b06 Style fix 2021-02-08 17:02:11 +03:00
alesapin
d57613aa18 Fix 0_o build in arcadia 2021-02-08 16:50:03 +03:00
templarzq
7e3186c826
optimize aggfunc column data copy (#19407)
* optimize agg column data copy

* add aggfunc col data copy test

* fix null warning

* fix style

* fix style

* fix style

* fix style

* fix copy same dat to same pos bug

* fix style

* fix style

* Update ColumnAggregateFunction.cpp

fix type check

* control record buf size

* fix performance

* fix performance

* fix destroy data speed

* decrease run time.

* fix warning

* decrease test run time

* Update aggfunc_col_data_copy.xml

* replace unordered_map with HashMap

* fix compile err

* fix compile err

* fix compile err

* fix compile err

* fix compile err

* fix compile err

* fix compile err

* fix compile err

* fix compile err

* fix hash map compile err

* fix compile err

* fix compile err

* fix format

* faster test

Co-authored-by: centos7 <templarzq@localhost.localdomain>
2021-02-08 16:18:48 +03:00
Pavel Kruglov
134a686fa5 Fix 2 2021-02-08 16:16:09 +03:00
Anton Popov
f1beeb7c25
Merge pull request #20099 from azat/remove-not-existing-setting
Remove never existing insert_in_memory_parts_timeout
2021-02-08 16:09:03 +03:00
Pavel Kruglov
d3ebf59376 Fix 2021-02-08 16:08:15 +03:00
alesapin
add89c17f2 Less serde in responses, watches on followers 2021-02-08 16:06:55 +03:00
lehasm
363aefb42e
DOCSUP-3908: mannWitneyUTest, welchTTest and studentTTest documentation (#19784)
* studentTTest function description

* welchttest description, links in studentttest

* mannWhitneyUTest description

* Text changed slightly

* Text changed slightly

* Text changed slightly

* Text changed slightly

* - First header is first level.
- sample_index type set to UInt64.
- Return values renamed.

- mannWhitneyUTest:
  - added continuity_correction parameter
  - optional parameters wrapped in braces [ ]
  - description refactored
  - example SQL placed on single line

* Improved formulations (hopefully)
General data type names used (Integer, Float, Decimal)
Removed names from return values

* Fixes

* Optional parameters stated explicitly

* New line at the end of files

* Russian function description

* Files moved in the right folder

* Translated 'Original article' to russian

* Typos are fixed

* fixed alowed parameter value: "two sided" -> "two-sided"
* duplicate word "require" is removed from exception messages

* mannWhitneyUTest description changed
Added Tuple link in return values
"samples from two populations" added in short descriptions

* Russian translation updated

* fix

Co-authored-by: Alexey Smirnov <alexey-sm@yandex-team.ru>
2021-02-08 15:58:27 +03:00
Nikolai Kochetov
00d5d28ddf Fix build. 2021-02-08 15:52:30 +03:00
Nikolai Kochetov
d7fa440356
Merge branch 'master' into remove-adding-const-column-transform 2021-02-08 15:49:23 +03:00
Alexey Milovidov
dc01464764 Merge branch 'master' into no-excessive-squash-memory 2021-02-08 15:39:22 +03:00