Commit Graph

29491 Commits

Author SHA1 Message Date
Antonio Andelic
10d7259c2b Add log for snapshot on exit 2022-08-04 13:12:24 +00:00
Antonio Andelic
c99c5a0dd1 Merge branch 'master' into keeper-block-memory-tracker-commit 2022-08-04 13:04:11 +00:00
Antonio Andelic
0a7d2e7b8a Use LockMemoryExceptionThread 2022-08-04 13:03:05 +00:00
alesapin
1eb28f5f5f
Merge pull request #39860 from ClickHouse/avoid_additional_disk_touch
Better total part size calculation on mutation
2022-08-04 14:21:31 +02:00
Alexander Gololobov
7caf4c210e Update local queue to see current mutation entry 2022-08-04 14:06:19 +02:00
Kruglov Pavel
235649cb98
Merge pull request #39458 from Avogar/fix-cancel-insert-into-function
Fix WriteBuffer finalize when cancel insert into function
2022-08-04 13:02:08 +02:00
vdimir
298fb2431d
Fix column not found for push down with join 2022-08-04 10:58:21 +00:00
Antonio Andelic
278921be3b Fix style 2022-08-04 07:25:28 +00:00
Antonio Andelic
fa98338ce1 Add comment for memory tracker blocking 2022-08-04 07:13:42 +00:00
Alexey Milovidov
24ee944986
Update TaskStatsInfoGetter.cpp 2022-08-04 07:34:36 +03:00
Fangyuan Deng
0bf5c3d1a1
Merge branch 'master' into fix_netlink_leak 2022-08-04 11:42:17 +08:00
pzhdfy
848a349e42 fix potential netlink leak when init fail in TaskStatsInfoGetter 2022-08-04 11:37:27 +08:00
Alexey Milovidov
9e46abc560
Merge pull request #39420 from amosbird/better-projection1-fix1
Normalize AggregateFunction types and state representations
2022-08-04 03:06:55 +03:00
Nikolay Degterinsky
71cb055ecc
Merge pull request #39812 from guowangy/applyFunction-multi-thread
KeyCondition: optimize applyFunction in multi-thread scenario
2022-08-04 01:36:47 +02:00
Alexey Milovidov
fe95703a49
Merge pull request #39586 from guowangy/bytes-to-bits-mask
Improve bytes to bits mask transform for SSE/AVX/AVX512
2022-08-04 02:33:58 +03:00
Alexey Milovidov
f474eb957d
Merge pull request #39758 from ClickHouse/tsan_clang_15
Try clang-15 for build with tsan
2022-08-04 01:56:52 +03:00
Kseniia Sumarokova
bd5610b732
Merge branch 'master' into update-azure-lib 2022-08-03 23:00:57 +02:00
Yakov Olkhovskiy
1680be19ca some refactoring 2022-08-03 16:36:52 -04:00
Yakov Olkhovskiy
2e34b384c1 update tcp protocol, add quota_key 2022-08-03 15:44:08 -04:00
Alexander Tokmakov
a269cf29e4 remove unused dirs from store on all disks 2022-08-03 19:49:16 +02:00
Alexander Tokmakov
b8ffaabdd8 add chmod and stat to IDisk 2022-08-03 19:47:36 +02:00
Anton Popov
04f6a85070 fix mutations 2022-08-03 17:34:46 +00:00
Kruglov Pavel
b84e65bb3b
Merge pull request #39716 from arthurpassos/fix_scalar_cte_with_lc_result
Unwrap LC column in IExecutablefunction::executeWithoutSparseColumns
2022-08-03 18:53:37 +02:00
Maksim Kita
e6efb47aa3
Merge pull request #39850 from kitaisreal/select-query-has-join-method
Add hasJoin method into ASTSelectQuery
2022-08-03 18:50:25 +02:00
Nikita Taranov
4943202921
Improve memory usage during memory efficient merging of aggregation results (#39429) 2022-08-03 17:56:59 +02:00
Anton Popov
5da32fafb3 fix ALTER MODIFY COLUMN from nested 2022-08-03 15:08:38 +00:00
Antonio Andelic
56ca93ca3f Block memory tracker in Keeper during commit 2022-08-03 14:14:57 +00:00
Nikita Mikhaylov
f144eae388
Fix typo and extra dots in exception messages from OverCommitTracker (#39858) 2022-08-03 15:23:07 +02:00
Igor Nikonov
9eef299e11
Merge pull request #39103 from tonickkozlov/tonickkozlov/37032/do-not-optimize-functions-shadowing-args
Do not optimize GROUP BY functions that shadow their arguments
2022-08-03 15:06:42 +02:00
alesapin
f608e62c27 Fix call 2022-08-03 14:17:31 +02:00
alesapin
56a4d26e87 Better total part size calculation on mutation 2022-08-03 14:15:45 +02:00
Anton Popov
6b15ee2bd9
Merge pull request #39685 from CurtizJ/hash-functions-map
Allow to execute hash functions with arguments of type `Map`
2022-08-03 13:51:16 +02:00
Antonio Andelic
05467e315f
Merge pull request #39698 from ClickHouse/update-digest-version
Update Keeper version for digest
2022-08-03 13:13:00 +02:00
alesapin
86561509c5
Merge pull request #39673 from ClickHouse/fix-rollback-inconsistency-keeper
Rollback request in Keeper if storing log fails
2022-08-03 13:03:31 +02:00
Maksim Kita
3e6b663020 ASTSelectQuery added hasJoin method 2022-08-03 11:25:45 +02:00
Robert Schulze
00a7c8733b
Merge pull request #39633 from guowangy/filter-vbmi2
ColumnVector: optimize filter with AVX512VBMI2 compress store
2022-08-03 09:23:24 +02:00
Antonio Andelic
cbff608d0b
Merge branch 'master' into update-digest-version 2022-08-03 07:53:38 +02:00
Kruglov Pavel
8a351724de
Update settings changes history 2022-08-02 19:31:20 +02:00
Anton Popov
2a5b023b0f
Merge pull request #39800 from CurtizJ/fix-cannot-read-all-data
Fix `CANNOT_READ_ALL_DATA` with `pread_threadpool`.
2022-08-02 16:06:13 +02:00
Nikolay Degterinsky
6405439976
Merge pull request #39558 from evillique/fix-logs
Fix logs rotation issue
2022-08-02 15:49:14 +02:00
Anton Popov
a333cc4146 Merge remote-tracking branch 'upstream/master' into HEAD 2022-08-02 12:57:43 +00:00
Anton Popov
2312d8ceea
Merge pull request #39696 from BiteTheDDDDt/fix_0729
fix align of AggregateFunctionDistinct
2022-08-02 14:27:01 +02:00
Arthur Passos
e9b124b4bc Don't use default implementation for LC columns in Scalar functions 2022-08-02 09:17:53 -03:00
Anton Popov
f94d4d4877
Merge branch 'master' into hash-functions-map 2022-08-02 13:26:54 +02:00
Anton Kozlov
ce70f3dacb fixed 02303_query_kind test; added logging in 02352_grouby_shadows_arg test 2022-08-02 10:50:27 +00:00
Alexander Tokmakov
82b50e79cf
Merge branch 'master' into tsan_clang_15 2022-08-02 13:00:55 +03:00
Alexander Tokmakov
5050e0aca5
Revert "Limit number of analyze for one query" 2022-08-02 12:48:31 +03:00
Nikolai Kochetov
a3bf9496d4
Merge pull request #39799 from ClickHouse/fix-extra-column-after-array-join-optimization
Fix extra column after ARRAY JOIN optimization.
2022-08-02 10:35:35 +02:00
Wangyang Guo
91e3e2f18b KeyCondition: optimize applyFunction in multi-thread scenario
Construct and deconstruct args (ColumnsWithTypeAndName) will inc/dec
ref_count (actually this is a atomic lock inc/dec operation) to share_ptr,
which may share the same DataTypePtr among different threads. This will
have a lock contention issue in large parallel situation.

The patch try to minimize `args` scope and reduce unnecessary
construct/destory of instances. It will improve the performance in
multi-thread cases.
2022-08-02 16:16:16 +08:00
Antonio Andelic
b3b3c371f0
Update KeeperStorage.h 2022-08-02 09:20:02 +02:00
Amos Bird
b98e645ff7
Revert "test what will be wrong if state returns norm type"
This reverts commit 55802099bc.
2022-08-02 11:33:45 +08:00
Alexey Milovidov
316528817b
Merge pull request #39179 from azat/fsync-profile-events
Add profile events for fsync
2022-08-02 05:44:35 +03:00
Amos Bird
c8aaa32f9c
Revert "Another test"
This reverts commit 69347028c5.
2022-08-02 10:43:48 +08:00
Wangyang Guo
6a7213291b Merge master and resolve conflict 2022-08-02 10:40:40 +08:00
Alexey Milovidov
b1919d045f
Update ThreadPoolReader.cpp 2022-08-02 05:34:14 +03:00
Wangyang Guo
ce3411b0ff Merge master and solve conflict 2022-08-02 10:27:01 +08:00
Nikolay Degterinsky
90b08d6fae
Merge branch 'master' into fix-logs 2022-08-02 02:55:29 +02:00
Anton Popov
64cbecf0c8 fix build on non linux systems 2022-08-02 00:13:20 +00:00
Anton Popov
5d6804dd65
Merge branch 'master' into fix_0729 2022-08-01 21:14:46 +02:00
Amos Bird
69347028c5
Another test 2022-08-02 03:08:25 +08:00
Anton Popov
43e8ca5ba8 fix CANNOT_READ_ALL_DATA with pread_threadpool 2022-08-01 18:40:21 +00:00
Nikolai Kochetov
77c143aa23 Fix extra column after ARRAY JOIN optimization. 2022-08-01 17:56:27 +00:00
Alexey Milovidov
3de747a6e2
Merge pull request #39746 from ClickHouse/cleanup-projection-setting
Cleanup usages of `allow_experimental_projection_optimization` setting, part 1
2022-08-01 19:21:30 +03:00
Alexander Tokmakov
0d68b1c67f fix build with clang-15 2022-08-01 18:00:54 +02:00
Maksim Kita
31891322a5
Merge pull request #39681 from pkit/pkit/executable_settings
add settings for executable table func
2022-08-01 17:59:52 +02:00
Robert Schulze
bf574b9154
Merge pull request #39760 from ClickHouse/bit-fiddling
Use std::popcount, ::countl_zero, ::countr_zero functions
2022-08-01 17:04:51 +02:00
Amos Bird
55802099bc
test what will be wrong if state returns norm type 2022-08-01 21:04:16 +08:00
Amos Bird
8ab475ccf3
Fix another case 2022-08-01 21:04:15 +08:00
Amos Bird
09c99d8440
Fix tests 2022-08-01 21:04:14 +08:00
Amos Bird
f84e5b6827
Allow to format DataTypePtr 2022-08-01 21:04:13 +08:00
Amos Bird
0e746c1afa
More format refactor 2022-08-01 21:04:13 +08:00
Amos Bird
f11d0484f3
Normalize everything else 2022-08-01 21:04:11 +08:00
Anton Popov
8a3ec52b5e
Merge pull request #39752 from CurtizJ/fix-index-analysis
Fix index analysis with tuples and `IN`
2022-08-01 14:41:46 +02:00
Anton Popov
eeb9366010
Merge pull request #39731 from CurtizJ/fix-send-logs-level-test
Fix redirecting of logs to stdout in clickhouse-client
2022-08-01 14:22:49 +02:00
Alexander Tokmakov
80f9ba9186
Merge pull request #39690 from ClickHouse/show-addresses-in-stack-traces
Configuration parameter to hide addresses in stack traces
2022-08-01 14:20:37 +03:00
Kruglov Pavel
dfdfabec94
Merge pull request #39218 from evillique/file_default_value
Add default argument to the function `file`
2022-08-01 13:04:19 +02:00
Kruglov Pavel
42136b7630
Merge pull request #39647 from Avogar/fix-arrow-strings
Fix strings in dictionary in Arrow format
2022-08-01 12:46:07 +02:00
Kruglov Pavel
6457c069a9
Merge pull request #39293 from kssenii/fix-positional-args-case
Fix positional arguments in case of unneeded columns pruning
2022-08-01 12:42:18 +02:00
Antonio Andelic
9ec27c0ab4
Merge pull request #39757 from ClickHouse/fix-rocksdb-filter-with-params
Use params correctly for filtering by key in EmbeddedRocksDB
2022-08-01 12:17:10 +02:00
Wangyang Guo
6a67147584 ColumnVector: refactory to use TargetSpecific::Default::doFilterAligned 2022-08-01 13:41:02 +08:00
Wangyang Guo
b05be56eef ColumnVector: naming style fix 2022-08-01 10:16:15 +08:00
Dmitry Novik
ab5a147065
Merge pull request #38725 from azat/fix-order-by-projection
Fix ORDER BY that matches projections ORDER BY
2022-08-01 00:32:59 +02:00
Robert Schulze
d39259a4c0
More conversions 2022-07-31 22:06:02 +00:00
Azat Khuzhin
3e627e2861 Add profile events for fsync
The following new provile events had been added:

- FileSync - Number of times the F_FULLFSYNC/fsync/fdatasync function was called for files.
- DirectorySync - Number of times the F_FULLFSYNC/fsync/fdatasync function was called for directories.
- FileSyncElapsedMicroseconds - Total time spent waiting for F_FULLFSYNC/fsync/fdatasync syscall for files.
- DirectorySyncElapsedMicroseconds - Total time spent waiting for F_FULLFSYNC/fsync/fdatasync syscall for directories.

v2: rewrite test to sh with retries
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-31 23:19:30 +03:00
Nikolai Kochetov
22fbfe19a4 Merge branch 'master' into use-dag-in-key-condition 2022-07-31 21:54:12 +02:00
Alexey Milovidov
ccef227494
Merge pull request #38185 from vdimir/analyze_stuck
Limit number of analyze for one query
2022-07-31 22:53:09 +03:00
kssenii
687f0fabfc Move some dependencies 2022-07-31 20:17:22 +03:00
Robert Schulze
a7734672b9
Use std::popcount, ::countl_zero, ::countr_zero functions
- Introduced with the C++20 <bit> header

- The problem with __builtin_c(l|t)z() is that 0 as input has an
  undefined result (*) and the code did not always check. The std::
  versions do not have this issue.

- In some cases, we continue to use buildin_c(l|t)z(), (e.g. in
  src/Common/BitHelpers.h) because the std:: versions only accept
  unsigned inputs (and they also check that) and the casting would be
  ugly.

(*) https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
2022-07-31 15:16:51 +00:00
Robert Schulze
52d08d9db4
Merge pull request #39520 from ClickHouse/no-split-binary
Remove SPLIT_BINARY
2022-07-31 14:23:31 +02:00
Robert Schulze
0f2177127b
Merge pull request #39751 from ClickHouse/enable-getoskernelversion
Enable SQL function getOSKernelVersion() on all platforms
2022-07-31 14:09:46 +02:00
Nikolai Kochetov
eaeb0446c7
Merge pull request #39705 from ClickHouse/avoid-recursive-dtor-for-ast
Avoid recursive destruction of AST.
2022-07-31 12:59:20 +02:00
Antonio Andelic
eea1aaef2c Use params for filtering by key in EmbeddedRocksDB 2022-07-31 10:44:01 +00:00
Alexander Gololobov
d259c4fa6c
Merge pull request #39747 from ClickHouse/fix-double-escaping-json
Fix double escaping in the metadata of FORMAT JSON
2022-07-31 11:28:25 +02:00
Robert Schulze
4d7627e45e
Fix include 2022-07-31 07:36:40 +00:00
Anton Popov
095e400075 fix index analysis with tuples and IN 2022-07-31 00:38:52 +00:00
Alexey Milovidov
d285648a37
Merge branch 'master' into shell-command-wait-pid-refactoring 2022-07-31 02:57:46 +03:00
Anton Popov
74eb8119ef
Merge branch 'master' into fix-custom-serializations 2022-07-31 01:51:52 +02:00
Alexey Milovidov
22bc89690d
Merge pull request #39222 from azat/fix-http-session
Do not report "Failed communicating with" on and on for parts exchange
2022-07-31 02:24:05 +03:00
Alexey Milovidov
8fb70abe3e
Merge pull request #39178 from azat/dist-insert-log
Add connection info for Distributed sends log message
2022-07-31 02:22:22 +03:00
Robert Schulze
8ca236de08
Enable SQL function getOSKernelVersion() on all platforms
Follow up to PR #38615
2022-07-30 22:36:47 +00:00
Igor Nikonov
83e1dd1172
Merge branch 'master' into ordinary_distinct_small_refact 2022-07-31 00:23:21 +02:00
Robert Schulze
85773e0926
Merge pull request #38615 from liyinsg/simplified_function_registration_interface
Simplified function registration interface
2022-07-31 00:18:37 +02:00
Alexey Milovidov
4828be7fc4 Fix double escaping in the metadata of FORMAT JSON 2022-07-30 23:56:41 +02:00
Alexey Milovidov
441f2feb49 Cleanup usages of allow_experimental_projection_optimization setting, part 1 2022-07-30 23:40:21 +02:00
Igor Nikonov
7245ddcc20 Simple refactoring: ordinary DISTINCT implementation 2022-07-30 20:25:56 +00:00
Alexey Milovidov
2bdc926572
Merge pull request #39687 from vitlibar/fix-reading-from-encrypted-disk
Fix seeking while reading from encrypted disk
2022-07-30 23:09:15 +03:00
Robert Schulze
b52843d5fd
Merge pull request #37951 from zvonand/dt64_timeslots
Fix timeSlots for DateTime64
2022-07-30 20:49:05 +02:00
Constantine Peresypkin
b9d7cd6a5d add settings for executable table func
SELECT * FROM executable('<script name>', '<format>', '<columns>', (SELECT * FROM table), SETTINGS max_command_execution_time=100, command_termination_timeout=100)

fixes #38908
2022-07-30 20:02:56 +02:00
kssenii
d66c108a04 Fix 2022-07-30 18:42:22 +03:00
Alexey Milovidov
fbedb70f8b
Merge branch 'master' into fix-logs 2022-07-30 18:37:09 +03:00
Alexey Milovidov
5eea7ce18d
Merge branch 'master' into fix-reading-from-encrypted-disk 2022-07-30 18:30:00 +03:00
Maksim Kita
acb0137dbb
Merge pull request #39718 from kitaisreal/join-enums-refactoring
Join enums refactoring
2022-07-30 13:53:08 +02:00
Antonio Andelic
7cdad88327 Create snapshot on shutdown 2022-07-30 11:34:17 +00:00
Alexey Milovidov
c9700efab7
Merge branch 'master' into fix-reading-from-encrypted-disk 2022-07-30 05:30:59 +03:00
Alexey Milovidov
1e974b55ea
Merge branch 'master' into analyze_stuck 2022-07-30 04:56:21 +03:00
Alexey Milovidov
8f348edbbd
Merge pull request #39000 from ClickHouse/avx-enablement
Avx enablement
2022-07-30 04:51:07 +03:00
Alexey Milovidov
3fa1a775d9
Merge branch 'master' into bytes-to-bits-mask 2022-07-30 04:39:09 +03:00
Alexey Milovidov
c0d7b6efc3 Suggestions from @tavplubix 2022-07-30 01:45:06 +02:00
Alexey Milovidov
4aa96767d5 Merge branch 'master' of github.com:ClickHouse/ClickHouse into show-addresses-in-stack-traces 2022-07-30 01:44:04 +02:00
Maksim Kita
8653562f52 Fixed build 2022-07-29 23:34:25 +02:00
HarryLeeIBM
cc73b53116 Fix Endian issue in SipHash for s390x 2022-07-29 13:21:50 -07:00
Igor Nikonov
f6739c6c98
Merge pull request #39688 from ClickHouse/const_columns_in_distinct
Fix DISTINCT: handle all const columns case correctly
2022-07-29 22:03:20 +02:00
Anton Popov
942f056ce5 fix redirecting of logs to stdout in client 2022-07-29 19:10:23 +00:00
kssenii
efff78819a Merge remote-tracking branch 'upstream/master' into fix-positional-args-case 2022-07-29 22:07:51 +03:00
Kruglov Pavel
ccd1e1bdb8
Merge branch 'master' into fix-cancel-insert-into-function 2022-07-29 20:27:32 +02:00
Alexander Gololobov
6099f66fd6
fixed type 2022-07-29 19:55:50 +02:00
Maksim Kita
8ba42876fc Fixed build 2022-07-29 19:35:15 +02:00
Nikolai Kochetov
117fda2d83
Update gtest_ast_deleter.cpp 2022-07-29 19:10:43 +02:00
Arthur Passos
f0f19874da fix style 2022-07-29 13:56:01 -03:00
Maksim Kita
8fc6bad4f4 Join enums refactoring 2022-07-29 18:35:05 +02:00
Arthur Passos
59fbd21024 Unwrap LC column in IExecutablefunction::executeWithoutSparseColumns 2022-07-29 12:03:09 -03:00
Alexander Tokmakov
07617df98e
Merge branch 'master' into fix_flaky_tests_ordinary 2022-07-29 18:02:05 +03:00
Nikolai Kochetov
59a11b32ad
Merge branch 'master' into use-dag-in-key-condition 2022-07-29 17:01:33 +02:00
Maksim Kita
683371978c
Merge pull request #39449 from kitaisreal/direct-dictionary-dict-has-multiple-same-keys-fix
DirectDictionary improve performance of dictHas with duplicate keys
2022-07-29 16:01:12 +02:00
Anton Kozlov
ae7fd5bf93 Default database resolution in distributed reads 2022-07-29 13:35:57 +00:00
Alexander Tokmakov
0cef018c29 clear mmapio cache when dropping table from Ordinary 2022-07-29 14:26:41 +02:00
Robert Schulze
3d1797f75f
Merge remote-tracking branch 'origin/master' into no-split-binary 2022-07-29 12:17:43 +00:00
Robert Schulze
a3c52f1140
Merge pull request #39679 from azat/fix-utils
Fix utils build on CI
2022-07-29 14:02:53 +02:00
Anton Popov
57e4fb2e30 Merge remote-tracking branch 'upstream/master' into HEAD 2022-07-29 11:42:11 +00:00
Anton Popov
bb551566e7 fix build 2022-07-29 11:41:53 +00:00
Nikolai Kochetov
ac90aa435e Avoid recursive destruction of AST. 2022-07-29 11:00:33 +00:00
Vitaly Baranov
2f3b27d1ac Fix seeking while reading from encrypted disk. 2022-07-29 12:45:29 +02:00
zvonand
b390bcfe7c fix wrong data type cast 2022-07-29 13:25:40 +03:00
Pxl
b4842860e3
Merge branch 'master' into fix_0729 2022-07-29 16:48:26 +08:00
Alexander Tokmakov
396e49d243
Merge pull request #39686 from azat/zookeeper_log.duration_ms
Add duration_ms into system.zookeeper_log
2022-07-29 11:40:30 +03:00
Azat Khuzhin
498c8b3c52 Fix clang-tidy in utils/examples
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-29 11:36:51 +03:00
Antonio Andelic
3b96ff0fe4 Merge branch 'master' into fix-rollback-inconsistency-keeper 2022-07-29 07:53:00 +00:00
Li Yin
4088c0a7f3 Automated function registration
Automated register all functions with below naming convention by
iterating through the symbols:
void DB::registerXXX(DB::FunctionFactory &)
2022-07-29 15:39:50 +08:00
Antonio Andelic
21becb3030 Update version for digest 2022-07-29 07:36:19 +00:00
BiteTheDDDDt
cb68180cdf fix align of AggregateFunctionDistinct 2022-07-29 15:22:03 +08:00