Commit Graph

188 Commits

Author SHA1 Message Date
Anton Popov
14168b11f2 Merge remote-tracking branch 'upstream/master' into HEAD 2021-07-07 17:05:11 +03:00
Maksim Kita
55220d49f9 Fixed code review issues 2021-07-03 16:29:32 +03:00
Maksim Kita
97e1ddbe94 Fix before merge 2021-07-01 22:56:36 +03:00
Maksim Kita
4bd398c0e5 Fixed tests 2021-07-01 22:56:36 +03:00
Maksim Kita
f33a38381d Fixed tests 2021-07-01 22:56:36 +03:00
Maksim Kita
325b54f623 Aggregator compile only part of aggregate functions 2021-07-01 22:56:36 +03:00
Maksim Kita
fdf172a61e Fixed tests 2021-07-01 22:56:36 +03:00
Maksim Kita
30021f0335 Fixed tests 2021-07-01 22:56:36 +03:00
Maksim Kita
da8c957167 Aggregator added CompiledExpressionCache 2021-07-01 22:56:36 +03:00
Maksim Kita
7b3952adda Fixed tests 2021-07-01 22:56:36 +03:00
Maksim Kita
0fb8ea530f Avoid using exception unsafe method 2021-07-01 22:56:36 +03:00
Maksim Kita
d24d3ae992 Added second variant of compilation 2021-07-01 22:56:36 +03:00
Maksim Kita
1e2f22a183 Aggregator compile part of aggregate functions 2021-07-01 22:56:36 +03:00
Maksim Kita
d4742f91e6 Check min_count_to_compile_aggregate_expression setting before compilation 2021-07-01 22:56:36 +03:00
Maksim Kita
507d9405e2 Compile AggregateFunctionAvgWeighted 2021-07-01 22:56:36 +03:00
Maksim Kita
a5ef0067b8 Compile AggregateFunctionIf 2021-07-01 22:56:35 +03:00
Maksim Kita
9b71b1040a Aggregate functions update compile interface 2021-07-01 22:56:35 +03:00
Maksim Kita
3fe559b31f Compile aggregate functions 2021-07-01 22:56:35 +03:00
Anton Popov
567043113c Merge remote-tracking branch 'upstream/master' into HEAD 2021-06-21 01:36:06 +03:00
alexey-milovidov
7616216f10
Merge pull request #25015 from ClickHouse/fix-wrong-code-in-aggregate-functions
Remove a chunk of wrong code and look what will happen
2021-06-11 00:36:35 +03:00
Alexey Milovidov
39abf41b4d Fix clang-tidy 2021-06-10 02:16:01 +03:00
Amos Bird
840895509e
Fix using aggregate projection when group by without key 2021-06-07 22:44:42 +08:00
Anton Popov
3e92c7f61a Merge remote-tracking branch 'upstream/master' into HEAD 2021-05-25 21:45:19 +03:00
Anton Popov
86d6673d61 minor fixes 2021-05-16 21:59:43 +03:00
Anton Popov
d8df0903b9 Merge remote-tracking branch 'upstream/master' into HEAD 2021-05-14 23:38:16 +03:00
Amos Bird
a113acc40c
Fix empty key 2021-05-14 22:54:14 +08:00
Amos Bird
ebaf42a448
Reformat and fix some tests 2021-05-11 18:12:27 +08:00
Nikolai Kochetov
3296c9292f
Try to merge projectons faster. 2021-05-11 18:12:26 +08:00
Alexey Milovidov
b2ca5cd98b Merge branch 'master' into normalize-bigint 2021-05-11 02:05:40 +03:00
alexey-milovidov
ab33b80edc
Merge pull request #23962 from azat/external-group-by-overflow-row-fix
Fix SIGSEGV for external GROUP BY and overflow row
2021-05-10 20:02:05 +03:00
Alexey Milovidov
9753ddc8a0 Merge branch 'master' of github.com:yandex/ClickHouse into normalize-bigint 2021-05-09 18:54:29 +03:00
Azat Khuzhin
6b11319cdf Round floats in Aggregator log messages 2021-05-08 18:01:24 +03:00
Azat Khuzhin
4cecc238d6 Fix SIGSEGV for external GROUP BY and overflow row
Overflow row is used for GROUP BY if all of the above is true:
- WITH TOTALS is requested
- max_rows_to_group_by > 0
- group_by_overflow_mode = any
- totals_mode != after_having_exclusive

