Commit Graph

1903 Commits

Author SHA1 Message Date
Anton Ivashkin
39a30b77fe Merge master 2021-05-17 11:47:48 +03:00
alesapin
eae2df6478
Merge pull request #23997 from ClickHouse/fix_intersecting_parts
Try fix intersecting parts
2021-05-17 10:46:58 +03:00
Nikolai Kochetov
98e6c27a95
Merge pull request #24168 from amosbird/projection-fix3
Fix distributed processing when using projection
2021-05-17 09:45:39 +03:00
Maksim Kita
20cced0a4c
Merge pull request #24155 from kitaisreal/function-refactoring
IFunction refactoring
2021-05-17 09:26:57 +03:00
kssenii
3b1bf2bae6 Poco::Path substitution 2021-05-16 23:38:23 +03:00
kssenii
807684812e Fix clang tidy 2021-05-16 18:18:11 +00:00
kssenii
d44f1680da Use unsigned type for (de)serialization 2021-05-16 18:09:55 +00:00
Amos Bird
07b1be5a76
Fix distributed processing when using projection 2021-05-16 22:40:06 +08:00
alesapin
29726b5510
Merge pull request #24122 from ClickHouse/fix_table_startup
Set readonly mode if restarting thread failed to activate replica
2021-05-16 16:45:51 +03:00
kssenii
22b6d0eb25 Adjust modulo recursively 2021-05-16 09:20:59 +00:00
Nikolai Kochetov
093b7e120a
Merge pull request #24062 from amosbird/projection-fix1
Fix empty key projection query analysis
2021-05-16 07:37:03 +03:00
kssenii
add5970b5f fs::absolute 2021-05-16 03:12:13 +03:00
kssenii
c7f51fe60e Modulo adjustment for partition key 2021-05-15 19:51:02 +00:00
Maksim Kita
947f28d430 IFunction refactoring 2021-05-15 20:33:15 +03:00
Alexander Tokmakov
df5f3fbc9d review suggestions 2021-05-14 19:11:40 +03:00
Amos Bird
a113acc40c
Fix empty key 2021-05-14 22:54:14 +08:00
Amos Bird
8de016d33a
Fix empty key projection query analysis 2021-05-14 22:26:26 +08:00
Alexander Tokmakov
41776ba5d9 fix 2021-05-14 15:55:30 +03:00
Alexander Tokmakov
970ad94851 Merge branch 'master' into fix_intersecting_parts 2021-05-14 13:17:02 +03:00
alesapin
d4c6a5a05e Better logging 2021-05-14 11:38:53 +03:00
alesapin
67e4393769 If table was not active set readonly mode 2021-05-14 11:32:41 +03:00
kssenii
f33a517d33 Merge branch 'master' of github.com:ClickHouse/ClickHouse into poco-file-to-std-fs 2021-05-14 02:58:26 +03:00
Alexander Tokmakov
df2849be90 Merge branch 'master' into mvcc_prototype 2021-05-13 21:48:36 +03:00
Alexander Tokmakov
2da12f0b59 fix intersection of drop range and merge 2021-05-13 17:04:36 +03:00
Alexander Tokmakov
e114c7eb8b fix virtual parts in REPLACE_RANGE 2021-05-13 14:29:59 +03:00
feng lv
c6f8ab9826 fix 2021-05-13 02:05:53 +00:00
Nikolai Kochetov
690410009c Restor is_temporary flag for fetched part. 2021-05-12 19:17:01 +03:00
kssenii
0527f0ea33 Merge branch 'master' of github.com:ClickHouse/ClickHouse into poco-file-to-std-fs 2021-05-12 16:54:18 +03:00
feng lv
9035e3a643 fix test and conflict 2021-05-11 16:22:24 +00:00
Nikolai Kochetov
817bc1377c Fix part check for projections. 2021-05-11 17:07:19 +03:00
kssenii
393b026f2e Merge branch 'master' of github.com:ClickHouse/ClickHouse into poco-file-to-std-fs 2021-05-11 16:49:23 +03:00
alesapin
46e136b5c4
Merge branch 'master' into nv/parts-uuid-move-shard 2021-05-11 15:36:40 +03:00
Nikolai Kochetov
a7d717d767 Remove unused code. 2021-05-11 14:59:56 +03:00
Nikolai Kochetov
89f16014b8 fix fetch for projection. 2021-05-11 14:44:59 +03:00
Amos Bird
074c2ead9c
Fix 2021-05-11 18:22:23 +08:00
Amos Bird
5e9fab6d10
Comment debug info out 2021-05-11 18:12:29 +08:00
Amos Bird
5836e2e277
Fix issues in normal projection 2021-05-11 18:12:29 +08:00
Amos Bird
51d685bb9c
Even more fixes 2021-05-11 18:12:29 +08:00
Amos Bird
ddd4256a15
More fixes 2021-05-11 18:12:28 +08:00
Amos Bird
718c284437
Fix more tests 2021-05-11 18:12:28 +08:00
Amos Bird
ba17acbd63
Fix tests 2021-05-11 18:12:28 +08:00
Amos Bird
a3fd0b6f2e
Fix tests 2021-05-11 18:12:28 +08:00
Amos Bird
42f161b1dc
Fix more 2021-05-11 18:12:28 +08:00
Amos Bird
ef918aeaff
Rebase and fix 2021-05-11 18:12:28 +08:00
Amos Bird
9c069ebdbf
support prewhere, row_filter, read_in_order and decent projection selection
TODO set index analysis in projection
2021-05-11 18:12:27 +08:00
Amos Bird
f7f949c1f9
Fix aggregation keys order 2021-05-11 18:12:27 +08:00
Amos Bird
e1e560765c
Fix missing columns 2021-05-11 18:12:27 +08:00
Amos Bird
35961c0c5d
Use ActionsDAG to rewrite projection queries 2021-05-11 18:12:27 +08:00
Nikolai Kochetov
29d7038e30
Add ProjectionDescription::Type enum. Remove some checks. 2021-05-11 18:12:27 +08:00
Amos Bird
ebaf42a448
Reformat and fix some tests 2021-05-11 18:12:27 +08:00
Nikolai Kochetov
672cfedd13
Disable normal projection by the number of granules. 2021-05-11 18:12:26 +08:00
Nikolai Kochetov
95431168c2
Try to enable normal projections. 2021-05-11 18:12:26 +08:00
Amos Bird
483bd165e7
Check if pipeline is simple and add more comments 2021-05-11 18:12:26 +08:00
Nikolai Kochetov
427f444ba4
Fix prewhere. 2021-05-11 18:12:26 +08:00
Nikolai Kochetov
3d36fb57eb
Cleanup code. 2021-05-11 18:12:26 +08:00
Nikolai Kochetov
3296c9292f
Try to merge projectons faster. 2021-05-11 18:12:26 +08:00
Amos Bird
264cff6415
Projections
TODO (suggested by Nikolai)

