Commit Graph

826 Commits

Author SHA1 Message Date
Dmitry Novik
1587385f7a Cleanup code 2022-07-07 18:53:20 +00:00
Robert Schulze
f15d9ca59c
Merge pull request #38774 from zvonand/zvonand-nnd
Reintroduce nonNegativeDerivative()
2022-07-07 20:39:13 +02:00
Vladimir Galunshchikov
cacc833da6 Rename NUMBER_OF_DIMENSIONS_MISMATHED const to NUMBER_OF_DIMENSIONS_MISMATCHED 2022-07-07 11:15:59 +03:00
Andrey Zvonov
7de39d9b15 Merge branch 'master' of github.com:ClickHouse/ClickHouse into zvonand-nnd 2022-07-06 10:59:35 +03:00
vdimir
65ac97ce89
direct join: handle nullable, add tests 2022-07-04 17:28:14 +00:00
zvonand
eac84351f6 fix behavior 2022-07-04 01:26:07 +03:00
Alexey Milovidov
7adc87a37d
Merge pull request #38413 from nickitat/cache_values_inside_hash_table_grower
Precalculate values inside `HashTableGrower`
2022-07-02 23:30:24 +03:00
Maksim Kita
3a1d8f4518
Merge pull request #38565 from ClickHouse/merging-column-vector-replicate-optimize
Merging #37235
2022-06-30 18:29:51 +02:00
Maksim Kita
d31ca4c4b6 Fixed tests 2022-06-30 14:49:11 +02:00
Anton Popov
7c721578c7
Merge pull request #38320 from CurtizJ/dynamic-columns-16
Improve performace of insertion to columns of type JSON
2022-06-30 14:18:20 +02:00
Maksim Kita
65110fdffc ColumnVector refactor replicate SSE42 optimization 2022-06-29 17:50:25 +02:00
Maksim Kita
ea0996674f
Merge pull request #37235 from zzachimed/column_replicate_optimize_v2
Improve performance for column replicate for uint32 type. In our benc…
2022-06-29 13:45:22 +02:00
Nikita Taranov
986ead7358 use old HashTableGrower with *WithStackMemory data structures 2022-06-27 20:34:18 +02:00
Anton Popov
0b2ec42906 fix build 2022-06-23 11:26:06 +00:00
Anton Popov
52db1b35a1 improve performace of insertion to columns of type JSON 2022-06-22 17:45:51 +00:00
avogar
23f48a9fb9 Fix bug with nested short-circuit functions 2022-06-17 11:44:49 +00:00
Anton Popov
1523c9c9e5 fix filling of empty Nested + small refactoring 2022-06-17 01:10:52 +00:00
Danila Kutenin
607dd8d6ca Restart the pipeline, I guess 2022-06-15 18:16:56 +00:00
Daniel Kutenin
a769dea8ef
Merge branch 'ClickHouse:master' into master 2022-06-15 19:12:10 +01:00
Danila Kutenin
08e3f77a9c Optimize most important parts with NEON SIMD
First part, updated most UTF8, hashing, memory and codecs. Except
utf8lower and upper, maybe a little later.

