Commit Graph

23840 Commits

Author SHA1 Message Date
taiyang-li
1f9e050152 add column distributed_depth for system.query_log and system.processes 2022-03-11 17:57:34 +08:00
shuchaome
7a3623d216 fix bug 2022-03-11 17:26:13 +08:00
Nikolai Kochetov
47f4bd30cd
Merge pull request #35186 from amosbird/fixwithtotalemptychunk
Fix empty chunk in with total transform
2022-03-11 10:24:19 +01:00
metahys
ff934cf0c2
Fix unexpected result when use -state type aggregate function in window frame (#34999)
* Fix unexpected result when use -state type aggregate function in window frame

* fix style

* fix style

* fix test

* fix flaky test

* fix flaky test

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-03-11 11:54:17 +03:00
Kseniia Sumarokova
2bd99a4c70
Update FileSegment.cpp 2022-03-11 09:52:50 +01:00
shuchaome
46cb4483a6 Optimise by lowering schema on the beginning. Add a functional test. 2022-03-11 14:34:46 +08:00
Kseniia Sumarokova
818459b9f0
Merge pull request #33717 from kssenii/local-cache-for-remote-fs
Local cache for remote filesystem
2022-03-11 07:23:10 +01:00
HeenaBansal2009
3f031df225 Code refactoring 2022-03-10 22:22:51 -08:00
Nikita Mikhaylov
909a7309ca
Delete nodes with attributes remove or replace if they didn't merge (#35141) 2022-03-10 23:40:55 +01:00
Maksim Kita
e5b85953e8 Added unit tests 2022-03-10 21:45:31 +00:00
Maksim Kita
6b916c7bb5 Fixed tests 2022-03-10 21:45:31 +00:00
Maksim Kita
5b2be4d3b8 Fixed tests 2022-03-10 21:45:31 +00:00
Maksim Kita
cbe059f4bd Updated IColumn interface to support getting stable permutation 2022-03-10 21:45:31 +00:00
Maksim Kita
765cd09d06 MergeTree improve insert performance 2022-03-10 21:45:31 +00:00
Maksim Kita
d70b7a1a41 ReplicatedMySQL protocol example fix 2022-03-10 21:26:39 +00:00
Anton Popov
37efe2ddb5
Apply suggestions from code review
Co-authored-by: Kseniia Sumarokova <54203879+kssenii@users.noreply.github.com>
2022-03-10 22:24:19 +01:00
alesapin
c0d8ccc91b
Merge pull request #35178 from Varinara/master
Added disk_name to system.part_log
2022-03-10 22:22:37 +01:00
alexey-milovidov
58e53b06a6
Merge pull request #35134 from azat/optimize_skip_unused_shards_rewrite_in-signed
Fix `optimize_skip_unused_shards_rewrite_in` for signed columns and negative values
2022-03-10 23:12:05 +03:00
vdimir
c66fb7cf6e
Attempt to fix replaceRegexpAll 2022-03-10 19:57:13 +00:00
Kseniia Sumarokova
5149bd2d29
Merge pull request #35172 from kssenii/add-non-retriable-errors-for-url
Add non-retriable errors check for HTTP read buffer
2022-03-10 20:28:37 +01:00
kssenii
c86955deb2 Fix typo 2022-03-10 20:22:39 +01:00
kssenii
ddcb020d26 Fix test 2022-03-10 19:16:26 +01:00
mergify[bot]
059682a0cd
Merge branch 'master' into asof_ftw 2022-03-10 17:29:38 +00:00
HeenaBansal2009
d981463b05 Added RemoteHostFilter check for MYSQL and postgresSQL 2022-03-10 08:58:48 -08:00
mergify[bot]
9f4ebc313b
Merge branch 'master' into master 2022-03-10 16:55:27 +00:00
Maksim Kita
83de2f66d1
Merge pull request #35032 from ClickHouse/fix-query-profiler-on-bad-linux-kernels
Avoid division by zero in Query Profiler if Linux kernel has a bug
2022-03-10 17:49:27 +01:00
Maksim Kita
493169910b
Merge pull request #35174 from zhangyifan27/fix_typo
fix typos
2022-03-10 17:10:44 +01:00
Kseniia Sumarokova
3fc399b6e9
Merge pull request #35158 from kssenii/fix-materialized-postgresql
Fix materialised postrgesql adding new table after manually removing it
2022-03-10 17:02:32 +01:00
Kseniia Sumarokova
e30b0c5d57
Merge pull request #35162 from kssenii/fix-materialized-postgresql-table-override
Fix materialised postgres `table overrides` for partition by, etc
2022-03-10 17:01:24 +01:00
Varinara
f5523f7ff0 added disk_name to system.part_log 2022-03-10 18:44:19 +03:00
mergify[bot]
8434dd424a
Merge branch 'master' into fix_typo 2022-03-10 15:30:06 +00:00
Amos Bird
a1b61dabfd
Fix empty chunk in with total transform. 2022-03-10 23:27:36 +08:00
Kruglov Pavel
a506120646
Fix bug in schema inference in s3 table function (#35176) 2022-03-10 15:16:07 +01:00
mergify[bot]
df01290e73
Merge branch 'master' into fix_typo 2022-03-10 13:35:04 +00:00
Miel Donkers
4a95e6d602
Parsing YAML config to XML leads to incorrect structures (#35135) 2022-03-10 13:09:48 +01:00
kssenii
1dc3f36a11 Better 2022-03-10 12:19:20 +01:00
Vladimir C
84af08b1a1
Merge pull request #35116 from bigo-sg/snappy_bug 2022-03-10 11:47:37 +01:00
kssenii
787a0805a5 Merge master 2022-03-10 11:42:19 +01:00
kssenii
050802b99b Add non-retriable errors 2022-03-10 11:38:46 +01:00
Kseniia Sumarokova
e6ee891c9c
Merge pull request #34957 from bigo-sg/hive_random_access_file_cache
Optimization for first time to read a random access readbuffer in hive
2022-03-10 11:36:22 +01:00
taiyang-li
ee8fc2730e remote comment 2022-03-10 18:29:52 +08:00
zhangyifan27
e6fa9f699a fix typo 2022-03-10 18:29:42 +08:00
taiyang-li
382417d893 fix bug 2022-03-10 18:29:00 +08:00
kssenii
3cd1da1e11 Fix 2022-03-10 11:11:59 +01:00
taiyang-li
2cd469f113 support print ast in dot format 2022-03-10 18:04:35 +08:00
kssenii
bd68d1d6d0 Update test 2022-03-10 11:02:12 +01:00
HeenaBansal2009
3ce9397246 Added Suggestions from Code review 2022-03-09 20:35:01 -08:00
lgbo-ustc
fdd423a3da fixed code style 2022-03-10 12:13:19 +08:00
lgbo-ustc
e4883f31b7 update tests
1. fixed code style in src/IO/tests/gtest_hadoop_snappy_decoder.cpp
2. enable tests 01060_avro.sh
2022-03-10 09:46:43 +08:00
kssenii
af9d8d278e Fix 2022-03-09 19:25:43 +01:00
kssenii
d089b0ac86 Fix race 2022-03-09 18:14:28 +01:00
mergify[bot]
78c8029aeb
Merge branch 'master' into stress-test 2022-03-09 16:22:45 +00:00
mergify[bot]
c326ebd67f
Merge branch 'master' into issue/#34890_fix_input_format_null_as_default_bug 2022-03-09 15:59:04 +00:00
Vladimir C
ce266b5a3e
Merge pull request #35146 from amosbird/fixpartitionprunerin 2022-03-09 13:23:45 +01:00
Nikita Mikhaylov
d749295222
Fix hardcoded page size (#35129) 2022-03-09 12:35:23 +01:00
shuchaome
b7cd85df6b remove unused column_names in ORCBlockInputFormat 2022-03-09 18:16:22 +08:00
kssenii
6571c7faa0 Clean up code 2022-03-09 10:36:52 +01:00
shuchaome
bb50133424
Apply suggestions from code review
Co-authored-by: Antonio Andelic <antonio2368@users.noreply.github.com>
2022-03-09 17:32:27 +08:00
shuchaome
9647818adc add unlikely for performance 2022-03-09 17:02:07 +08:00
kssenii
96789fa5ce Fix test, disable cache for DiskCacheWrapper 2022-03-09 09:46:04 +01:00
shuchaome
8027bb1e32 modify code style 2022-03-09 16:32:18 +08:00
Nikolai Kochetov
6bfee7aca2
Merge pull request #35132 from azat/parallel_distributed_insert_select-view
Support view() for parallel_distributed_insert_select
2022-03-09 09:10:34 +01:00
Nikolai Kochetov
c364908061
Merge pull request #35094 from amosbird/getridofredundantplan
Get rid of duplicate query planing.
2022-03-09 09:10:20 +01:00
shuchaome
56795b831d add setting to lower column case when reading parquet/orc file 2022-03-09 16:07:02 +08:00
zzsmdfj
00794fd4a4 to #31469_MaterializedMysql_mysqlDate2CkDate32-add MySQLDataTypesSupport setting 2022-03-09 15:58:43 +08:00
Azat Khuzhin
e2960e1a52 Avoid MEMORY_LIMIT_EXCEEDED during INSERT into Buffer with AggregateFunction
In case of Buffer table has columns of AggregateFunction type,
aggregate states for such columns will be allocated from the query
context but those states can be destroyed from the server context (in
case of background flush), and thus memory will be leaked from the query
since aggregate states can be shared, and eventually this will lead to
MEMORY_LIMIT_EXCEEDED error.

To avoid this, prohibit sharing the aggregate states.

But note, that this problem only about memory accounting, not memory
usage itself.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-09 10:57:49 +03:00
Azat Khuzhin
4118b065e6 Export IColumn::ensureOwnership() interface
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-09 10:57:49 +03:00
Amos Bird
a19224bc9b
Fix partition pruner: non-monotonic function IN 2022-03-09 15:48:42 +08:00
Azat Khuzhin
ec6bae2b2a Fix optimize_skip_unused_shards_rewrite_in for signed columns
Fixes: #35131
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-09 08:29:28 +03:00
lgbo-ustc
8dc8c87fd1 add a test case 2022-03-09 10:03:04 +08:00
kssenii
16e84c265b Fix build, update test 2022-03-08 21:41:58 +01:00
Azat Khuzhin
3a5a39a9df Do not delay final part writing by default
For async s3 writes final part flushing was defered until all the INSERT
block was processed, however in case of too many partitions/columns you
may exceed max_memory_usage limit (since each stream has overhead).

Introduce max_insert_delayed_streams_for_parallel_writes (with default
to 1000 for S3, 0 otherwise), to avoid this.

This should "Memory limit exceeded" errors in performance tests.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-08 22:17:36 +03:00
Azat Khuzhin
4200b56f3a Introduce IDisk::supportParallelWrite()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-08 22:17:36 +03:00
Azat Khuzhin
4843e210c3 Support view() for parallel_distributed_insert_select
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-08 22:05:57 +03:00
Azat Khuzhin
75da778d10 Tiny cmake refactoring
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-08 22:05:57 +03:00
Azat Khuzhin
fd3f7347f3 Remove unused DBMS_COMMON_LIBRARIES
Fixes: 4f8438bb34 ("cmake: do not allow internal libstdc++ usage")
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-08 22:02:18 +03:00
Azat Khuzhin
132bbce29c Add ability to get SELECT query from TableFunctionView
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-08 22:02:18 +03:00
Azat Khuzhin
ced34dea84 Take flush_time into account for scheduling background flush of the Buffer
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-08 21:58:10 +03:00
kssenii
5260822964 Merge master 2022-03-08 18:21:28 +01:00
kssenii
e231c3a3e0 Fix split build 2022-03-08 18:05:55 +01:00
Azat Khuzhin
a871036361
Fix parallel_reading_from_replicas with clickhouse-bechmark (#34751)
* Use INITIAL_QUERY for clickhouse-benchmark

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

* Fix parallel_reading_from_replicas with clickhouse-bechmark

Before it produces the following error:

    $ clickhouse-benchmark --stacktrace -i1 --query "select * from remote('127.1', default.data_mt) limit 10" --allow_experimental_parallel_reading_from_replicas=1 --max_parallel_replicas=3
    Loaded 1 queries.
    Logical error: 'Coordinator for parallel reading from replicas is not initialized'.
    Aborted (core dumped)

Since it uses the same code, i.e RemoteQueryExecutor ->
MultiplexedConnections, which enables coordinator if it was requested
from settings, but it should be done only for non-initial queries, i.e.
when server send connection to another server.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

* Fix 02226_parallel_reading_from_replicas_benchmark for older shellcheck

By shellcheck 0.8 does not complains, while on CI shellcheck 0.7.0 and
it does complains [1]:

    In 02226_parallel_reading_from_replicas_benchmark.sh line 17:
        --allow_experimental_parallel_reading_from_replicas=1
        ^-- SC2191: The = here is literal. To assign by index, use ( [index]=value ) with no spaces. To keep as literal, quote it.

    Did you mean:
        "--allow_experimental_parallel_reading_from_replicas=1"

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/34751/d883af711822faf294c876b017cbf745b1cda1b3/style_check__actions_/shellcheck_output.txt

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-08 16:42:29 +01:00
zhanghuajie
11dde7c127 fix build fail with gcc 2022-03-08 22:34:51 +08:00
Azat Khuzhin
c4b6342853
Improvements for parallel_distributed_insert_select (and related) (#34728)
* Add a warning if parallel_distributed_insert_select was ignored

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

* Respect max_distributed_depth for parallel_distributed_insert_select

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

* Print warning for non applied parallel_distributed_insert_select only for initial query

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

* Remove Cluster::getHashOfAddresses()

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

* Forbid parallel_distributed_insert_select for remote()/cluster() with different addresses

Before it uses empty cluster name (getClusterName()) which is not
correct, compare all addresses instead.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

* Fix max_distributed_depth check

max_distributed_depth=1 must mean not more then one distributed query,
not two, since max_distributed_depth=0 means no limit, and
distribute_depth is 0 for the first query.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

* Fix INSERT INTO remote()/cluster() with parallel_distributed_insert_select

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

* Add a test for parallel_distributed_insert_select with cluster()/remote()

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

* Return <remote> instead of empty cluster name in Distributed engine

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

* Make user with sharding_key and w/o in remote()/cluster() identical

Before with sharding_key the user was "default", while w/o it it was
empty.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-08 15:24:39 +01:00
kssenii
f3cba6f270 Remove already fixed crutch 2022-03-08 14:30:21 +01:00
lgbo-ustc
7f89a1bcf3 add some usage test 2022-03-08 20:00:39 +08:00
Antonio Andelic
bc5d7aea57
Merge pull request #34876 from azat/long-INSERT-fix
Fix possible "Part directory doesn't exist" during INSERT
2022-03-08 12:44:53 +01:00
zzsmdfj
67b9f81104 to #31469_MaterializedMysql_mysqlDate2CkDate32 2022-03-08 18:17:22 +08:00
kssenii
28a3aece60 Fix uncaught exception from destructor 2022-03-08 10:58:37 +01:00
Kseniia Sumarokova
517e878c6e
Merge pull request #35099 from ClickHouse/tavplubix-patch-1
Fix inconsistency in DiskLocal
2022-03-08 10:18:07 +01:00
Kseniia Sumarokova
1eb2bae792
Merge pull request #34954 from bigo-sg/hive_read_columns_pruning
read columns pruning for hive
2022-03-08 10:17:24 +01:00
lgbo-ustc
225b0bd914 fixed bug: call need_more_input repeatly, overwrite the buffer 2022-03-08 17:17:06 +08:00
lgbo-ustc
256e92ffee Merge remote-tracking branch 'ck/master' into hive_random_access_file_cache 2022-03-08 14:14:40 +08:00
Azat Khuzhin
caffc144b5 Fix possible "Part directory doesn't exist" during INSERT
In #33291 final part commit had been defered, and now it can take
significantly more time, that may lead to "Part directory doesn't exist"
error during INSERT:

    2022.02.21 18:18:06.979881 [ 11329 ] {insert} <Debug> executeQuery: (from 127.1:24572, user: default) INSERT INTO db.table (...) VALUES
    2022.02.21 20:58:03.933593 [ 11329 ] {insert} <Trace> db.table: Renaming temporary part tmp_insert_20220214_18044_18044_0 to 20220214_270654_270654_0.
    2022.02.21 21:16:50.961917 [ 11329 ] {insert} <Trace> db.table: Renaming temporary part tmp_insert_20220214_18197_18197_0 to 20220214_270689_270689_0.
    ...
    2022.02.22 21:16:57.632221 [ 64878 ] {} <Warning> db.table: Removing temporary directory /clickhouse/data/db/table/tmp_insert_20220214_18232_18232_0/
    ...
    2022.02.23 12:23:56.277480 [ 11329 ] {insert} <Trace> db.table: Renaming temporary part tmp_insert_20220214_18232_18232_0 to 20220214_273459_273459_0.
    2022.02.23 12:23:56.299218 [ 11329 ] {insert} <Error> executeQuery: Code: 107. DB::Exception: Part directory /clickhouse/data/db/table/tmp_insert_20220214_18232_18232_0/ doesn't exist. Most likely it is a logical error. (FILE_DOESNT_EXIST) (version 22.2.1.1) (from 127.1:24572) (in query: INSERT INTO db.table (...) VALUES), Stack trace (when copying this message, always include the lines below):

Follow-up for: #28760
Refs: #33291

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-08 07:44:11 +03:00
lgbo-ustc
a8cfc2458a update codes 2022-03-08 11:55:15 +08:00
alexey-milovidov
df1a031851
Merge pull request #35046 from vdimir/issue-35044
Fix trim function
2022-03-08 01:50:02 +03:00
Maksim Kita
2f9361008b
Merge pull request #35089 from 1lann/1lann/fix-update_lag-typo
Fix typo of update_lag
2022-03-07 23:12:35 +01:00
kssenii
4f53080921 Fix 2022-03-07 22:03:12 +01:00
kssenii
0737aef472 Fix split build 2022-03-07 22:02:07 +01:00
Nikolai Kochetov
8f77b2b778
Merge pull request #34889 from ClickHouse/finally-enable-s3-async-writes-again
Update DiskS3.cpp
2022-03-07 21:31:44 +01:00
alesapin
71ecd6be74
Merge pull request #35004 from ClickHouse/more_keeper_sanity_checks
More keeper sanity checks
2022-03-07 19:53:59 +01:00
Kseniia Sumarokova
5511f2f6e6
Merge pull request #34940 from bigo-sg/hive_client_connection_pool
Use connection pool in HiveMetastoreClient
2022-03-07 17:14:56 +01:00
Kseniia Sumarokova
28b9ec01c0
Merge pull request #34945 from bigo-sg/hive_bug_fixed
unexpected result when use `in` in hive query
2022-03-07 17:13:11 +01:00
kssenii
eeb0ae9816 Fix detaching query 2022-03-07 17:05:36 +01:00
Amos Bird
fe4534d464
Get rid of duplicate query planing. 2022-03-08 00:02:58 +08:00
tavplubix
84e22fb32b
Update DiskLocal.cpp 2022-03-07 18:59:00 +03:00
Anton Popov
0bc57da238 Merge remote-tracking branch 'upstream/master' into HEAD 2022-03-07 14:46:08 +00:00
Antonio Andelic
81e56a06a3
Merge pull request #35066 from ClickHouse/remove-useless-define
Remove useless define
2022-03-07 15:28:28 +01:00
kssenii
059d239815 Simplify code 2022-03-07 15:17:38 +01:00
kssenii
692b247379 Fix some corner cases 2022-03-07 14:31:21 +01:00
mergify[bot]
88052e2d7c
Merge branch 'master' into finally-enable-s3-async-writes-again 2022-03-07 12:55:52 +00:00
tavplubix
34505be1de
Merge pull request #35081 from azat/fix-shutdown-deadlock
Avoid possible deadlock on server shutdown
2022-03-07 13:47:15 +01:00
alesapin
0c93c9e21d
Merge pull request #35010 from bigo-sg/keeperstatopt
Keeper atomic stat
2022-03-07 12:34:28 +01:00
alesapin
d90bee1df9
Merge pull request #35080 from azat/mutate-exceptions
Do not hide exceptions during mutations
2022-03-07 12:22:49 +01:00
alesapin
e81bbfb5b5 Review fixes 2022-03-07 12:13:37 +01:00
vdimir
688493373f
Try to fix trim function 2022-03-07 11:08:11 +00:00
Vladimir C
678f05ca1e
Merge pull request #34912 from kssenii/fix-filelog-metadata-path 2022-03-07 11:45:29 +01:00
alesapin
4d86bf6fdf Merge branch 'master' into more_keeper_sanity_checks 2022-03-07 11:41:04 +01:00
Kseniia Sumarokova
cdb9a05229
Merge pull request #34605 from bigo-sg/add_metric_for_local
Add cpu/mem metric for clickhouse-local
2022-03-07 11:40:11 +01:00
1lann
5423c5a45c Fix typo of update_lag
In external dictionary providers, the allowed keys for configuration seemed to have a typo
of "update_lag" as "update_tag", preventing the use of "update_lag". This change fixes that.
2022-03-07 18:31:20 +08:00
lgbo-ustc
8ae5296ee8 fixed compile errors 2022-03-07 17:26:48 +08:00
mergify[bot]
f57dcbf8d1
Merge branch 'master' into remove-useless-define 2022-03-07 07:52:37 +00:00
lgbo-ustc
eab925554d fixed code styles 2022-03-07 14:01:03 +08:00
lgbo-ustc
0c83b96d8c fixed code style 2022-03-07 13:13:33 +08:00
lgbo-ustc
cfeedd2cb5 fixed code style 2022-03-07 12:28:31 +08:00
lgbo-ustc
4507cc58aa update codes 2022-03-07 12:05:07 +08:00
zhanglistar
9efc8a1d38 Fix min/max stat 2022-03-07 11:11:14 +08:00
lgbo-ustc
c37eedd887 update codes 2022-03-07 10:30:54 +08:00
lgbo-ustc
75a50a30c4 update codes 2022-03-07 09:43:53 +08:00
lgbo-ustc
d907b70cc4 update codes: get actual read block 2022-03-07 09:26:05 +08:00
lgbo-ustc
f4d8fb46c5 update codes 2022-03-07 09:26:05 +08:00
lgbo-ustc
62c1bd5ae9 hive read columns pruning 2022-03-07 09:26:05 +08:00
kssenii
2dcfe66236 Fix race 2022-03-06 20:33:07 +01:00
mergify[bot]
086b8e147a
Merge branch 'master' into more_compatible_read 2022-03-06 12:05:47 +00:00
Azat Khuzhin
081f9caa04 Avoid possible deadlock on server shutdown
Here is an example for deadlock during shutting down DDLWorker:

Server main thread:

    6  ThreadFromGlobalPool::join () at ../src/Common/ThreadPool.h:217
    7  DB::DDLWorker::shutdown () at ../src/Interpreters/DDLWorker.cpp:123
    8  DB::DDLWorker::~DDLWorker () at ../src/Interpreters/DDLWorker.cpp:131
    9  DB::DDLWorker::~DDLWorker () at ../src/Interpreters/DDLWorker.cpp:130
    10 std::__1::default_delete<DB::DDLWorker>::operator() () at ../contrib/libcxx/include/memory:1397
    11 std::__1::unique_ptr<>::reset (this=0x7f7521d44fd0, __p=0x0) at ../contrib/libcxx/include/memory:1658
    12 DB::ContextSharedPart::shutdown () at ../src/Interpreters/Context.cpp:380 <!-- holds mutex
    13 DB::Context::shutdown () at ../src/Interpreters/Context.cpp:2677

DDLWorker thread:

    7  DB::Context::getLock () at ../src/Interpreters/Context.cpp:472 <-- trying to acquire shared.mutex
    8  DB::Context::getTCPPortSecure () at ../src/Interpreters/Context.cpp:2120
    9  DB::DDLTask::findCurrentHostID () at ../src/Interpreters/DDLTask.cpp:169
    10 DB::DDLWorker::initAndCheckTask () at ../src/Interpreters/DDLWorker.cpp:191
    11 DB::DDLWorker::scheduleTasks () at ../src/Interpreters/DDLWorker.cpp:367
    12 DB::DDLWorker::runMainThread () at ../src/Interpreters/DDLWorker.cpp:1063

v2: replace getTryLockTimed() with getTryLock() since std::recursive_mutex does not have try_lock_for()
v3: stole objects from context
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Fixes: #21318
2022-03-06 14:31:18 +03:00
Azat Khuzhin
bc224dee36 Do not hide exceptions during mutations
system.mutations includes only the message, but not stacktrace, and it
is not always obvious to understand the culprit w/o stacktrace.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-06 13:39:49 +03:00
Kseniia Sumarokova
3ec6cd3128
Update StorageFileLog.cpp 2022-03-06 11:03:22 +01:00
qieqieplus
5287f78d8b fix #33798 2022-03-06 12:02:17 +08:00
alexey-milovidov
01f8eab2da
Merge pull request #35020 from ClickHouse/preprocessed_config_in_yaml
Always write preprocessed config in XML format
2022-03-06 02:31:37 +03:00
alexey-milovidov
f9b7df6ba1
Merge pull request #35050 from CurtizJ/fix-async-inserts-system-table
Fix reading from `system.asynchronous_inserts` table
2022-03-06 02:25:53 +03:00
mergify[bot]
0d5b7c157b
Merge branch 'master' into more_compatible_read 2022-03-05 16:18:22 +00:00
mergify[bot]
977bd30e19
Merge branch 'master' into stress-test 2022-03-05 08:34:07 +00:00
taiyang-li
1b9987ceb1 fix mistake in check-style 2022-03-05 14:22:56 +08:00
Alexey Milovidov
fc572dcb41 Remove useless define 2022-03-04 23:32:38 +01:00
tavplubix
e49521163f
Merge pull request #34860 from zhangjmruc/master
Support non-table DDLs on cross replicated cluster
2022-03-04 19:37:51 +01:00
Kruglov Pavel
d45b6ae03c
Extract schema only once on table creation and add it to metadata (#34684)
* Add columns description to metadata in case of schema inference

* Make better

* Remove unnecessary code

* Fix tests

* More tests

* Add tag no-fasttest

* Fix test

* Fix test

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-03-04 21:23:19 +03:00
mergify[bot]
13858e88d6
Merge branch 'master' into more_compatible_read 2022-03-04 18:19:01 +00:00
Maksim Kita
7ae1f0fa3b
Merge pull request #34911 from larspars/master
Allow LowCardinality strings for ngrambf_v1/tokenbf_v1 indexes. Fixes #21865
2022-03-04 19:17:48 +01:00
Kruglov Pavel
dbba752398
Merge branch 'master' into stress-test 2022-03-04 18:33:37 +03:00
alesapin
5416b567d5 Merge branch 'master' into standalone_keeper_build 2022-03-04 13:35:07 +01:00
Azat Khuzhin
2ef9d32448 Revert "Remove VERSION_DATE from system.build_options"
As requested by @kitaisreal

This reverts commit 4a404532fb.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-04 15:32:54 +03:00
Azat Khuzhin
4a404532fb Remove VERSION_DATE from system.build_options
It was set only bu utils/release/release_lib.sh, and seems that this
script is not used anymore, at least that part of it.

Also note, that GIT_DATE is the same, and it is date time, not only
date.

Plus VERSION_DATE is not installed for releases anyway.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-04 15:31:37 +03:00
Azat Khuzhin
b0f964a14f Remove LIBRARY_ARCHITECTURE from system.build_options
CMAKE_LIBRARY_ARCHITECTURE and it is useless, since it is reported only
if the compiler reports subdir arch triplet [1]

  [1]: https://bugzilla.redhat.com/show_bug.cgi?id=1531678

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-04 15:31:32 +03:00
Azat Khuzhin
494fe91f86 Fix LINK_FLAGS in system.build_options
Fixes: 79f6f5a202
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-04 15:31:32 +03:00
Azat Khuzhin
c426eef07d Fix generating USE_* for system.build_options
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-04 15:31:32 +03:00
alesapin
5db9018ae0 Fix unitialized variable 2022-03-04 13:26:56 +01:00
alesapin
2ab920a404 Review fixes 2022-03-04 13:14:38 +01:00
Vitaly Baranov
115c0c2aba
Merge pull request #34855 from vitlibar/ignore-obsolete-grants-in-attach-grants
Ignore obsolete grants in ATTACH GRANT statements
2022-03-04 12:50:09 +01:00
Anton Popov
c836a57000 fix reading from system.asynchronous_inserts table 2022-03-04 11:46:15 +00:00
Kruglov Pavel
cbb913a67e
Merge pull request #34092 from Avogar/random-settings
Randomize some settings in functional tests
2022-03-04 13:57:49 +03:00
Vladimir C
0276140d44
Merge pull request #34963 from vdimir/writebufferfroms3-try-finalize 2022-03-04 11:52:30 +01:00
Vladimir C
79b21c80b1
Merge pull request #33698 from hexiaoting/dev-map-funciton 2022-03-04 11:51:17 +01:00
vdimir
e9dee63fe2
style fix 2022-03-04 10:49:43 +00:00
Maksim Kita
c6e0922449
Merge pull request #35018 from kitaisreal/executable-udf-deterministic-in-scope-of-query-fix
ExecutableUDF function deterministic in scope of query fix
2022-03-04 10:46:19 +01:00
Maksim Kita
6722227407
Merge pull request #35027 from kitaisreal/functions-hierarchical-dictionaries-const-arguments-fix
Dictionary hierarchy functions implicit key cast and support for constant arguments
2022-03-04 10:45:37 +01:00
Kseniia Sumarokova
7a9b3ae50d
Merge pull request #35001 from kssenii/fix-async-buffer-exception
Fix possible exception for remote fs async read about no last position boundary
2022-03-04 10:21:17 +01:00
zzsmdfj
7252c18ff0 to #34890_fix_input_format_null_as_default_bug 2022-03-04 15:04:43 +08:00
Anton Popov
df3b07fe7c Merge remote-tracking branch 'upstream/master' into HEAD 2022-03-03 22:25:28 +00:00
Anton Popov
76e40e4f22 fix msan 2022-03-03 21:50:36 +00:00
Alexey Milovidov
dda6632932 Avoid division by zero in Query Profiler if Linux kernel has a bug 2022-03-03 21:28:30 +01:00
alesapin
0eb7d28192 Building small keeper binary 2022-03-03 21:27:46 +01:00
Anton Popov
7d01516202
Merge pull request #34795 from snar/array-compact-higher-order
make arrayCompact behave as other higher-order functions
2022-03-03 21:25:43 +03:00
vdimir
2aa6685baf
Add cases to 02169_map_functions, update error messages in FunctionArrayMapped 2022-03-03 18:04:17 +00:00
Anton Popov
aea7bfb59a
Merge pull request #34992 from azat/fix-asynchronous_inserts-race
Fix race between INSERT async_insert=1 and system.asynchronous_inserts
2022-03-03 20:55:19 +03:00
Maksim Kita
18fabccff2 Functions dictGetHierarchy, dictIsIn, dictGetChildren, dictGetDescendants support implicit key cast and constant arguments 2022-03-03 16:13:05 +00:00
mergify[bot]
e4fba1dc99
Merge branch 'master' into executable-udf-deterministic-in-scope-of-query-fix 2022-03-03 15:17:16 +00:00
kssenii
d19f199e93 Revert 2022-03-03 15:25:27 +01:00
alesapin
c33808d3db Fix read old records from logs 2022-03-03 15:18:03 +01:00
Nikita Mikhaylov
33baefb12b Done 2022-03-03 14:35:52 +01:00
hexiaoting
95530d0d70
fix style error 2022-03-03 13:22:48 +00:00
vdimir
f7f002139a
Upd FunctionArrayMapped 2022-03-03 13:22:48 +00:00
vdimir
939a15d29a
Upd FunctionArrayMapped for Map 2022-03-03 13:22:48 +00:00
vdimir
82a76d47ff
Use FunctionArrayMapped for Map 2022-03-03 13:22:47 +00:00
hexiaoting
aeec4a62e7
fix bug 2022-03-03 13:22:47 +00:00
hexiaoting
71aa411746
Fix bug 2022-03-03 13:22:46 +00:00
hexiaoting
a435c3a1e8
Fix mapFilter bug 2022-03-03 13:22:46 +00:00
hexiaoting
582e6fa1c5
Fix build error 2022-03-03 13:22:46 +00:00
hexiaoting
36939f1d5c
Update src/Functions/FunctionMapMapped.h
Co-authored-by: Vladimir C <vdimir@yandex-team.ru>
2022-03-03 13:22:45 +00:00
hexiaoting
ed39edda67
Update src/Functions/mapFilter.cpp
Co-authored-by: Vladimir C <vdimir@yandex-team.ru>
2022-03-03 13:22:45 +00:00
hexiaoting
e953e482ec
Implement more functions for Map data type 2022-03-03 13:22:44 +00:00
mergify[bot]
c90d24e10b
Merge branch 'master' into random-settings 2022-03-03 13:07:12 +00:00
Kseniia Sumarokova
b11b34dc8c
Merge pull request #34849 from kssenii/fix-too-many-columns
Fix reading too many columns for s3 and url storages
2022-03-03 13:57:22 +01:00
vdimir
6c29a574a3
Revert "cancel processon in QueryPipeline dtor"
This reverts commit 7783bb24ea0c109c918faf24343082fc564f22d1.
2022-03-03 12:56:49 +00:00
vdimir
8bb095c67e
cancel processon in QueryPipeline dtor 2022-03-03 12:56:24 +00:00
vdimir
d3ee3dee85
Catch exception in ~WriteBufferFromS3 2022-03-03 12:54:24 +00:00
Kseniia Sumarokova
ad09554c4c
Merge pull request #34996 from kssenii/fix-filelog-assertion
Fix possible segfault in filelog storage
2022-03-03 13:52:54 +01:00
Nikolai Kochetov
32120d5dec
Merge pull request #34993 from ClickHouse/try-fix-delayed-source
Avoid pushing to port with data inside DelayedSource
2022-03-03 13:44:45 +01:00
Maksim Kita
a6c510ceb1 ExecutableUDF function deterministic in scope of query fix 2022-03-03 12:40:42 +00:00
Frank Chen
b4829465d9
Improve the opentelemetry span logs for INSERT on distributed table (#34480) 2022-03-03 12:53:29 +01:00
tavplubix
b7d4c78f13
Merge pull request #34487 from zzsmdfj/issue/32977_MaterializedMySQL_add_table_list_settings
MaterializedMySQL add materialized_mysql_tables_list settings
2022-03-03 12:44:51 +01:00
alesapin
f24fa16184 Fix address check 2022-03-03 11:29:43 +01:00
Kseniia Sumarokova
299e11bb2b
Update DiskCacheWrapper.cpp 2022-03-03 11:11:57 +01:00
Maksim Kita
f1b1baf56e
Merge pull request #34982 from Cai-Yao/master
date_time_input_format = 'best_effort_us'
2022-03-03 09:22:57 +01:00
Maksim Kita
7d90afb3b0
Merge pull request #34988 from azat/safe-exit
Fix signal-unsafe TSan report in client
2022-03-03 09:21:26 +01:00
zhanglistar
9ee0d2c8a0 keeper atomic stat 2022-03-03 14:30:22 +08:00
alesapin
04d4c52e01 Add sanity checks for keeper 2022-03-02 20:37:59 +01:00
Azat Khuzhin
a0e590ae6c Fix signal-unsafe TSan report in client
CI founds [1]:

    WARNING: ThreadSanitizer: signal-unsafe call inside of a signal (pid=2975)
        0 malloc  (clickhouse+0xab36d8d)
        1 _dl_exception_create_format  (ld-linux-x86-64.so.2+0x18ea8)
        2 DB::interruptSignalHandler(int) obj-x86_64-linux-gnu/../src/Client/ClientBase.cpp:236:9 (clickhouse+0x1a1d603e)
        3 __tsan::CallUserSignalHandler(__tsan::ThreadState*, bool, bool, bool, int, __sanitizer::__sanitizer_siginfo*, void*) crtstuff.c (clickhouse+0xab3ee5f)
        4 unsigned long std::__1::__cxx_atomic_load(std::__1::__cxx_atomic_base_impl const*, std::__1::memory_order) obj-x86_64-linux-gnu/../contrib/libcxx/include/atomic:1006:12 (clickhouse+0x1da6c41d)
        5 std::__1::__atomic_base::load(std::__1::memory_order) const obj-x86_64-linux-gnu/../contrib/libcxx/include/atomic:1615:17 (clickhouse+0x1da6c41d)
        6 cctz::TimeZoneInfo::MakeTime(cctz::detail::civil_time const&) const obj-x86_64-linux-gnu/../contrib/cctz/src/time_zone_info.cc:844:47 (clickhouse+0x1da6c41d)
        7 cctz::time_zone::Impl::MakeTime(cctz::detail::civil_time const&) const obj-x86_64-linux-gnu/../contrib/cctz/src/time_zone_impl.h:57:19 (clickhouse+0x1da64777)
        8 cctz::time_zone::lookup(cctz::detail::civil_time const&) const obj-x86_64-linux-gnu/../contrib/cctz/src/time_zone_lookup.cc:72:27 (clickhouse+0x1da64777)
        9 DateLUTImpl::DateLUTImpl(std::__1::basic_string, std::__1::allocator > const&) obj-x86_64-linux-gnu/../src/Common/DateLUTImpl.cpp:70:63 (clickhouse+0xac8910b)
        10 DateLUT::getImplementation(std::__1::basic_string, std::__1::allocator > const&) const obj-x86_64-linux-gnu/../src/Common/DateLUT.cpp:155:55 (clickhouse+0xac87404)
        11 DateLUT::DateLUT() obj-x86_64-linux-gnu/../src/Common/DateLUT.cpp:145:25 (clickhouse+0xac8697f)
        12 DateLUT::getInstance() obj-x86_64-linux-gnu/../src/Common/DateLUT.cpp:162:20 (clickhouse+0xac87530)
        13 DateLUT::instance(std::__1::basic_string, std::__1::allocator > const&) obj-x86_64-linux-gnu/../src/Common/DateLUT.h:29:33 (clickhouse+0x188481f9)
        14 TimezoneMixin::TimezoneMixin(std::__1::basic_string, std::__1::allocator > const&) obj-x86_64-linux-gnu/../src/DataTypes/TimezoneMixin.h:18:21 (clickhouse+0x188481f9)
        15 DB::DataTypeDateTime::DataTypeDateTime(std::__1::basic_string, std::__1::allocator > const&) obj-x86_64-linux-gnu/../src/DataTypes/DataTypeDateTime.cpp:11:7 (clickhouse+0x18847e55)
        16 DB::(anonymous namespace)::FunctionEmptyArray::getNameImpl() emptyArray.cpp (clickhouse+0x1602abb1)
        17 DB::registerFunctionsEmptyArray(DB::FunctionFactory&)  (clickhouse+0x16023b6f)
        18 DB::registerFunctionsArray(DB::FunctionFactory&)  (clickhouse+0x15de7b99)
        19 DB::registerFunctions()  (clickhouse+0xe4e7bc6)
        20 DB::Client::main(std::__1::vector, std::__1::allocator >, std::__1::allocator, std::__1::allocator > > > const&) obj-x86_64-linux-gnu/../programs/client/Client.cpp:402:5 (clickhouse+0xacb2649)
        21 Poco::Util::Application::run() obj-x86_64-linux-gnu/../contrib/poco/Util/src/Application.cpp:334:8 (clickhouse+0x1d96868a)
        22 mainEntryClickHouseClient(int, char**) obj-x86_64-linux-gnu/../programs/client/Client.cpp:1237:23 (clickhouse+0xacbdd7c)
        23 main obj-x86_64-linux-gnu/../programs/main.cpp:378:12 (clickhouse+0xabae77a)

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/34924/66cbb468eb6990b74ef4d08beefbe48d32bf4bd5/stateless_tests__thread__actions__[1/3].html

Fixes: #34923
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-02 22:17:17 +03:00
alesapin
74ff3ee4bc Add sanity check for localhost 2022-03-02 20:02:02 +01:00
mergify[bot]
e169813004
Merge branch 'master' into fix-too-many-columns 2022-03-02 18:46:35 +00:00
Maksim Kita
b1a956c5f1 clang-tidy check performance-move-const-arg fix 2022-03-02 18:15:27 +00:00
Maksim Kita
1f5837359e clang-tidy check performance-noexcept-move-constructor fix 2022-03-02 18:15:27 +00:00
mreddy017
f893002b69 Fix vulnerable code related to std::move and noexcept
This commit fixes the vulnerable code related to std::move and noexcept identified by clangtidy tool.
2022-03-02 18:15:27 +00:00
kssenii
192b839cab Fix 2022-03-02 19:11:45 +01:00
Kruglov Pavel
3b92b9037f
Merge branch 'master' into random-settings 2022-03-02 21:09:48 +03:00
kssenii
d5952109fb Merge master 2022-03-02 18:15:25 +01:00
mergify[bot]
add225c83e
Merge branch 'master' into fix-filelog-assertion 2022-03-02 17:06:08 +00:00
avogar
d25d83580a Fix tests 2022-03-02 16:33:21 +00:00
Amos Bird
d4cdf04683
Add missing locks (#34025) 2022-03-02 16:23:29 +01:00
Kruglov Pavel
3e17f6dd4a
Merge pull request #34961 from Avogar/fix-schema-inference
Fix wrong schema inference for unquoted dates in CSV
2022-03-02 18:06:52 +03:00
kssenii
5e84c75942 Fix 2022-03-02 15:31:34 +01:00
kssenii
ef344a581b Fix bug in FileLog storage 2022-03-02 15:28:17 +01:00
alesapin
b1f5805647
Merge pull request #34609 from ClickHouse/unrestricted-zk-reads
allow unrestricted reads from zookeeper
2022-03-02 14:53:12 +01:00
alesapin
7312b43e57
Merge pull request #34989 from azat/fix-system-log-settings
Fix non-MergeTree engines for system.*_log
2022-03-02 14:32:08 +01:00
Nikolai Kochetov
ed8dfc14d4 Avoid pushing to port with data inside DelayedSource 2022-03-02 14:21:58 +01:00
mergify[bot]
93b13c0232
Merge branch 'master' into asof_ftw 2022-03-02 13:20:50 +00:00
kssenii
2ce4d34964 Fix checks 2022-03-02 14:17:19 +01:00
alesapin
576ff0b40d
Merge pull request #34715 from azat/fix-opened-file-cache-race
Workaround for a bug in NuRaft library
2022-03-02 13:58:43 +01:00
Azat Khuzhin
57f636a1e8 Fix race between INSERT async_insert=1 and system.asynchronous_inserts
CI report [1]:

    [c190f600f8c6] 2022.03.02 01:07:34.553012 [ 23552 ] {76b6113b-1479-46c9-90ab-e78a3c9f3dbb}  executeQuery: Code: 60. DB::Exception: Both table name and UUID are empty. (UNKNOWN_TABLE) (version 22.3.1.1) (from [::1]:42040) (comment: '02015_async_inserts_stress_long.sh') (in query: SELECT * FROM system.asynchronous_inserts FORMAT Null), Stack trace (when copying this message, always include the lines below):

    0. ClickHouse/contrib/libcxx/include/exception:133: Poco::Exception::Exception(std::__1::basic_string, std::__1::allocator > const&, int) @ 0xf50e04c in /fasttest-workspace/build/programs/clickhouse
    1. ClickHouse/src/Common/Exception.cpp:58: DB::Exception::Exception(std::__1::basic_string, std::__1::allocator > const&, int, bool) @ 0x663ebfa in /fasttest-workspace/build/programs/clickhouse
    2. DB::StorageID::assertNotEmpty() const @ 0xbc08591 in /fasttest-workspace/build/programs/clickhouse
    3. ClickHouse/contrib/libcxx/include/string:1444: DB::StorageID::getDatabaseName() const @ 0xe50d2b6 in /fasttest-workspace/build/programs/clickhouse
    4. ClickHouse/contrib/libcxx/include/string:1957: DB::StorageSystemAsynchronousInserts::fillData(std::__1::vector::mutable_ptr, std::__1::allocator::mutable_ptr > >&, std::__1::shared_ptr, DB::SelectQueryInfo const&) const @ 0xdac636c in /fasttest-workspace/build/programs/clickhouse

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/34973/e6fc6a22d5c018961c18247242dd3a40b8c54ff2/fast_test__actions_.html

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-02 15:28:06 +03:00
Azat Khuzhin
a49106e583 Fix non-MergeTree engines for system.*_log
Fixes: https://github.com/ClickHouse/ClickHouse/pull/34949
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-02 13:24:40 +03:00
Maksim Kita
d095e7d684
Merge pull request #34931 from azat/keeper-changelog-cleanup-fix
Avoid busy polling in keeper while searching for changelog files to delete
2022-03-02 11:10:13 +01:00
alesapin
9249c5d50e Use tryget instead of get 2022-03-02 13:09:12 +03:00
Maksim Kita
53116faeeb
Update MergeTreeIndexFullText.cpp 2022-03-02 11:08:35 +01:00
mergify[bot]
f964cd6122
Merge branch 'master' into master 2022-03-02 10:02:40 +00:00
Kseniia Sumarokova
a9ab149b31
Merge pull request #34859 from Vxider/windowview-multi-column-groupby
Fix bugs for multiple columns group by in WindowView
2022-03-02 10:09:47 +01:00
cwkyaoyao
72194bbaf3 Add date_time_input_format = best_effort_us 2022-03-02 16:00:06 +08:00
HaiBo Li
2ea18b3085
Fix the bug that the toDatetime function overflows (#32898)
* Fixed overflow bug of the function toDatetime/toDate/toDate32/parseDateTimeBestEffort
2022-03-02 10:06:38 +03:00
Filatenkov Artur
f48f35cad0
Merge pull request #34975 from Vector-Similarity-Search-for-ClickHouse/fix-typo
Fix typo
2022-03-02 09:59:06 +03:00
Anton Popov
d7cd9aa69b fix reading of missed subcolumns 2022-03-02 03:31:40 +03:00
NikitaEvs
06f47673f4 Fix typo 2022-03-01 21:42:27 +00:00
alesapin
e2989c2b85 Fix storage system zookeeper 2022-03-01 21:23:26 +01:00
alesapin
ec3e4251e1 Fix style 2022-03-01 20:34:25 +01:00
kssenii
a594f388a4 Merge master 2022-03-01 19:43:45 +01:00
kssenii
aa1c71a877 Merge master 2022-03-01 19:25:04 +01:00
kssenii
755e63ed03 Keep compatibility 2022-03-01 19:21:59 +01:00
Anton Popov
c1fdcf7a64 Merge remote-tracking branch 'upstream/master' into HEAD 2022-03-01 20:21:39 +03:00
Anton Popov
04a3a10148 minor fixes 2022-03-01 20:20:53 +03:00
kssenii
b2cab429a7 Move initialization out of constructor 2022-03-01 18:12:34 +01:00
alesapin
cba5fe44a9 Merge branch 'master' into unrestricted-zk-reads 2022-03-01 18:09:21 +01:00
kssenii
438c63f3d8 Style 2022-03-01 17:52:38 +01:00
Anton Popov
82d24f06eb
Merge pull request #34866 from CurtizJ/async-insert-table-function
Fix async inserts to table functions
2022-03-01 19:45:22 +03:00
Anton Popov
2758db5341 add more comments 2022-03-01 19:32:55 +03:00
kssenii
2f4f76341c Fix deadlock 2022-03-01 17:07:50 +01:00
kssenii
092ec45b47 Merge master 2022-03-01 12:06:56 +01:00
lgbo-ustc
ca470e1b94 lazy initialization about getting hive metadata in HiveStorage 2022-03-01 19:04:44 +08:00
avogar
a7c6d11532 Fix schema inference for unquoted dates in CSV 2022-03-01 11:03:26 +00:00
Kruglov Pavel
97d634d1cc
Merge pull request #34732 from Avogar/insert-select-schema
Support schema inference for INSERT INTO FUNCTION
2022-03-01 13:38:16 +03:00
Kseniia Sumarokova
781621eefe
Merge pull request #34946 from bigo-sg/hive_table_function
Add hive table function
2022-03-01 11:28:36 +01:00
alesapin
4b61e4795c
Merge pull request #34949 from nikitamikhaylov/system_log_tables_and_settings
Recreate system.{*}_log table on settings changes
2022-03-01 11:15:19 +01:00
lgbo-ustc
5ed41bda9b fixed code style 2022-03-01 17:20:32 +08:00
taiyang-li
f83132bad2 finish dev 2022-03-01 15:54:23 +08:00
lgbo-ustc
5ae99df87c fxied code style 2022-03-01 15:35:57 +08:00
lgbo-ustc
6e568c1530 update codes 2022-03-01 15:24:40 +08:00
lgbo-ustc
91a45d799e optimization for first time to read a random access readbuffer 2022-03-01 15:22:07 +08:00
zzsmdfj
e55fb747b2 to 32977_MaterializedMySQL_add_table_list_settings-fix-build-error 2022-03-01 14:48:11 +08:00
taiyang-li
b31440c77a Merge branch 'master' into add_metric_for_local 2022-03-01 12:29:36 +08:00
lgbo-ustc
0ae883ad5b fixec cmake failure on fasttest 2022-03-01 12:20:52 +08:00
zzsmdfj
4d9bdfa58c to 32977_MaterializedMySQL_add_table_list_settings 2022-03-01 10:21:58 +08:00
lgbo-ustc
f6c6ab9d47 fixed bugs 2022-03-01 09:51:23 +08:00
HeenaBansal2009
c14c60f1d3 Merge branch 'master' into Issue-33953 2022-02-28 11:12:54 -08:00
HeenaBansal2009
aa8494a808 Fix: System Reload Config Failure 2022-02-28 10:51:49 -08:00
Filatenkov Artur
af4362e40a
Improve certificate reloader (#34887)
* add ec support

* Add test

* fix tests and improve code style
2022-02-28 21:30:02 +03:00
Nikita Mikhaylov
d6036f6da3 Better
(cherry picked from commit 4ae445c9e227581ea9f1cbe9aa9d1ba82e1236c9)
2022-02-28 15:27:52 +00:00
Kseniia Sumarokova
3881f6a806
Merge pull request #34923 from azat/client-stop-multiquery-on-SIGINT
Stop processing multiqueries in clickhouse-client/local on SIGINT
2022-02-28 15:57:44 +01:00
Anton Popov
8fa112b841 add comments 2022-02-28 17:09:46 +03:00
mergify[bot]
8014cdf9d3
Merge branch 'master' into random-settings 2022-02-28 14:06:22 +00:00
Kruglov Pavel
011813957d
Merge pull request #34938 from azat/create-as-ignore-ttl
Ignore per-column TTL in CREATE TABLE AS if new table engine does not support it
2022-02-28 16:58:15 +03:00
kssenii
9b64a8fe39 Fix odbc bridge 2022-02-28 14:29:05 +01:00
lgbo-ustc
c070f76260 add missing files 2022-02-28 21:06:47 +08:00
Vladimir C
1149a49d79
Merge pull request #34902 from snar/freebsd-memory-tracking 2022-02-28 13:58:33 +01:00
lgbo-ustc
99cd25d70e add new table function: hive() 2022-02-28 20:51:33 +08:00
Vladimir C
9bceba5aa8
Merge pull request #34907 from kssenii/sqlite-db-allow-no-existing-db 2022-02-28 12:21:43 +01:00
Azat Khuzhin
f66ad2ee48 Stop processing multiqueries in clickhouse-client/local on SIGINT
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-02-28 12:19:13 +03:00
Azat Khuzhin
895c40686c Tiny cleanup of ClientBase
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-02-28 12:19:13 +03:00
Azat Khuzhin
067df156eb Use proper exit value on exit by signal (like in glibc)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-02-28 12:19:13 +03:00
lgbo-ustc
6473767c99 fixed code style 2022-02-28 17:10:56 +08:00
lgbo-ustc
5885cfd869 fixed bug : unexpected result when using in clause for filtering partitions 2022-02-28 16:47:50 +08:00
Hongbin
c9bc442114
fix comments 2022-02-28 16:44:35 +08:00
Hongbin
d117ce4893
fix comments 2022-02-28 16:31:58 +08:00
Azat Khuzhin
644f9168fa Ignore per-column TTL in CREATE TABLE AS if new table engine does not support it
Follow-up for: #6968
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-02-28 10:29:26 +03:00
lgbo-ustc
c5e02be44e fixed code-style 2022-02-28 15:22:54 +08:00
lgbo-ustc
2176d74cd1 Use connection pool in HiveMetastoreClient
1. remove lock for hive metastore client access
2. auo reconnect when connection is broken
2022-02-28 15:11:38 +08:00
Hongbin
99bd56e2de
Fix some code comments style 2022-02-28 08:15:37 +08:00
Azat Khuzhin
54ceadd4b3 Avoid busy polling in keeper while searching for changelog files to delete
Fixes: #34534
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-02-27 18:27:49 +03:00
Azat Khuzhin
311f884d3d Fix alignment for aligned_alloc() to fix build for glibc2.35+
In glibc2.35+ alloc_align added for aligned_alloc() alignment argument
8a9a59311551e833ca064de44ac23b193e1b704d ("Add alloc_align attribute to
memalign et al"), and this will cause an error:

    /src/ch/clickhouse/src/Common/malloc.cpp:41:26: error: requested alignment is not a power of 2 [-Werror,-Wnon-power-of-two-alignment]
        ignore(aligned_alloc(0, 0)); // -V575 NOLINT

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-02-26 13:04:38 +03:00
bharatnc
fb2a9a26df Merge remote-tracking branch 'upstream/master' into ncb/h3-misc-funcs-3 2022-02-25 20:36:31 -08:00
mergify[bot]
8d84d22618
Merge branch 'master' into windowview-multi-column-groupby 2022-02-26 00:50:49 +00:00
Kseniia Sumarokova
ba6032a353
Update src/Databases/SQLite/SQLiteUtils.cpp
Co-authored-by: Vladimir C <vdimir@clickhouse.com>
2022-02-26 01:31:04 +01:00
kssenii
2ba9010a34 Fix 2022-02-25 17:53:19 +01:00
kssenii
6c8401bfbd Fix 2022-02-25 16:35:37 +01:00
Anton Popov
7df8b38f6a fix deducing of nested types 2022-02-25 18:07:30 +03:00
kssenii
92d2cff045 Fix 2022-02-25 16:04:11 +01:00