And in case of overflow row and external GROUP BY, once the temporary
file dumps to disk it resets without_key data variant to nullptr, so any
subsequent dump to disk will cause SIGSEGV.

Fix this, by recreating without_key data variant after dumping to disk,
instead of reseting to nullptr.

And also add sanity check (LOGICAL_ERROR) to make error more
deterministic in case of such error.

Found with fuzzer [1].

  [1]: https://clickhouse-test-reports.s3.yandex.net/23929/e7027e052998540ee660d186727e20f9555b729d/fuzzer_ubsan/report.html#fail1
2021-05-08 17:48:24 +03:00
Alexey Milovidov
1fda866881 Merge branch 'master' into normalize-bigint 2021-05-02 21:24:45 +03:00
Nikolai Kochetov
c508868570
Merge pull request #23082 from ClickHouse/explain-output
JSON output for EXPLAIN
2021-04-28 15:39:06 +03:00
Nikolai Kochetov
5570b56cc3 A little bit faster merge of aggregating states. 2021-04-27 12:01:58 +03:00
Maksim Kita
5bb263f535 Fixed tests 2021-04-26 13:44:59 +03:00
Maksim Kita
cac4a85286 Aggregator remove unused code 2021-04-26 01:17:24 +03:00
Alexey Milovidov
8f01af62d9 Merge branch 'master' into normalize-bigint 2021-04-25 06:57:44 +03:00
Nikolai Kochetov
6b264933b2 Fix style. 2021-04-20 17:51:48 +03:00
Anton Popov
aea93d9ae5 Merge remote-tracking branch 'upstream/master' into HEAD 2021-04-20 15:16:12 +03:00
Nikolai Kochetov
8c2d58333a Merge branch 'master' into explain-output 2021-04-19 17:40:27 +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
9b86c19836 Use JSONBuilder for explain json result. 2021-04-14 17:07:56 +03:00
Anton Popov
4b8e90338d ColumnSparse: fixes 2021-04-08 05:08:37 +03:00
Anton Popov
d7ca6ecc50 ColumnSparse: sorting and dummy aggregation 2021-04-06 03:02:48 +03:00
Anton Popov
d46958a8d2 Merge remote-tracking branch 'upstream/master' into HEAD 2021-04-06 00:54:49 +03:00
Anton Popov
a78f531597 ColumnSparse: fixes 2021-04-03 03:04:48 +03:00
Anton Popov
a000d6154c fix clang-tidy 2021-04-02 15:10:49 +03:00
Anton Popov
56320bcbfd minor refactoring 2021-04-02 01:16:54 +03:00
Anton Popov
88cd775f6a Merge remote-tracking branch 'upstream/master' into HEAD 2021-04-02 00:14:03 +03:00
Anton Popov
372a1b1fe7 Merge remote-tracking branch 'upstream/master' into HEAD 2021-03-29 19:57:49 +03:00
Anton Popov
577d571300 ColumnSparse: initial implementation 2021-03-29 19:54:24 +03:00
Anton Popov
5de2b8512f fix destruction of aggregate states 2021-03-23 01:12:14 +03:00
Nikolai Kochetov
bc63d4244b
Merge pull request #21856 from ClickHouse/aggregator-no-more-keys-batch
Batch aggregation for overflow rows.
2021-03-19 11:52:55 +03:00
Anton Popov
6f7c8894e9 fix bugs in aggregation by primary key 2021-03-18 23:57:42 +03:00
Nikolai Kochetov
07c5a7766c Fxi test. 2021-03-18 16:23:09 +03:00
Nikolai Kochetov
66d5968cbc Batch aggregation for overflow rows. 2021-03-18 12:31:14 +03:00
Amos Bird
0640bb4cba
Fix arena data race in two level merge 2021-03-17 14:33:57 +08:00
Nikolai Kochetov
4c8c45b163 Refactor 2021-03-10 14:00:24 +03:00
Nikolai Kochetov
ce365e2c19 Fix tests. 2021-02-26 11:52:50 +03:00
Alexey Milovidov
252bcccdda Just little better 2021-02-19 21:32:39 +03:00
Alexey Milovidov
093108bf81 Normalize BigInt implementation 2021-01-27 03:54:57 +03:00
kreuzerkrieg
29a2ef3089 Add IStoragePolicy interface 2021-01-26 10:55:28 +02:00
BohuTANG
368121cc04 Remove unused include header 2021-01-26 14:10:33 +08:00
feng lv
beb0fec8bb mirror changes in code and comment 2021-01-22 09:13:22 +00:00
Anton Popov
c8cdaba180 Merge remote-tracking branch 'upstream/master' into remove-unused-code-1 2020-12-23 20:38:29 +03:00
Anton Popov
204a20fe29 remove unused code 2020-12-23 20:34:00 +03:00
Anton Popov
eecd51bb75 fix for uninitialized thread pool 2020-12-22 21:29:47 +03:00
Anton Popov
57a1642035 fix race in aggregation with combinator distinct 2020-12-22 14:30:29 +03:00
Nikolai Kochetov
07a7c46b89 Refactor ExpressionActions [Part 3] 2020-11-03 14:28:28 +03:00
Alexander Kuzmenkov
dde4cf70e1 Merge remote-tracking branch 'origin/master' into HEAD 2020-09-22 14:03:59 +03:00
Amos Bird
8ca4d6634e
better fixed string group by support 2020-09-20 15:20:09 +08:00
Alexander Kuzmenkov
fb64cf210a straighten the protocol version 2020-09-17 17:37:29 +03:00
Artem Zuikov
7c20aa2c62
Another 256-bit integers (strict 32 bytes) (#14229) 2020-09-04 16:33:02 +03:00
Artem Zuikov
d304d522cc
Refactoring: rename types to allow change bigint library (#14219) 2020-09-01 12:54:50 +03:00
Alexey Milovidov
8c85ab3753 Fix error with batch aggregation and -Array combinator 2020-08-14 09:52:28 +03:00
Alexey Milovidov
eaccddc51b Fix error + one more optimization 2020-08-03 04:34:43 +03:00
Alexey Milovidov
1088bfffb1 Special case for aggregation by 8bit field 2020-08-02 01:11:00 +03:00
alesapin
d3ea1d914b Tiny fixes and avoid dynamic casts 2020-07-30 13:04:49 +03:00
Vladimir Chebotarev
83556a5aa5 Minor thing. 2020-07-27 19:07:04 +03:00
Vladimir Chebotarev
6d22069f55 Review fixes. 2020-07-27 18:59:09 +03:00
Gleb Novikov
aac97957ce Fixed integration test_tmp_policy 2020-07-26 21:27:36 +03:00
Gleb Novikov
7f5b6fba78 Generic volume is coming...
1. SingleDiskVolume for temporary volumes
2. Generic VolumePtr in StoragePolicies
3. Removed max_data_part_size in system.storage_policies, added volume_type
2020-07-26 21:27:36 +03:00
Nikolai Kochetov
fd7fcb28d4 Merge branch 'master' into initial-explain 2020-07-07 22:52:09 +03:00
Nikolai Kochetov
6ed2908e2a Rename ident to indent. 2020-07-07 22:51:32 +03:00
Anton Popov
e2e92afd98 fix segfault with -StateResample combinators 2020-07-06 02:17:46 +03:00
Anton Popov
a5cbeda1e3 fix segfault with -StateResample combinators 2020-07-02 19:13:42 +03:00
Nikolai Kochetov
5b1596cdb2 Refactor some code. 2020-06-27 17:02:24 +03:00
Nikolai Kochetov
893a75bcf7 Merge branch 'master' into initial-explain 2020-06-27 12:45:40 +03:00
Nikolai Kochetov
ca01094f4b More actions description. 2020-06-27 12:31:11 +03:00
Nikolai Kochetov
d88e19b69d Added actions setting for Explain query. 2020-06-27 12:31:06 +03:00
Anton Popov
14e09e5650 Merge remote-tracking branch 'upstream/master' into HEAD 2020-06-25 14:59:15 +03:00
Nikolai Kochetov
b7bed87a7f Use QueryPlan in InterpreterSelectQuery [part 3]. 2020-06-18 21:29:33 +03:00
Anton Popov
88b325dcdc rework distinct combinator 2020-06-17 22:36:27 +03:00
Alexey Milovidov
138f3253ba Fix gcc build 2020-06-08 15:33:00 +03:00
Alexey Milovidov
58e513f59e Corrected implementation for the case without key 2020-06-08 07:23:56 +03:00
Alexey Milovidov
834f8426e0 Fix memory leak 2020-06-08 01:46:58 +03:00
Alexey Milovidov
f2cfb7d132 Whitespaces 2020-06-08 00:05:36 +03:00
Anton Popov
5c42408add
Merge pull request #9113 from dimarub2000/group_by_in_order_optimization
[WIP] Optimization of GROUP BY with respect to table sorting key.
2020-06-06 14:25:59 +03:00