That includes huge amount of research with movemask dealing. Exact
details and blog post TBD.
2022-06-15 13:19:29 +00:00
Maksim Kita
864fd627e1
Merge pull request #35762 from kitaisreal/merge-tree-multiple-order-by-columns-improve-insert-performance
MergeTree multiple ORDER BY columns improve insert performance
2022-06-15 11:01:36 +02:00
Alexey Milovidov
ab9fc572d5
Merge pull request #37667 from ClickHouse/group-by-enum-fix
Support types with non-standard defaults in ROLLUP, CUBE, GROUPING SETS
2022-06-15 05:14:33 +03:00
mergify[bot]
3f97745612
Merge branch 'master' into merge-tree-multiple-order-by-columns-improve-insert-performance 2022-06-14 10:49:48 +00:00
Anton Popov
bcd60b8293 fix build 2022-06-06 18:14:59 +00:00
Anton Popov
db6bc122ff Merge remote-tracking branch 'upstream/master' into HEAD 2022-06-06 18:13:16 +00:00
Anton Popov
d6bf9f8c6b fix insertRangeFrom for ColumnObject 2022-06-02 22:56:41 +00:00
zhao zhou
bef9971890 change comment 2022-05-31 21:13:02 +08:00
Dmitry Novik
0e63583b8f Support types with non-standard defaults in ROLLUP, CUBE, GROUPING SETS 2022-05-31 00:11:10 +00:00
Alexey Milovidov
9e3242f186
Merge pull request #37617 from CurtizJ/aggregation-sparse-columns
Better performance with sparse columns in aggregate functions
2022-05-29 09:36:07 +03:00
Anton Popov
b2cff26ecf better performace with sparse columns in aggregate functions 2022-05-28 02:22:20 +00:00
zhao zhou
781701b223 change comment 2022-05-26 22:23:22 +08:00
zhao zhou
2ff2c55479 change some comment 2022-05-26 21:11:56 +08:00
Maksim Kita
96833b8696 ColumnImpl compareImpl added assert for compare result 2022-05-24 20:41:48 +02:00
Maksim Kita
bdc537ead3 Column compareImpl devirtualize compare call 2022-05-24 14:28:33 +02:00
zhao zhou
5162e87dd2 remove parentheses 2022-05-24 10:22:29 +08:00
zhao zhou
a3d6cb2e58 fix style issue 2022-05-23 01:36:59 +08:00
zhao zhou
a6347dcea6 fix deference null optional value issue. Dereference NUll optioanl value in debug mode will trigger about signal. 2022-05-23 01:11:01 +08:00
zhao zhou
eff6adbaa4 fix offset type issue 2022-05-22 15:50:47 +08:00
zhao zhou
a1a0d5b075 fix compile error 2022-05-22 14:22:54 +08:00
Alexey Milovidov
d36ec5e34d
There are so many disgusting names. 2022-05-21 23:39:34 +03:00
Alexey Milovidov
fa032a76b6
Make variable names less disgusting. 2022-05-21 23:38:51 +03:00
Alexey Milovidov
50c02af959
Make the code slightly more humane. 2022-05-21 23:35:04 +03:00
zhao zhou
ae739ca9ba change comment 2022-05-21 20:12:43 +08:00
zhao zhou
a876435f47 change comment 2022-05-21 13:51:34 +08:00
zhao zhou
dc58f82788 change comment 2022-05-21 03:19:02 +08:00
zhao zhou
b5ddbf10d8 change comment 2022-05-20 22:41:47 +08:00
zhao zhou
59ecd3fa82 change comment 2022-05-20 18:20:36 +08:00
zhao zhou
114125dde2 change comment 2022-05-20 07:32:26 +08:00
zhao zhou
ce9305939b change comment 2022-05-20 06:42:22 +08:00
zhao zhou
69d50bf232 change some comment 2022-05-20 06:33:47 +08:00
zhao zhou
ad1f0c025e change some comment 2022-05-20 05:52:21 +08:00
zhao zhou
58518047fe iterator not always pointer type. so use the auto* substitue auto that clang tidy suggest is not alwyas ok. 2022-05-19 19:13:12 +08:00
zhao zhou
44f2e3a06d change comment 2022-05-19 02:49:26 +08:00
Anton Popov
03c51118d5 better implementation of ColumnObject 2022-05-18 14:15:55 +00:00
zhao zhou
c1bcf932ec Merge branch 'column_replicate_optimize_v2' of https://github.com/zzachimed/ClickHouse into column_replicate_optimize_v2 2022-05-18 21:12:57 +08:00
zhao zhou
dbea0c122e change macro from sse4.2 to sse2 2022-05-18 21:10:01 +08:00
Anton Popov
7477cf28a9 fix some cases of insertion nested arrays to columns of type Object 2022-05-17 22:59:16 +00:00
zhao zhou
4b2a24b5ec change comment format 2022-05-16 23:31:54 +08:00
zhao zhou
fa2afb292c Improve performance for column replicate for uint32 type. In our benchmark unit test there has about 2x performance boost
Co-authored-by: vesslanjin <jun.i.jin@intel.com>
2022-05-16 22:48:37 +08:00
mergify[bot]
e7cfc6fd49
Merge branch 'master' into column_replicate_optimize_v2 2022-05-16 08:09:48 +00:00
Maksim Kita
437d70d4da Fixed tests 2022-05-11 21:59:51 +02:00
Maksim Kita
c17a8b1a23 Fixed tests 2022-05-11 21:59:51 +02:00
Maksim Kita
8721e434e6 Fixed tests 2022-05-11 21:59:51 +02:00
Maksim Kita
8ceb63ee6c Added JIT compilation of SortDescription 2022-05-11 21:59:51 +02:00
Anton Popov
509e30698c fix checks 2022-05-11 13:37:02 +00:00
Anton Popov
1f91655cf9 support Object inside Map 2022-05-10 15:52:29 +00:00
Anton Popov
9d2a4d970d better text serialization of type Object 2022-05-09 18:05:55 +00:00
Anton Popov
e1911a29b8 better text serialization of type Object 2022-05-09 16:12:04 +00:00
Anton Popov
b3e262f605 better cloneResized in ColumnObject 2022-05-06 18:53:24 +00:00
Anton Popov
90c60741a1 more safe operations with ColumnObject 2022-05-06 17:15:05 +00:00
Anton Popov
515f68eead Merge remote-tracking branch 'upstream/master' into dynamic-columns-14 2022-05-06 16:10:51 +00:00
Anton Popov
566c08086a support Object type inside other types 2022-05-06 14:44:00 +00:00
Anton Popov
13e8db6299
Merge pull request #36762 from CurtizJ/dynamic-columns-12
Fix insertion to columns of type `Object` from multiple files
2022-05-06 14:14:32 +02:00
mergify[bot]
17aecac7ff
Merge branch 'master' into new-clangtidies 2022-05-03 19:44:01 +00:00
Robert Schulze
0a4eccb73e
Activated a bunch of LLVM 12/13/14 clang-tidy warnings
Omitted new checks which produce too many matches or which are
controversial (e.g. readability-identifier-length).

