Commit Graph

8008 Commits

Author SHA1 Message Date
kssenii
c84e0d13fa Fix test 2022-05-11 14:36:34 +02:00
Anton Kozlov
23e6792898 Lazy marks loading 2022-05-11 10:15:56 +00:00
Vxider
07fe7f5c09 disable read when windowview has no target table 2022-05-11 09:16:26 +00:00
Vxider
3dfede3165 support read for windowview 2022-05-11 09:00:49 +00:00
lgbo-ustc
4411fd87c8 reading optimization when all columns to read are partition keys 2022-05-11 16:49:30 +08:00
mergify[bot]
0e2a86dcee
Merge branch 'master' into MeiliSearch 2022-05-11 08:49:19 +00:00
Vxider
e4f43d0b01 update getSampleBlock for windowview 2022-05-11 08:47:08 +00:00
kssenii
61f2737e17 Merge master 2022-05-10 19:31:22 +02:00
Vxider
9ed1e4f7e6 fix build 2022-05-10 16:36:56 +00:00
kssenii
0feda67ec4 Fix progress for insert select 2022-05-10 15:04:08 +02:00
Anton Popov
aec30c4076
Merge pull request #37053 from CurtizJ/remove-streams-comments
Remove last mentions of data streams
2022-05-10 13:38:13 +02:00
alesapin
41737d66b0
Merge pull request #37014 from ClickHouse/better_delete_outdated_parts
Fix forgotten parts in cleanup thread
2022-05-10 12:34:34 +02:00
Sergei Trifonov
376e556474
Merge pull request #36861 from Vxider/fix-fire-hop-window
Fix fire in window view with hop window
2022-05-10 09:25:24 +02:00
Vxider
5d0a5d34c8 removing function populate in windowview 2022-05-10 15:06:58 +08:00
Vxider
8c3c80f84c rename parent table to source table 2022-05-10 14:54:36 +08:00
Anton Popov
e911900054 remove last mentions of data streams 2022-05-09 19:15:24 +00:00
alesapin
f8f170462c Fix text 2022-05-09 15:24:50 +02:00
alesapin
684bfe35ee Merge branch 'better_delete_outdated_parts' of github.com:ClickHouse/ClickHouse into better_delete_outdated_parts 2022-05-09 15:23:05 +02:00
alesapin
28e492bc17 Followup fix 2022-05-09 15:21:33 +02:00
alesapin
018ed10684 Add test 2022-05-09 15:21:21 +02:00
Alexander Tokmakov
b6be194d3a
Merge pull request #36976 from ClickHouse/replicated_database_fixes
Fixes for Replicated database
2022-05-09 14:41:49 +03:00
alesapin
bf4ed9b7e8 Merge branch 'master' into better_delete_outdated_parts 2022-05-09 12:40:35 +02:00
Robert Schulze
1b81bb49b4
Enable clang-tidy modernize-deprecated-headers & hicpp-deprecated-headers
Official docs:

  Some headers from C library were deprecated in C++ and are no longer
  welcome in C++ codebases. Some have no effect in C++. For more details
  refer to the C++ 14 Standard [depr.c.headers] section. This check
  replaces C standard library headers with their C++ alternatives and
  removes redundant ones.
2022-05-09 08:23:33 +02:00
Robert Schulze
61cbcbf073
Enable clang-tidy readability-misleading-indentation
Official docs:

  Correct indentation helps to understand code. Mismatch of the
  syntactical structure and the indentation of the code may hide serious
  problems.