1. Build query plan fro current query (inside storage::read) up to WithMergableState
2. Check, that plan is simple enough: Aggregating - Expression - Filter - ReadFromStorage (or simplier)
3. Check, that filter is the same as filter in projection, and also expression calculates the same aggregation keys as in projection
4. Return WithMergableState if projection applies

3 will be easier to do with ActionsDAG, cause it sees all functions, and dependencies are direct (but it is possible with ExpressionActions also)

Also need to figure out how prewhere works for projections, and
row_filter_policies.

wip
2021-05-11 18:12:23 +08:00
Kruglov Pavel
49e7ed6e60
Merge pull request #23673 from amosbird/partitionvalue
Add _partition_value virtual column
2021-05-11 11:23:00 +03:00
Alexander Tokmakov
eef899ae63 better code, add test 2021-05-10 21:03:37 +03:00
万康
308b964ca4 enable DateTime64 to be version column 2021-05-10 20:30:52 +08:00
kssenii
ab1a05a1f4 Poco::Path to fs::path, less concatination 2021-05-09 14:59:49 +03:00
Alexey Milovidov
e23a0d8f7e Fix warnings by PVS-Studio 2021-05-08 23:57:08 +03:00
Alexey Milovidov
513c6891db Fix warnings by PVS-Studio 2021-05-08 23:54:49 +03:00
Alexey Milovidov
ad88819ee4 Fix a bunch of warnings from PVS-Studio 2021-05-08 19:13:10 +03:00
Alexey Milovidov
e905883c75 More fixes for PVS-Studio 2021-05-08 19:12:31 +03:00
Alexey Milovidov
8d62c42eb9 A bunch of changes for PVS-Studio 2021-05-08 19:11:50 +03:00
Alexey Milovidov
604daa9581 Fix a bunch of warnings from PVS-Studio 2021-05-08 19:09:17 +03:00
Alexey Milovidov
2fbecf36ca More fixes for PVS-Studio 2021-05-08 18:20:40 +03:00
kssenii
266567e04c Merge branch 'master' of github.com:ClickHouse/ClickHouse into poco-file-to-std-fs 2021-05-08 17:49:05 +03:00
Alexey Milovidov
9e1a5f41fc A bunch of changes for PVS-Studio 2021-05-08 17:43:03 +03:00
Alexey Milovidov
47a4c101b9 Merge branch 'master' into normalize-bigint 2021-05-08 16:41:15 +03:00
tavplubix
f8c7725ef5
Merge pull request #23742 from ClickHouse/update_metadata_on_replica_recovery
Update metadata on replica recovery
2021-05-08 16:34:03 +03:00
kssenii
02288359c5 Less manual concatenation of paths 2021-05-08 13:59:55 +03:00
kssenii
35f999bf04 Poco::createFile to fs::createFile 2021-05-08 02:41:47 +03:00
Alexander Tokmakov
24bcd9f7c6 better comments, fix pvs warnings 2021-05-07 16:39:21 +03:00
kssenii
140bf7e2ea Less Poco 2021-05-07 15:29:26 +03:00
kssenii
9ec92ec514 Fix tests, less manual concatination of paths 2021-05-05 18:39:30 +03:00
Alexey Milovidov
02ce9cc725 Untangle UUID 2021-05-04 01:46:51 +03:00
Alexey Milovidov
f4100cf70c Remove harmful std::regex 2021-05-02 22:04:26 +03:00
Alexey Milovidov
1fda866881 Merge branch 'master' into normalize-bigint 2021-05-02 21:24:45 +03:00
feng lv
39f68bf5ff fix conflict 2021-05-02 16:33:45 +00:00
kssenii
ee06936596 Merge branch 'master' of github.com:ClickHouse/ClickHouse into poco-file-to-std-fs 2021-05-01 17:24:31 +03:00
Maksim Kita
14e879cef9
Merge pull request #23781 from ucasFL/fix-clear-column
Fix CLEAR COLUMN does not work after #21303
2021-04-30 17:28:59 +03:00
Nikolai Kochetov
4bb56849b3
Merge pull request #23763 from amosbird/rowfilterfix
Fix crash when prewhere and row policy filter are both in effect with empty result
2021-04-30 16:25:36 +03:00
feng lv
aed2f337e9 Fix CLEAR COLUMN does not work after #21303 2021-04-30 05:02:32 +00:00
Amos Bird
70ec13f3d3
Fix empty block with row_filter 2021-04-29 19:40:14 +08:00
kssenii
deb4903af8 Merge branch 'master' of github.com:ClickHouse/ClickHouse into poco-file-to-std-fs 2021-04-28 20:57:13 +03:00
Alexander Tokmakov
bbf3bbc76d update metadata on replica recovery 2021-04-28 20:49:27 +03:00
alexey-milovidov
f541e4017c
Merge pull request #23710 from ClickHouse/fix-bad-error-message
Fix illiterate error message #23700
2021-04-28 14:32:33 +03:00
alexey-milovidov
fdc5a44202
Merge pull request #23644 from nikitamikhaylov/delete-unit-tests
Move non gtest unit tests to /examples folder
2021-04-28 07:28:18 +03:00
Alexey Milovidov
2cf9da72ff Fix illiterate error message #23700 2021-04-28 06:49:46 +03:00
kssenii
eeb71672a0 Change in Storages/* 2021-04-27 16:49:37 +03:00
Nicolae Vartolomei
1fa5871ff7 Fix bad rebase and introduce part_moves_between_shards_enable setting 2021-04-27 14:20:13 +01:00
Nicolae Vartolomei
94f3db3c78 Use ZK check requests as barriers to prevent issuing tasks based on stale state information 2021-04-27 14:20:13 +01:00
alesapin
d12deed53d bump ci 2021-04-27 14:20:12 +01:00
alesapin
b930ca5d59 Followup fix 2021-04-27 14:20:12 +01:00
Nicolae Vartolomei
53d57ffb52 Part movement between shards
Integrate query deduplication from #17348
2021-04-27 14:20:12 +01:00
Amos Bird
8a3b5c1fab
Add _partition_value virtual column 2021-04-27 16:15:59 +08:00
Alexey Milovidov
a5a4e64ba7 Fix a few PVS-Studio warnings 2021-04-27 07:22:32 +03:00
alexey-milovidov
186b1128d0
Merge pull request #23310 from amosbird/fixbugindex
Don't relax NOT conditions during partition pruning.
2021-04-27 07:13:18 +03:00
Nikita Mikhaylov
9f55424250 move to examples everywhere 2021-04-27 01:51:42 +03:00
tavplubix
81726de8fe
Merge pull request #23366 from amosbird/pid
Fix invalid virtual column expr
2021-04-26 11:10:24 +03:00
Alexey Milovidov
9eb60086b0 Attempt to normalize big integers 2021-04-25 13:02:19 +03:00
Alexey Milovidov
649550c5ab Attempt to normalize big integers 2021-04-25 12:30:43 +03:00
Alexey Milovidov
8f01af62d9 Merge branch 'master' into normalize-bigint 2021-04-25 06:57:44 +03:00
alexey-milovidov
cae5260817
Update KeyCondition.cpp 2021-04-24 05:34:35 +03:00
alexey-milovidov
20e897bc5a
Merge pull request #23301 from ClickHouse/fix_race_in_deduplication
Deduplication: check block version on removal
2021-04-24 04:59:00 +03:00
alexey-milovidov
2cfc2c8825
Merge pull request #23397 from CurtizJ/better-move-to-prewhere
Allow to move more conditions to PREWHERE
2021-04-24 04:39:33 +03:00
mergify[bot]
a5da512e39
Merge branch 'master' into pid 2021-04-24 00:37:39 +00:00
alexey-milovidov
c66e715f49
Merge pull request #23433 from ClickHouse/tavplubix-patch-1
Fix `Cannot unlink file` in `dropIfEmpty()` with multidisk confuguration
2021-04-24 03:34:06 +03:00
alexey-milovidov
cd1f14ba61
Update MergeTreeData.cpp 2021-04-24 03:33:56 +03:00
feng lv
0f5c05854c fix conflict 2021-04-23 12:22:51 +00:00
feng lv
4ffe199d39 Implement table comments 2021-04-23 12:18:23 +00:00
hexiaoting
d24946f475 Fix bug when modify column without type 2021-04-22 14:48:57 +08:00
mergify[bot]
b9e229d19d
Merge branch 'master' into empty-parts-fix 2021-04-21 13:19:54 +00:00
Nikita Mikhaylov
d4e8f9676b
Merge pull request #21304 from amosbird/indexhint
Resurrect indexHint function.
2021-04-21 16:14:43 +03:00
tavplubix
1a776b47a7
Update MergeTreeData.cpp 2021-04-21 15:34:42 +03:00
Amos Bird
50f2e488bd
Fix invalid virtual column expr 2021-04-21 10:29:03 +08:00
Anton Popov
a83a07246e allow to move more conditions to PREWHERE 2021-04-21 01:03:58 +03:00
Anton Popov
8f57141fad
Merge pull request #23195 from CurtizJ/nested-update
Merging #22503
2021-04-20 14:57:47 +03:00
Amos Bird
32c84f77c3
Resurrect indexHint function. 2021-04-20 19:27:23 +08:00
Amos Bird
d5f606c544
Another fix 2021-04-20 14:15:28 +08:00
Anton Popov
0a0c510aa2 minor fixes 2021-04-20 05:51:07 +03:00
Anton Popov
42a0416a2b better drop of empty parts 2021-04-20 05:31:08 +03:00
alexey-milovidov
4cef8c68f7
Merge pull request #23258 from azat/wundef
Add -Wundef for gcc builds
2021-04-19 22:45:22 +03:00
Anton Popov
66913c5865 fix waiting while dropping empty parts 2021-04-19 19:24:50 +03:00
Amos Bird
aeff06d67d
Don't relax NOT conditions during partition pruning. 2021-04-19 22:15:53 +08:00
tavplubix
c9ebc95faf
Update ReplicatedMergeTreeCleanupThread.cpp 2021-04-19 13:27:32 +03:00
Alexander Tokmakov
539356b441 check block version on removal 2021-04-19 12:52:37 +03:00
Nikolai Kochetov
4d86f51eff Merge branch 'master' into add-read-from-mt-step 2021-04-19 10:17:21 +03:00
Azat Khuzhin
2561a67fd8 Replace !__clang__ with !defined(__clang) to fix gcc builds
$ gg 'if !__clang__' | cut -d: -f1 | sort -u | xargs sed -i 's/#if !__clang__/#if !defined(__clang__)/g'
2021-04-18 23:37:50 +03:00
alexey-milovidov
74a0ac6917
Merge pull request #23160 from azat/logging-v2
[RFC] Change logging from trace to debug for messages with rows/bytes
2021-04-16 21:18:32 +03:00
tavplubix
3d1885f08c
Merge pull request #23177 from marsno1/fix-exception-log
Fix exception message for "parts_to_throw_insert"
2021-04-16 18:15:07 +03:00
Nikolai Kochetov
8d8e57615c A little bit better index description. 2021-04-16 12:42:23 +03:00
Anton Ivashkin
09379b2b8a Fix Zero-Copy replication with several S3 volumes (issue 22679) 2021-04-16 12:34:48 +03:00
tavplubix
b5cbbce314
Merge pull request #22706 from songenjie/fetch_part
[clickhouse][server][ddl]support fetch part
2021-04-16 12:26:51 +03:00
madianjun
9238d8e54a Fix exception message for parts_to_throw_insert 2021-04-16 14:28:52 +08:00
Alexander Tokmakov
0ad6205fa6 logs for debuging test failures with Replicated and Keeper 2021-04-15 21:34:53 +03:00
Azat Khuzhin
d2cf03ea41 Change logging from trace to debug for messages with rows/bytes 2021-04-15 21:00:16 +03:00
Nikolai Kochetov
be52b2889a Better description for key condition. 2021-04-15 20:30:04 +03:00
Alexey Milovidov
97611faad0 Whitespace 2021-04-13 22:06:24 +03:00
alexey-milovidov
46e1da03fb
Update KeyCondition.cpp 2021-04-13 18:47:11 +03:00
Maksim Kita
305d3d6b16
Merge pull request #22978 from ClickHouse/filter-by-virtual-columns-fix
Fix trivial mistake in filtering by virtual columns
2021-04-13 11:42:16 +03:00
songenjie
564136ec46 [clickhouse][server][dll][alter]support fetch part 2021-04-13 12:40:33 +08:00
Alexey Milovidov
1b8a054880 Fix error 2021-04-13 00:11:30 +03:00
Denny Crane
eaa092cae2
Update MergeTreeData.cpp
Better error message.
2021-04-12 10:58:06 -03:00
Nikolai Kochetov
f6d86d6032 Merge branch 'master' into add-read-from-mt-step 2021-04-12 15:23:32 +03:00
Egor O'Sten
c8b572ed59 Readability of error message for ORDER BY 2021-04-11 20:42:05 -04:00
Egor O'Sten
c77dd36ca9 Readability of error message for ORDER BY 2021-04-11 20:40:00 -04:00
Alexey Milovidov
22720dd7a4 Fix trivial mistake in filtering by virtual columns 2021-04-11 22:39:22 +03:00