New checks:

- misc-misleading-bidirectional + misc-misleading-identifier

  Detects potential attack as described in the Trojan Source attack

- modernize-macro-to-enum

  Replaces groups of adjacent macros with an unscoped anonymous enum

- modernize-shrink-to-fit

  Replace copy and swap tricks on shrinkable containers with the
  shrink_to_fit() method call

- modernize-use-transparent-functors

  Prefer transparent functors to non-transparent ones

- modernize-use-uncaught-exceptions

  This check will warn on calls to std::uncaught_exception and replace
  them with calls to std::uncaught_exceptions (uncaught_exception was
  deprecated with C++17)

- performance-no-int-to-ptr

  Diagnoses every integer to pointer cast

- readability-duplicate-include

  Looks for duplicate includes and removes them

- readability-redundant-preprocessor

  Finds potentially redundant preprocessor directives

- bugprone-lambda-function-name

  Checks for attempts to get the name of a function from within a lambda
  expression

- bugprone-redundant-branch-condition

  Finds condition variables in nested if statements that were also
  checked in the outer if statement and were not changed

- bugprone-shared-ptr-array-mismatch

  Finds initializations of C++ shared pointers to non-array type that
  are initialized with an array

- bugprone-stringview-nullptr

  Checks for various ways that the const CharT* constructor of
  std::basic_string_view can be passed a null argument and replaces them
  with the default constructor in most cases

- bugprone-suspicious-memory-comparison

  Finds potentially incorrect calls to memcmp() based on properties of
  the arguments