2022-05-08 19:12:01 +02:00
Vxider
34f1821eb9 function now support for windowview populate 2022-05-08 23:43:08 +08:00
Alexey Milovidov
3fc95add7e
Merge pull request #36979 from Avogar/finalize-write-buffers
Finalize write buffers in case of exception
2022-05-08 18:41:20 +03:00
alesapin
aad246f833
Update StorageReplicatedMergeTree.cpp 2022-05-08 16:40:41 +02:00
alesapin
d4e0127b0a Followup 2022-05-08 13:28:59 +02:00
alesapin
2f650366a6 Merge branch 'master' into better_delete_outdated_parts 2022-05-08 12:55:42 +02:00
Vxider
712d046d04 Merged with master 2022-05-08 18:18:52 +08:00
Vxider
e7c4eb2697 Merged with master 2022-05-08 18:15:31 +08:00
Kseniia Sumarokova
fac59dfd97
Merge pull request #36998 from Vxider/removing-replacing-wv-transform
Removing ReplacingWindowColumnTransform in WindowView
2022-05-08 12:11:44 +02:00
Kseniia Sumarokova
b201d6d684
Merge pull request #36967 from Vxider/wv-fix-stuck
Fix stuck when drop source table in WindowView
2022-05-08 12:00:10 +02:00
alesapin
46712f1d98 Fix forgotten parts in cleanup thread 2022-05-08 00:53:55 +02:00
Vxider
aab6b1e8b5 update code style 2022-05-07 17:33:42 +00:00
Alexey Milovidov
fdbb5b75b2
Merge branch 'master' into minor-renames 2022-05-07 14:18:50 +03:00
Vxider
72a634b5c6 removing-replacing-window-column-transform 2022-05-07 08:41:51 +00:00
Vxider
c4b357d5cb update 2022-05-07 08:34:52 +00:00
avogar
02bd5f6542 Finalize write buffers in case of exception 2022-05-06 17:30:18 +00:00
Alexander Tokmakov
db66efb1a7 fix logical error on truncate table 2022-05-06 16:12:31 +02:00
Vxider
1966bb6504 fix stuck when drop source table in windowview 2022-05-06 12:34:00 +00:00
Vxider
5a8479446a simplify code 2022-05-06 14:35:10 +08:00
Vxider
38fec0ed4d update code style 2022-05-06 14:30:31 +08:00
Vxider
ceef3b480c update 2022-05-06 11:08:59 +08:00
Alexey Milovidov
4c6f964421
Merge pull request #36909 from ClickHouse/fixes_for_replicated_merge_tree
Some fixes for replicated merge tree
2022-05-06 00:44:21 +03:00
Alexey Milovidov
48c9fb472c
Merge pull request #36929 from bigo-sg/fix_still_in_cache
Fix issue of mergetree metadata cache
2022-05-05 23:49:31 +03:00
Vxider
9eea003d69 Merged with master 2022-05-06 00:12:17 +08:00
Vxider
a7dc1f48e5 populate support for windowview 2022-05-05 23:31:15 +08:00
Vxider
966733ef8d rename 2022-05-05 23:19:54 +08:00
Vitaly Baranov
dd51265218
Merge pull request #36864 from vitlibar/backup-improvements-4
Backup improvements
2022-05-05 15:37:51 +02:00
mergify[bot]
eba26ec956
Merge branch 'master' into fix-fire-hop-window 2022-05-05 13:11:34 +00:00
Alexander Tokmakov
45284108ba fix race with check thread 2022-05-05 14:16:26 +02:00
Kruglov Pavel
c6e26f6128
Merge pull request #36434 from Avogar/fix-s3-cluster
Fix bug in s3Cluster schema inference
2022-05-05 13:08:49 +02:00
Vxider
ffe1e3a5a1 update 2022-05-05 17:43:23 +08:00
taiyang-li
d673bd096e fix issue: https://github.com/ClickHouse/ClickHouse/issues/36671 2022-05-05 14:48:33 +08:00
Vxider
840ecc68ae wv-fix-multiple-columns 2022-05-05 14:27:12 +08:00
Robert Schulze
c48d9a4174
Merge pull request #36844 from rschu1ze/shared_ptr_helper3
Remove inherited create() method + disallow copying of storages
2022-05-04 19:16:30 +02:00
Alexander Tokmakov
dd2fe7f3b4 fix REPLACE_RANGE stuck in rare cases 2022-05-04 17:40:53 +02:00
Kruglov Pavel
97a1a2d665
Fix style 2022-05-04 17:16:02 +02:00
Alexander Tokmakov
af9b4a5b9c fix intersecting parts 2022-05-04 16:22:06 +02:00
Robert Schulze
e583099158
Fix build, pt. V 2022-05-04 15:50:52 +02:00
Vxider
407c14251a simplify code 2022-05-04 20:56:09 +08:00
vxider
0617ce01c9
simplify code
Co-authored-by: Sergei Trifonov <svtrifonov@gmail.com>
2022-05-04 20:51:12 +08:00
Robert Schulze
5dc06e6537
Fix build, pt. IV 2022-05-04 12:01:29 +02:00
Robert Schulze
f952ef1738
Fix build, pt. III 2022-05-04 11:20:56 +02:00
Antonio Andelic
808ea6dc65
Merge pull request #36888 from amosbird/projection-fix-one
Fix incorrect query result when doing constant aggregation
2022-05-04 10:34:40 +02:00
Robert Schulze
45c0ec44b0
Fix build, pt. II 2022-05-04 10:15:25 +02:00
Vxider
ecca2f23f7 simplify code 2022-05-04 04:02:13 +00:00
Vitaly Baranov
160bc288d3 Fix implementation of totalBytes() & totalRows() for Log family. 2022-05-04 00:15:21 +02:00
mergify[bot]
64084b5e32
Merge branch 'master' into shared_ptr_helper3 2022-05-03 20:46:16 +00:00
Amos Bird
7febf57439
Fix minmax_count_projection constant aggregation 2022-05-04 03:07:59 +08:00
Sergei Trifonov
1bcae160a0
Update MergeTreeBackgroundExecutor.h 2022-05-03 18:50:05 +02:00
Vitaly Baranov
828f45f078 Add new restore setting 'allow_non_empty_tables'. 2022-05-03 16:18:45 +02:00
Dmitry Novik
5ba7a55c18
Merge pull request #36650 from bigo-sg/hive_text_parallel_parsing
Parallel parsing of hive text format
2022-05-03 15:56:28 +02:00
Kruglov Pavel
050eed68e2
Fix bug after resolving conflicts 2022-05-03 14:47:24 +02:00
Alexander Gololobov
367898da5e
Merge pull request #35318 from weeds085490/feat/add_part_offset
feat(...): [LWD] support getting _part_offset of a row
2022-05-03 13:27:02 +02:00
Nikolai Kochetov
540fafbe74
Merge pull request #36856 from ClickHouse/repro-lc-and-s3
Reproduce and a little bit better fix for LC dict right offset.
2022-05-03 11:32:08 +02:00
Vitaly Baranov
cb9d867f5f Fix restore coordination for creating tables in replicated databases. 2022-05-03 11:03:16 +02:00
Vitaly Baranov
5257ce31f8 Improved using ThreadPool for making backup or restoring, changed columns in system.backups. 2022-05-03 11:03:13 +02:00
Vitaly Baranov
409edfd3fa Rework RestoreCoordination: make restore deterministic. 2022-05-03 11:01:44 +02:00
Robert Schulze
777b5bc15b
Don't let storages inherit from boost::noncopyable
... IStorage has deleted copy ctor / assignment already
2022-05-03 09:07:08 +02:00
Vxider
afbdb8fccc fix fire in hop window 2022-05-03 12:42:42 +08:00
Nikolai Kochetov
b10decc987 Fix style and formatting. 2022-05-02 18:59:43 +00:00
Nikolai Kochetov
3d9b87af09 Reproduce and a little bit better fix for LC dict right offset. 2022-05-02 18:06:47 +00:00
Kruglov Pavel
21bc5624cc
Fix 2022-05-02 14:16:29 +02:00
Kruglov Pavel
c3570b9f7e
Merge branch 'master' into fix-s3-cluster 2022-05-02 14:15:21 +02:00
Kruglov Pavel
b8ee22eb57
Update StorageS3.cpp 2022-05-02 14:09:54 +02:00
Azat Khuzhin
da974585f1 Remove unimplemented RAID1 support
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-05-02 13:59:13 +03:00
Robert Schulze
330212e0f4
Remove inherited create() method + disallow copying
The original motivation for this commit was that shared_ptr_helper used
std::shared_ptr<>() which does two heap allocations instead of
make_shared<>() which does a single allocation. Turned out that
1. the affected code (--> Storages/) is not on a hot path (rendering the
performance argument moot ...)
2. yet copying Storage objects is potentially dangerous and was
   previously allowed.

