vdimir
adb63a5583
Merge branch 'master' into grace_hash_join
2022-10-17 12:32:56 +00:00
Alexey Milovidov
f88ed8195b
Fix trash
2022-10-17 04:21:08 +02:00
Kruglov Pavel
ff11904850
Merge branch 'master' into improve-combinators
2022-10-14 17:19:31 +02:00
vdimir
ad255206f4
Exclude comments from style-check defined extern
2022-10-14 11:42:18 +00:00
vdimir
0178307c27
Followup for TemporaryDataOnDisk
2022-10-12 15:25:23 +02:00
Alexander Tokmakov
4175f8cde6
abort instead of __builtin_unreachable in debug builds
2022-10-07 21:49:08 +02:00
vdimir
5a7c493559
Merge branch 'master' into pr/BigRedEye/38191
2022-10-06 14:43:35 +00:00
vdimir
ff55c369bc
Merge branch 'tmp-data-followup'
2022-10-05 18:10:05 +00:00
vdimir
ccd29e172f
Followup for TemporaryDataOnDisk
2022-10-05 16:42:27 +00:00
vdimir
a0349cf8c5
wip grace hash
2022-10-05 12:40:32 +00:00
vdimir
e5678afc2d
wip grace hash
2022-10-04 08:21:02 +00:00
vdimir
f3781be762
wip grace hash
2022-10-04 08:20:13 +00:00
Robert Schulze
db5ef7b3cb
Merge branch 'master' into generated-file-cleanup
2022-10-02 23:13:18 +02:00
vdimir
7ebc297f4c
Merge branch 'master' into pr/BigRedEye/38191
2022-09-30 09:40:47 +00:00
Vladimir C
895afdec45
Merge pull request #40893 from ClickHouse/vdimir/track-tmp-disk
2022-09-30 11:27:24 +02:00
Robert Schulze
cc92a2d174
Merge branch 'master' into generated-file-cleanup
2022-09-30 09:56:31 +02:00
Nikolai Kochetov
8e23bee03c
Merge pull request #41650 from ClickHouse/keep-destruction-order-of-view-thread-statuses
...
Fix a destruction order for views ThreadStatus
2022-09-29 14:28:14 +02:00
vdimir
f495361e28
fixes for TemporaryDataOnDisk
2022-09-29 10:09:29 +00:00
vdimir
14cd2b632c
fix Context::shutdown
2022-09-29 09:51:49 +00:00
vdimir
0f1a7c252d
better TemporaryDataOnDisk
2022-09-29 09:51:46 +00:00
vdimir
9f3f34548c
Allow to create temporaty streams on leaf TemporaryDataOnDisk
2022-09-29 09:51:45 +00:00
vdimir
858769584f
Fix MergeSortingTransform
2022-09-29 09:51:43 +00:00
vdimir
15c7a3be34
Temp data on disk: build
2022-09-29 09:51:41 +00:00
vdimir
c0898ce289
Use abstraction for temporary data on disk in Sort and Aggregation
2022-09-29 09:51:41 +00:00
vdimir
ac39bbb3f1
[wip] Common interface for temporary data on disk
2022-09-29 09:51:40 +00:00
Robert Schulze
fd86829824
Consolidate config_core.h into config.h
...
Less duplication, less confusion ...
2022-09-28 13:31:57 +00:00
Kruglov Pavel
3dc54272ed
Merge branch 'master' into improve-combinators
2022-09-26 13:03:32 +02:00
Nikolai Kochetov
00965ce17a
Fixing race.
2022-09-22 17:57:04 +00:00
Alexey Milovidov
45afacdae4
Merge pull request #41186 from ClickHouse/fix-three-fourth-of-trash
...
Fix more than half of the trash
2022-09-22 07:28:26 +03:00
Nikolai Kochetov
446453bdf5
Fix a destruction order for views ThreadStatus
2022-09-21 18:37:40 +00:00
Nikolai Kochetov
2b46735c42
Fix a bug with missing rows after partial sort optimisation #41182
2022-09-20 14:08:39 +00:00
Kruglov Pavel
47f6f09ce0
Merge branch 'master' into improve-combinators
2022-09-19 14:31:12 +02:00
Alexey Milovidov
91baedf03a
Fix 6/7 of trash
2022-09-19 08:53:20 +02:00
Alexey Milovidov
84f42e0874
Fix 3/4 of trash
2022-09-19 08:50:53 +02:00
Alexey Milovidov
ada7a44ae4
Remove -WithTerminatingZero methods
2022-09-17 05:34:18 +02:00
Nikita Taranov
6f186d3dd2
Do not return empty blocks from ConvertingAggregatedToChunksTransform
( #41152 )
...
* impl
* add test
* update test
2022-09-16 21:54:36 +02:00
avogar
0101cc2e56
Support complex combinators in window transform, arrayReduce*, initializeAggregation and Aggregate functons versionning
2022-09-16 19:07:36 +00:00
Alexey Milovidov
fd235919aa
Remove some methods
2022-09-10 05:04:40 +02:00
vdimir
6d4b6c452a
Merge branch 'master' into grace_hash_join
2022-09-07 08:00:14 +00:00
Alexey Milovidov
193cd1b3b2
Merge pull request #39138 from nickitat/control_block_size_in_aggregator
...
Control block size in aggregator
2022-09-04 04:51:00 +03:00
Vladimir C
963c0111bf
Merge pull request #39418 from vdimir/join_and_sets
...
Filter joined streams for `full_sorting_join` by each other before sorting
2022-09-02 13:57:06 +02:00
Antonio Andelic
e64436fef3
Fix typos with new codespell
2022-09-02 08:54:48 +00:00
Vladimir C
12e6fc4182
Merge branch 'master' into join_and_sets
2022-09-01 14:56:14 +02:00
Kseniia Sumarokova
c6c67a248d
Merge pull request #40792 from canhld94/ch_canh_intersect_distinct
...
Implement intersect + except distinct
2022-09-01 14:35:26 +02:00
Anton Popov
3504781529
Merge branch 'master' into fix-read-in-order-fixed-prefix
2022-08-30 23:32:43 +02:00
vdimir
0f6f3c73b0
Minor fix
2022-08-30 11:57:28 +00:00
Duc Canh Le
8590cc46c4
implement intersect + except distinct
2022-08-30 18:09:01 +08:00
vdimir
24f62e8486
Throw an error in CreatingSetsOnTheFlyTransform in case of input for finished
2022-08-29 11:27:08 +00:00
vdimir
b0e2616aa9
Style fixes in CreateSetAndFilterOnTheFlyTransform and related
2022-08-29 11:26:21 +00:00
Anton Popov
2a3e012931
Merge branch 'master' into fix-read-in-order-fixed-prefix
2022-08-29 13:17:26 +02:00
vdimir
714c53ab24
fix typos
2022-08-29 09:49:09 +00:00
vdimir
8e1632f824
Create sets for joins: better code
2022-08-29 09:49:08 +00:00
vdimir
7228091ff1
rename CreateSetAndFilterOnTheFlyTransform
2022-08-29 09:49:07 +00:00
vdimir
c778bba13f
Create sets for joins: wip
2022-08-29 09:47:00 +00:00
vdimir
31a167848d
Fix set finish condition in CreatingSetsOnTheFlyTransform
2022-08-29 09:46:59 +00:00
vdimir
8f06430ebd
Create sets for joins: upd
2022-08-29 09:46:58 +00:00
vdimir
3292566603
Format bytes in CreatingSetsOnTheFlyTransform logs
2022-08-29 09:46:57 +00:00
vdimir
031aaf3a45
Add Creating/FilterBySetsOnTheFlyStep for full sorting join
2022-08-29 09:46:57 +00:00
Azat Khuzhin
f9812d9917
Fix memory leak while pushing to MVs w/o query context (from Kafka/...)
...
While pushign to MVs, there is a low-level code that create
ThreadGroupStatus/ThreadStatus, it is required to gather some metrics
for system.query_views_log.
But, one should not use ThreadGroupStatus of the MainThreadStatus, since
this structure can hold some state, that may not be cleaned, plus this
may be racy, instead it is better to create new ThreadGroupStatus and
attach it instead.
Also this place misses detachQuery(), and because of this it leaks
ThreadGroupStatus::finished_threads_counters_memory. But it is only the
problem pushing to MVs is done w/o query context (i.e. from Kafka/...),
since when it has query context detachQuery() will be called eventually.
Before this patch series, when I've tried the reproducer with
500 MVs attached to Kafka engine (that @den-crane suggested), jemalloc
report looks like this:
$ ../jeprof --text ~/ch/tmp/upstream/clickhouse-binary --base jeprof.44384.0.i0.heap jeprof.44384.167.i167.heap
Using local file /home/azat/ch/tmp/upstream/clickhouse-binary.
Using local file jeprof.44384.167.i167.heap.
Total: 915.6 MB
910.7 99.5% 99.5% 910.7 99.5% Snapshot (inline)
9.5 1.0% 100.5% 9.5 1.0% std::__1::__libcpp_operator_new (inline)
0.5 0.1% 100.6% 0.5 0.1% DB::TasksStatsCounters::create
And with focus to this place:
$ ../jeprof --focus Snapshot --text ~/ch/tmp/upstream/clickhouse-binary --base jeprof.44384.0.i0.heap jeprof.44384.167.i167.heap
Using local file /home/azat/ch/tmp/upstream/clickhouse-binary.
Using local file jeprof.44384.167.i167.heap.
Total: 915.6 MB
910.7 100.0% 100.0% 910.7 100.0% Snapshot (inline)
0.0 0.0% 100.0% 910.7 100.0% DB::QueryPipeline::reset
0.0 0.0% 100.0% 910.7 100.0% DB::StorageKafka::streamToViews
0.0 0.0% 100.0% 910.7 100.0% DB::StorageKafka::threadFunc
0.0 0.0% 100.0% 910.7 100.0% ProfileEvents::Counters::getPartiallyAtomicSnapshot
0.0 0.0% 100.0% 910.7 100.0% ~ThreadStatus
0.0 0.0% 100.0% 910.7 100.0% ~ViewRuntimeData
0.0 0.0% 100.0% 910.7 100.0% ~ViewRuntimeStats (inline)
Actually this report does not looks great (you understand it because I
stripped it), because --text does not that smart, but if you will use
--pdf for the report you will see the stacktrace (will attach pdf to the
pull request).
But after this patch series the process RSS does not goes beyond
~700MiB.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-08-29 11:36:33 +02:00
Vladimir C
e067629e0d
Merge pull request #40239 from vdimir/vdimir/tmp-file-metrics
...
More metrics for on-disk temporary data
2022-08-26 11:28:01 +02:00
vdimir
91788f29e8
Upd TemporaryFileOnDisk
2022-08-24 16:15:54 +00:00
vdimir
7194df1184
Move back TemporaryFile -> TemporaryFileOnDisk
2022-08-24 16:14:11 +00:00
vdimir
0349c85017
Use getCompressedBytes in BufferingToFileTransform and TemporaryFileStream
2022-08-24 16:14:10 +00:00
vdimir
51c44424cc
More metrics for temp files
2022-08-24 16:14:09 +00:00
vdimir
1321ac87b5
Minor fixes
2022-08-24 16:14:07 +00:00
vdimir
7e0c9062c7
Add ProfileEvents::ExternalSort(Un)CompressedBytes
2022-08-24 16:14:07 +00:00
Alexander Gololobov
1c2dd50ca5
Fix vertical merge of parts with lightweight deleted rows
2022-08-24 15:18:33 +02:00
Alexey Milovidov
ab91c99495
Merge branch 'master' into control_block_size_in_aggregator
2022-08-20 21:28:27 +03:00
Nikita Taranov
f650b23ee3
generate many blocks
2022-08-16 18:56:22 +02:00
Nikita Taranov
db0110fd7a
more accurate crutch
2022-08-16 18:56:22 +02:00
Nikita Taranov
e5e0a24ab3
return chunks from prepareBlockAndFillWithoutKey
2022-08-16 18:56:22 +02:00
Vladimir Chebotaryov
3cc03b141e
Fixed tests on Debug build type.
2022-08-16 15:43:37 +02:00
Vladimir Chebotaryov
66f9bfca61
Fixed point of origin for exponential decay window functions to the last value in window.
2022-08-16 15:43:37 +02:00
Anton Popov
4bd50bb06c
Merge branch 'master' into distinct_sorted_simplify
2022-08-12 17:11:18 +02:00
Kruglov Pavel
4c7222d938
Merge pull request #40020 from canhld94/ch_canh_fix_hash
...
fix HashMethodOneNumber with const column
2022-08-12 14:40:24 +02:00
Maksim Kita
6bec0f5854
Merge pull request #38956 from vdimir/dict-join-refactoring
...
Join with dictionary refactoring
2022-08-11 11:54:11 +02:00
Duc Canh Le
84cd867aa8
materialize column instead of handling column in hash method
2022-08-11 10:46:06 +08:00
vdimir
ad91c16ba0
Rename join_common -> JoinUtils
2022-08-10 14:20:28 +00:00
vdimir
708747ca0b
Merge branch 'master' into refactor-prepared-sets
2022-08-08 14:27:18 +02:00
Igor Nikonov
8278da6475
Fix: read row counts before move columns out of chunk
2022-08-05 21:29:57 +00:00
Igor Nikonov
9fddf6efde
Merge remote-tracking branch 'origin/master' into ordinary_distinct_small_refact
2022-08-05 19:23:44 +00:00
Nikolai Kochetov
cf34232675
Output header is now empty for every MV chain.
...
Instead of checking that number of processors different for different
threads, simply always return empty header from buildChainImpl(), by
adding explicit conversion.
v2: ignore UNKNOWN_TABLE errors in test
2022-08-05 13:16:32 +03:00
Vladimir C
a627b00c43
Merge branch 'master' into refactor-prepared-sets
2022-08-04 13:27:38 +02:00
Nikita Taranov
4943202921
Improve memory usage during memory efficient merging of aggregation results ( #39429 )
2022-08-03 17:56:59 +02:00
Igor Nikonov
30782a2b05
Test: distinct sorted is not used on const column
2022-08-02 17:44:43 +00:00
Igor Nikonov
83e1dd1172
Merge branch 'master' into ordinary_distinct_small_refact
2022-07-31 00:23:21 +02:00
Igor Nikonov
7245ddcc20
Simple refactoring: ordinary DISTINCT implementation
2022-07-30 20:25:56 +00:00
Igor Nikonov
a7cfad105e
Merge branch 'master' into distinct_sorted_simplify
2022-07-30 21:57:53 +02:00
Igor Nikonov
3be51a6dea
Construct DistinctSortedTransform only when it makes sense
...
otherwise fallback to DistinctTransform (i.e. ordinary distinct)
2022-07-30 19:41:03 +00:00
Maksim Kita
acb0137dbb
Merge pull request #39718 from kitaisreal/join-enums-refactoring
...
Join enums refactoring
2022-07-30 13:53:08 +02:00
Igor Nikonov
d951154ef4
Proved NULLs direction when compare rows
2022-07-29 22:12:03 +00:00
Igor Nikonov
13dc1697fb
Remove unnecessary initialization
2022-07-29 20:34:23 +00:00
Igor Nikonov
b44373ba8f
Merge remote-tracking branch 'origin/master' into distinct_sorted_simplify
2022-07-29 20:33:26 +00:00
Igor Nikonov
7b0b38e997
DistinctSortedTransform works only if columns contains sort prefix of
...
sort description
2022-07-29 20:01:07 +00:00
Maksim Kita
8fc6bad4f4
Join enums refactoring
2022-07-29 18:35:05 +02:00
Igor Nikonov
4af435bdda
Fix: handle all const columns case correctly
2022-07-28 21:22:06 +00:00
Vladimir C
115506356c
Merge branch 'master' into refactor-prepared-sets
2022-07-27 19:57:23 +02:00
Igor Nikonov
377c04fbf1
Merge remote-tracking branch 'origin/master' into fix_distinct_sorted
2022-07-27 13:01:18 +00:00
Anton Popov
1547c010b9
Merge pull request #39432 from ClickHouse/distinct_sorted_chunk_perf_impr
...
DISTINCT in order: perf improvement
2022-07-27 14:17:58 +02:00
Nikolai Kochetov
873432fb53
Merge pull request #37849 from ClickHouse/bug-with-fill-date
...
Enforce equality of WITH FILL type with ORDER BY column's type for date/time types.
2022-07-27 12:27:53 +02:00