2022-05-03 09:22:11 +02:00
Dmitry Novik
9be17ef50c
Merge pull request #35111 from azat/optimize_aggregation_in_order-prefix
Implement partial GROUP BY key for optimize_aggregation_in_order
2022-05-02 17:49:48 +02:00
Alexey Milovidov
b79c6cef84
Merge pull request #36756 from CurtizJ/type-json-bool
Deduce `UInt8` type for bools from json instead of `UInt64`
2022-05-01 13:51:28 +03:00
Anton Popov
243315b826 fix insert to Object columns 2022-04-29 17:26:05 +00:00
Azat Khuzhin
767acd53fb Add ability to pass range of rows to Aggregator
v2: fix compiled aggregate functions (seek result to row_start)
v3: fix compiled aggregate functions (seek args to row_start)
v4: change signatures for JIT
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-29 06:57:55 +03:00
Anton Popov
1fc51e09ff fix insertion to column of type Object from multiple files via table function 2022-04-28 18:51:13 +00:00
mergify[bot]
20e2fa9b3f
Merge branch 'master' into dynamic-columns-9 2022-04-28 17:53:03 +00:00
Anton Popov
54f074e104 deduce UInt8 type for bools from json instead of UInt64 2022-04-28 15:30:43 +00:00
Anton Popov
a87f19b493 fix more cases with nested arrays 2022-04-21 14:57:12 +00:00
Maksim Kita
57444fc7d3
Merge pull request #36444 from rschu1ze/clang-tidy-fixes
Clang tidy fixes
2022-04-21 16:11:27 +02:00
Robert Schulze
b24ca8de52
Fix various clang-tidy warnings
When I tried to add cool new clang-tidy 14 warnings, I noticed that the
current clang-tidy settings already produce a ton of warnings. This
commit addresses many of these. Almost all of them were non-critical,
i.e. C vs. C++ style casts.
2022-04-20 10:29:05 +02:00
Antonio Andelic
bbb0be6a44
Merge pull request #36402 from rschu1ze/clang-tidy-contains
Activate clang-tidy warning "readability-container-contains"
2022-04-20 08:15:46 +02:00
Robert Schulze
118e94523c
Activate clang-tidy warning "readability-container-contains"
This check suggests replacing <Container>.count() by
<Container>.contains() which is more speaking and in case of
multimaps/multisets also faster.
2022-04-18 23:53:11 +02:00
Alexey Milovidov
c23e451b04 Add nodiscard attribute to immutable methods of IColumn to avoid errors 2022-04-18 04:22:40 +02:00
Anton Popov
3fce23357c fix insertion of complex json with nested arrays 2022-04-08 14:58:02 +00:00
Maksim Kita
61212635d8 MergeTree multiple ORDER BY columns improve insert performance 2022-03-30 16:03:36 +02:00
Azat Khuzhin
a847b71611 Fix SubcolumnsTree declaration
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-26 23:42:46 +03:00
Kruglov Pavel
9ae52910f0
Fix style 2022-03-23 23:15:07 +01:00
Kruglov Pavel
c4713a9159
Update MaskOperations.cpp 2022-03-23 11:39:38 +01:00
Kruglov Pavel
9bf1cb6636
Fix 2022-03-22 20:15:05 +01:00
Kruglov Pavel
763a80e405
Add more validations in mask operations 2022-03-22 18:46:59 +01:00
Maksim Kita
d24795405c Fixed tests 2022-03-22 15:12:43 +01:00
Maksim Kita
fcbf97ba68 Fix crash during short circuit function evaluation 2022-03-22 14:10:47 +01:00
Maksim Kita
695b1300f9
Merge pull request #35383 from rschu1ze/enable-if-to-concepts-pt2
Replace more uses of std::enable_if for SFINAE by concepts
2022-03-21 10:47:28 +01:00
Anton Popov
d26ba35c2d fix race in Object type and improve performance of inserts 2022-03-19 00:26:39 +00:00
Anton Popov
b0316c1a7a better performance of inserts to Object type 2022-03-17 22:25:44 +00:00
Robert Schulze
df73c75456
Replace more uses of std::enable_if for SFINAE by concepts
- enable_if is usually regarded as fragile and unreadable
- C++20 concepts are much easier to read and produce more expressive error messages

- this is follow-up to PR #35347 but this time most of the remaining and
  more complex usages of enable_if in the codebase were replaced.