Hence, this change

- removes shared_ptr_helper and as a result all inherited create() methods,

- instead, Storage objects are now created using make_shared<>() by the
  caller (for that to work, many constructors had to be made public), and

- all Storage classes were marked as noncopyable using boost::noncopyable.

In sum, we are (likely) not making things faster but the code becomes
cleaner and harder to misuse.
2022-05-02 08:46:52 +02:00
Mikhail Artemenko
cf48390cb9
Merge branch 'master' into MeiliSearch 2022-05-02 00:28:42 +03:00
Mikhail Artemenko
6830b74925 fix ref after merge & change runner dockerfile 2022-05-01 23:57:44 +03:00
Alexey Milovidov
b034146ba4
Merge pull request #36799 from azat/cleanup
Tiny cleanup
2022-05-01 14:23:13 +03:00
Mikhail Artemenko
41f657d8ed
Merge branch 'master' into MeiliSearch 2022-05-01 10:01:56 +03:00
Robert Schulze
89aa9ae00f
Fixed clang-tidy check "bugprone-branch-clone"
The check is currently *not* part of .clang-tidy. It complains about:
(1) "switch has multiple consecutive identical branches"
(2) "repeated branch in conditional chain"

About (1): Lots of findings in switches were about redundant
"[[fallthrough]]" in places where the compiler would not warn anyways. I
have cleaned these up.

About (2): In if-else_if-else chains, fixing the warning would usually
mean concatenating multiple if-conditions. As this would reduce
readability in most cases, I did not fix these places.

Because of (2), I also refrained from adding "bugprone-branch-clone" to
.clang-tidy.
2022-04-30 19:40:28 +02:00
Kseniia Sumarokova
66f62b2ba6
Merge pull request #36632 from DevTeamBK/Fix-Coverity-Issues
Minor Coverity defects fixes
2022-04-30 15:11:40 +02:00
Alexey Milovidov
f65267e8dc
Merge pull request #36647 from CurtizJ/less-stat-calls
Reduce number of `stat` calls in storage `File`
2022-04-30 09:45:38 +03:00
Alexey Milovidov
1ddb04b992
Merge pull request #36715 from amosbird/refactorbase
Reorganize source files so that base won't depend on Common
2022-04-30 09:40:58 +03:00
Nikolai Kochetov
5807ca47b0
Merge pull request #36425 from ClickHouse/pool-size-hot-reload
Allow to increase number of threads and tasks for background executors
2022-04-29 17:24:12 +02:00
HeenaBansal2009
631b0154c0 Reverted change from ReadBufferFromRemoteFSGather.cpp 2022-04-29 07:21:35 -07:00
Azat Khuzhin
20e467397d ProjectionsDescription: pass through min_block_size_bytes for SquashingChunksTransform
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-29 17:04:56 +03:00
Anton Popov
19428353e7
Merge pull request #35797 from azat/nested-columns-fixes
RFC: Fix ALTER DROP COLUMN of nested column with compact parts
2022-04-29 15:09:05 +02:00
alesapin
c72596bae6
Merge pull request #36763 from kssenii/fix-async-reads
Fix some issues with low cardinality and async reads from remote fs
2022-04-29 12:18:19 +02:00
Alexey Milovidov
9fb1d92ff5
Merge pull request #36707 from CurtizJ/fix-vertical-merges
Fix vertical merges in wide parts
2022-04-29 10:09:50 +03:00
Azat Khuzhin
bf312c2a5b Fix ALTER DROP COLUMN of nested column with compact parts
ALTER DROP COLUMN of nested column did not requires mutation before, and
so it leaves nested column as-is, and in case of compact parts
subsequent alter, that requires mutation, will trigger READ_COLUMN of
that nested column (because it exists in part), but it will fail because
there is no such column in the table already.