2022-03-17 20:44:55 +01:00
Anton Popov
de2cc23e15 fix race 2022-03-16 20:16:59 +00:00
Anton Popov
0ba78c3c3a Merge remote-tracking branch 'upstream/master' into HEAD 2022-03-16 15:28:09 +00:00
Maksim Kita
07b0845110 Fix clang-tidy warnings in Backups, Client, Columns folders 2022-03-14 18:17:35 +00:00
Anton Popov
063917786e minor fixes 2022-03-14 17:29:18 +00:00
Anton Popov
36ec379aeb Merge remote-tracking branch 'upstream/master' into HEAD 2022-03-14 16:28:35 +00:00
Antonio Andelic
ed3d71d83f
Merge pull request #35072 from azat/buffer-memory-tracker-leak
Avoid MEMORY_LIMIT_EXCEEDED during INSERT into Buffer with AggregateFunction
2022-03-14 12:31:04 +01:00
Azat Khuzhin
19be9c8c64 Add a comment for ColumnAggregateFunction::force_data_ownership
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-13 23:28:38 +03:00
Maksim Kita
b67f756a43 Fixed performance tests 2022-03-12 18:04:08 +00:00
Maksim Kita
f1d2f2a9e1 Updated tests 2022-03-11 21:16:25 +00:00
Maksim Kita
e5b85953e8 Added unit tests 2022-03-10 21:45:31 +00:00
Maksim Kita
6b916c7bb5 Fixed tests 2022-03-10 21:45:31 +00:00
Maksim Kita
5b2be4d3b8 Fixed tests 2022-03-10 21:45:31 +00:00
Maksim Kita
cbe059f4bd Updated IColumn interface to support getting stable permutation 2022-03-10 21:45:31 +00:00
Anton Popov
37efe2ddb5
Apply suggestions from code review
Co-authored-by: Kseniia Sumarokova <54203879+kssenii@users.noreply.github.com>
2022-03-10 22:24:19 +01:00
Azat Khuzhin
4118b065e6 Export IColumn::ensureOwnership() interface
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-09 10:57:49 +03:00
Anton Popov
0bc57da238 Merge remote-tracking branch 'upstream/master' into HEAD 2022-03-07 14:46:08 +00:00
Anton Popov
df3b07fe7c Merge remote-tracking branch 'upstream/master' into HEAD 2022-03-03 22:25:28 +00:00
Anton Popov
76e40e4f22 fix msan 2022-03-03 21:50:36 +00:00
hexiaoting
e953e482ec
Implement more functions for Map data type 2022-03-03 13:22:44 +00:00
Maksim Kita
b1a956c5f1 clang-tidy check performance-move-const-arg fix 2022-03-02 18:15:27 +00:00
Anton Popov
04a3a10148 minor fixes 2022-03-01 20:20:53 +03:00
Anton Popov
fcdebea925 Merge remote-tracking branch 'upstream/master' into HEAD 2022-02-25 13:41:30 +03:00
Anton Popov
0a7895ebb9 add comments and small refactoring 2022-02-17 22:00:25 +03:00
Anton Popov
edd686e1d9 fix unit test 2022-02-16 17:18:03 +03:00
Anton Popov
a661eaf39f better performance of getting storage snapshot 2022-02-16 02:17:22 +03:00
Anton Popov
7cddae1351 return back result_size_hint 2022-02-15 15:12:25 +03:00
Anton Popov
c18ab88706
Update src/Columns/FilterDescription.h
Co-authored-by: Vladimir C <vdimir@clickhouse.com>
2022-02-15 14:39:09 +03:00
Anton Popov
5c316ffabe support filtering by sparse columns without convertion to full 2022-02-15 14:30:54 +03:00
Anton Popov
8e26cfbbea add test with github events for type JSON 2022-02-14 22:20:52 +03:00
Rajkumar
b6a1a13327 clang-tidy reported nested_column already moved to data 2022-02-09 11:36:31 -08:00
Anton Popov
836a348a9c Merge remote-tracking branch 'upstream/master' into HEAD 2022-02-01 15:23:07 +03:00
Anton Popov
aab6ef60b2 better performance of parsing json data 2022-02-01 14:17:29 +03:00
Maksim Kita
241c395329 Fixed style check 2022-01-31 09:12:08 +00:00
Maksim Kita
5ef83deaa6 Update sort to pdqsort 2022-01-30 19:49:48 +00:00
Anton Popov
78b9f15abb Merge remote-tracking branch 'upstream/master' into HEAD 2022-01-30 03:24:37 +03:00
Maksim Kita
1eacd7a00c pdqsort performance check 2022-01-29 21:47:32 +00:00
Azat Khuzhin
9766619b55 Headers cleanup in ColumnMap
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-01-29 12:32:25 +03:00
Azat Khuzhin
f88ab143c4 Headers cleanup in ColumnArray
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-01-29 12:32:15 +03:00
Azat Khuzhin
3bc10871eb Minor cleanup in ColumnTuple
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-01-29 12:30:31 +03:00
Azat Khuzhin
b511abb72c Use reserve() over resize() for Map
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-01-29 12:29:13 +03:00
Azat Khuzhin
9e740eb9d0 Use reserve() over resize() for Tuple
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-01-29 12:29:13 +03:00
Azat Khuzhin
097bd6b7e8 Simplify ColumnArray::operator[] using ColumnArray::get()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-01-29 12:28:32 +03:00
Maksim Kita
e2de0dff8f
Merge pull request #34074 from azat/array-optimization
Slightly optimize ColumnArray::get()/operator[] (by using reserve over resize)
2022-01-28 16:09:44 +01:00
Azat Khuzhin
4e07122079 Slightly optimize ColumnArray::get()/operator[] (by using reserve over resize)
Note, that simple "SELECT range(100)" will execute
ColumnArray::operator[] 14 times (most of them from
DB::checkColumnStructure())

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-01-28 08:08:14 +03:00
Maksim Kita
af5ad2f370 Remove DecimalPaddedPODArray 2022-01-27 10:07:53 +00:00
Anton Popov
90b74c2aeb better unflattenTuple 2022-01-27 03:24:34 +03:00
Anton Popov
e8ce091e68 Merge remote-tracking branch 'upstream/master' into HEAD 2022-01-21 20:11:18 +03:00
Anton Popov
751d9e6a44 support nested in json type (wip) 2022-01-21 17:58:21 +03:00
Maksim Kita
6b9a5ab15e TypeId name fix 2022-01-20 13:51:00 +00:00