Here is example of such a failure on CI - [1].

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/35459/52099b23a1cb9a7ff036c5c60aa037c999b333ef/stateless_tests__thread__actions__[1/3].html

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-29 07:12:34 +03:00
Azat Khuzhin
73ddc25e1e Require mutations for DROP COLUMN by root column name for nested columns
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-29 07:09:34 +03:00
Amos Bird
4a5e4274f0
base should not depend on Common 2022-04-29 10:26:35 +08:00
kssenii
84490d5198 Fix 2022-04-28 18:33:25 +02:00
HeenaBansal2009
3ac9434c57 Merge branch 'master' into Fix-Coverity-Issues 2022-04-28 08:14:50 -07:00
Sergei Trifonov
11f40376ae
Merge pull request #34571 from surahman/CH-31221-AWS-S3-object-version-id
[CH-31221] AWS S3 Object Version Specification
2022-04-28 15:45:33 +02:00
Kseniia Sumarokova
4c371f710e
Merge pull request #36676 from kssenii/refactor-with-size-buffer
Better version of SeekableReadBufferWithSize
2022-04-28 13:44:25 +02:00
alesapin
af980ef4ef
Merge pull request #36371 from Joeywzr/add_query_level_settingss
Add query level settings: parts_to_delay_insert and parts_to_throw_insert
2022-04-28 11:08:14 +02:00
Vitaly Baranov
641a5f5e35
Merge pull request #36198 from vitlibar/backup-improvements-3
Backup for replicated tables and other improvements
2022-04-28 09:23:53 +02:00
mergify[bot]
0d541d2da6
Merge branch 'master' into less-stat-calls 2022-04-28 01:50:49 +00:00
Anton Popov
eb810116a4 fix vertical merges in wide parts 2022-04-27 13:42:47 +00:00
taiyang-li
0341880250 Merge remote-tracking branch 'origin/master' into hive_text_parallel_parsing 2022-04-27 11:15:16 +08:00
Alexey Milovidov
b8a9f1411a
Merge pull request #36649 from azat/system.processes-is_all_data_sent
clickhouse-test: improve left queries after the test hardening
2022-04-27 05:21:22 +03:00
HeenaBansal2009
4961caec13 Merge branch 'master' into Fix-Coverity-Issues 2022-04-26 11:43:44 -07:00
Alexander Tokmakov
b1949ee901
Merge pull request #36680 from ClickHouse/better_logs_virtual_parts
Better logs for virtual parts
2022-04-26 21:36:20 +03:00
Alexander Tokmakov
d149ac8bd7 better logs for virtual parts 2022-04-26 16:58:40 +02:00
HeenaBansal2009
13a9a8fd5e Style check fix 2022-04-26 07:13:09 -07:00
HeenaBansal2009
267f426605 Minor Coverity defetcs fixes 2022-04-26 07:13:09 -07:00
kssenii
9d364cdce2 Refactor 2022-04-26 15:33:53 +02:00
Alexander Tokmakov
190becdcc3
Merge pull request #36644 from ClickHouse/fix_some_flaky_tests
Fix some flaky tests
2022-04-26 13:40:14 +03:00
Sergei Trifonov
c1a0165f7d merge from master and fix conflicts 2022-04-26 12:39:16 +02:00
Azat Khuzhin
6339a48923 Add is_all_data_sent into system.processes
v2: fix SHOW PROCESSLIST (does not have process list entry)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-26 12:15:00 +03:00
Anton Popov
e051751012
Merge pull request #36637 from CurtizJ/dynamic-columns-11
Fix merges of wide parts with type `Object`
2022-04-26 10:34:04 +02:00
taiyang-li
b7cc344d62 remove useless codes 2022-04-26 14:42:43 +08:00
taiyang-li
99dee35b6e parallel parsing of hive text format 2022-04-26 14:33:10 +08:00
Alexey Milovidov
7683901689
Merge pull request #36630 from azat/mutator-cleanup
Tiny Mutator code cleanup
2022-04-26 08:24:50 +03:00
Alexey Milovidov
02662dfd13
Update ColumnsDescription.h 2022-04-26 08:23:01 +03:00
Memo
c38a4b4255
Update src/Storages/MergeTree/MergeTreeData.h
Co-authored-by: alesapin <alesapin@gmail.com>
2022-04-26 10:26:18 +08:00
Anton Popov
866a51a948 reduce number of stat calls in storage File 2022-04-25 22:13:15 +00:00
mergify[bot]
a5aab53b70
Merge branch 'master' into add_query_level_settingss 2022-04-25 21:41:36 +00:00
mergify[bot]
178f244c8b
Merge branch 'master' into dynamic-columns-11 2022-04-25 21:36:56 +00:00
alesapin
92296484e7
Merge pull request #36348 from rschu1ze/erase_if3
Replace remove-erase idiom by C++20 erase()/erase_if()
2022-04-25 23:34:18 +02:00
Alexander Tokmakov
19a376b9f7 fix assertions 2022-04-25 22:41:46 +02:00
Anton Popov
d28b1559e6 fix merges of wide parts with type Object 2022-04-25 16:44:24 +00:00
mergify[bot]
265398d1b6
Merge branch 'master' into feat/add_part_offset 2022-04-25 15:58:16 +00:00
Azat Khuzhin
8b544e26d3 Move some functions from MergeTreeDataMergerMutator to MutateTask
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-25 18:16:38 +03:00
Azat Khuzhin
f4df88a938 Add a comment for ColumnsDescription::subcolumns
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-25 18:16:38 +03:00
Azat Khuzhin
615d35e233 Remove dead function MergeTreeDataMergerMutator::splitMutationCommands()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-25 18:16:38 +03:00
Azat Khuzhin
8440fec3db Fix coding alignment in MutateTask
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-25 18:16:38 +03:00
Vitaly Baranov
68a020ecea Implement BACKUP/RESTORE ON CLUSTER. 2022-04-25 16:34:33 +02:00
Vitaly Baranov
144d3aefeb Add system table system.backups; implement async mode for commands BACKUP & RESTORE 2022-04-25 16:34:33 +02:00
Vitaly Baranov
3966ee1e30 Use SeekableReadBuffer instead of ReadBuffer in IBackupEntry. 2022-04-25 16:34:33 +02:00
Vitaly Baranov
acd28d8a1d Implement RESTORE for replicated tables. 2022-04-25 16:34:33 +02:00
Nikolai Kochetov
0fa63a8d65
Merge pull request #36549 from ClickHouse/interpolate-alias-fix
Avoid projections if INTERPOLATE with expressions is present
2022-04-25 13:18:00 +02:00
Kruglov Pavel
34c342fdd3
Merge pull request #36205 from Avogar/improve-globs
Some refactoring around schema inference with globs
2022-04-25 13:14:46 +02:00
Nikolai Kochetov
d5b2d28f7b
Merge pull request #36579 from amosbird/refactor-executor1
Small refactoring of Processors and QueryPipeline
2022-04-25 12:47:59 +02:00
Alexander Gololobov
c484a1c269 Preserve order of virtual columns in the header and in data chunks when adding _part_offset together with other virtual columns 2022-04-25 12:10:56 +02:00