Commit Graph

401 Commits

Author SHA1 Message Date
Alexey Milovidov
4ff812db7f Maybe better support for paths with whitespaces 2021-04-24 22:47:52 +03:00
hexiaoting
5dd8018c12 Merge remote-tracking branch 'origin/master' into dev-map-bug 2021-04-19 10:26:20 +08:00
alexey-milovidov
83038f84af
Revert "Function arrayFold for folding over array with accumulator" 2021-04-18 03:34:05 +03:00
Alexander Kuzmenkov
74b4c56ba4
Merge pull request #21589 from dmalkr/dmalkr/arrayFold
Function `arrayFold` for folding over array with accumulator
2021-04-16 14:23:53 +03:00
Alexander Kuzmenkov
440efb6fb6
Update arrayFold.cpp 2021-04-16 14:22:23 +03:00
Dmitry Krylov
bf51f94f37 Fix constness 2021-04-15 21:46:15 +10:00
Dmitry Krylov
75036debf4 Check type match of lambda and accumulator 2021-04-15 19:25:30 +10:00
Alexey Milovidov
df44476307 Fix error 2021-04-13 22:32:02 +03:00
Alexey Milovidov
c01756014e More generic implementation of has 2021-04-13 20:08:49 +03:00
Alexey Milovidov
83a78a5aa7 Fix unfinished code in GatherUtils #20272 2021-04-13 16:56:39 +03:00
hexiaoting
9e921023b8 Fix error 2021-04-13 09:53:39 +08:00
Dmitry Krylov
df60724847 Fix constness 2021-04-12 20:29:58 +10:00
Dmitry Krylov
a3d57bd5af Check number of arguments 2021-04-12 20:29:35 +10:00
Dmitry Krylov
68bd27f3c5 Fix code style 2021-04-12 12:12:40 +10:00
Dmitry Krylov
35472bcc2f Update to new IFunction::create() 2021-04-12 11:37:44 +10:00
Dmitry Krylov
582f6d3a72 Remove unneeded branches of code 2021-04-12 10:23:31 +10:00
Dmitry Krylov
c2f326e2ae Remove unneeded branches of code 2021-04-12 10:23:31 +10:00
Dmitry Krylov
ce1b9b20d5 Remove unneeded branches of code 2021-04-12 10:23:31 +10:00
Dmitry Krylov
15ea9b3f22 Move arrayFold functionality to arrayFold.cpp 2021-04-12 10:23:31 +10:00
Dmitry Krylov
517ef8ebf4 Bug with string functions in arrayFold fixed 2021-04-12 10:23:31 +10:00
Dmitry Krylov
e3502dabc7 Remove debug messages 2021-04-12 10:23:31 +10:00
Dmitry Krylov
1861817bfc Remove debug messages 2021-04-12 10:23:31 +10:00
Dmitry Krylov
9446df026b Cleaning code 2021-04-12 10:23:31 +10:00
Dmitry Krylov
b19a06ba48 Fix to work with empty arrays 2021-04-12 10:23:31 +10:00
Dmitry Krylov
fbd43aeea8 Draft: taking into accout input arrays variable length 2021-04-12 10:23:31 +10:00
Dmitry Krylov
2e8a296cc9 Draft: very simple variant 2021-04-12 10:23:31 +10:00
Dmitry Krylov
7c47832405 Experiment: attempt to shrink arrays 2021-04-12 10:23:31 +10:00
Ivan
495c6e03aa
Replace all Context references with std::weak_ptr (#22297)
* Replace all Context references with std::weak_ptr

* Fix shared context captured by value

* Fix build

* Fix Context with named sessions

* Fix copy context

* Fix gcc build

* Merge with master and fix build

* Fix gcc-9 build
2021-04-11 02:33:54 +03:00
hexiaoting
7e0b43be28 Support decimal type overflow check 2021-04-07 10:34:00 +08:00
Azat Khuzhin
f157278b72 Safer SCOPE_EXIT
It executes the code in the dtor, that should never throw.
2021-04-06 21:10:37 +03:00
hexiaoting
38bd455be9 Rewrite arrayProduct implementation 2021-04-06 17:41:54 +08:00
Alexey Milovidov
7589a014f9 Better fix 2021-04-01 03:44:02 +03:00
Alexey Milovidov
c9fac714b4 Merge branch 'master' into map-op-ubsan 2021-04-01 03:27:33 +03:00
Alexey Milovidov
a59c66c266 Fix UBSan report in mapOp 2021-03-31 04:07:18 +03:00
Alexey Milovidov
c3b4587d9d Fix MSan report in function "range" 2021-03-31 03:54:40 +03:00
hexiaoting
8a7599c4b1 Introduce arrayProduct function 2021-03-29 10:35:08 +08:00
Alexey Milovidov
c325ed65e2 Fix UBSan report in mapPopulateSeries 2021-03-24 23:10:15 +03:00
Anton Popov
ecd9220c77 minor fixes 2021-03-16 02:28:11 +03:00
Anton Popov
68b3cbbfe9 fix conversions for fields in function 'arrayElement' for type Map 2021-03-13 17:49:43 +03:00
hexiaoting
0760759dc6 Add DataTypeMap support LowCardinality and FixedString type 2021-03-09 16:44:56 +08:00
Anton Popov
ad5a03e8a4 improve support of integer keys in type Map 2021-02-24 21:13:26 +03:00
Anton Popov
b6a519cd04 Merge remote-tracking branch 'upstream/master' into HEAD 2021-02-24 19:45:38 +03:00
Alexey Milovidov
64e76a4a8d Minor changes in Decimal 2021-02-20 21:13:36 +03:00
Anton Popov
f1fa110d48 fix type map with integer keys 2021-02-18 01:05:31 +03:00
Alexey Milovidov
1c55be261c Fix UBSan report in arrayDifference 2021-02-13 03:45:06 +03:00
Alexey Milovidov
f442b30f30 Fix test 2021-02-11 01:23:27 +03:00
alexey-milovidov
0b043c41b6
Merge pull request #20160 from ClickHouse/cumulative-sum-normalized
Fix UBSan report in arrayCumSum
2021-02-07 14:28:16 +03:00
Alexey Milovidov
1209c02869 Fix overflow in mapPopulateSeries 2021-02-06 23:18:42 +03:00
Alexey Milovidov
d9d49a4d30 Fix UBSan report in arrayCumSum 2021-02-06 22:22:21 +03:00
Alexey Milovidov
65902f4c6e Fix UBSan report in arrayCumSum 2021-02-06 22:21:22 +03:00
Alexey Milovidov
fd899daa00 Fix UBSan report in arrayCumSum 2021-02-06 22:17:19 +03:00
Alexey Milovidov
b3944006cb Fix trivial bug in arrayEnumerateUniq 2021-01-29 04:41:55 +03:00
Alexey Milovidov
093108bf81 Normalize BigInt implementation 2021-01-27 03:54:57 +03:00
Alexey Milovidov
fb71a0704e Fix UBSan report in arraySlice 2021-01-22 23:35:16 +03:00
Alexey Milovidov
2cd04e8923 Fix UBSan report in arraySum 2021-01-21 14:43:33 +03:00
Alexey Milovidov
1bb8cc5c9a Avoid UBSan report in arrayElement 2021-01-21 11:10:46 +03:00
Yatsishin Ilya
ce1e2b18a3 Fix codespell warnings. Split style checks. Update style checks docker 2020-12-24 13:17:52 +03:00
Nikita Mikhaylov
0f3582883c
Merge pull request #18147 from kitaisreal/array-aggregation-big-integer-types-support
Added array aggregation big integer types support
2020-12-17 15:44:55 +03:00
Maksim Kita
8f49946a72 Reused Result type 2020-12-17 00:21:44 +03:00
Maksim Kita
4b32bb323a Fixed style issues 2020-12-17 00:04:03 +03:00
Maksim Kita
5a096a75b8 Fixed issues with average 2020-12-16 23:10:40 +03:00
Maksim Kita
b82770c2ad Added array aggregation big integer types support 2020-12-16 18:47:30 +03:00
Anton Popov
b485b5bd1c minor fixes and comments added 2020-12-16 01:22:21 +03:00
Anton Popov
c78861e86e Merge remote-tracking branch 'upstream/master' into HEAD 2020-12-15 01:45:01 +03:00
alexey-milovidov
8a20d449d9
Update arrayAggregation.cpp 2020-12-14 14:01:31 +03:00
Maksim Kita
0be51cbabd Updated tests 2020-12-13 21:27:48 +03:00
Maksim Kita
5d6036e9c8 Fixed style issues 2020-12-13 14:38:56 +03:00
Maksim Kita
b810b28b08 Added comment 2020-12-13 00:40:34 +03:00
Maksim Kita
0dcbcec19a Added tests 2020-12-13 00:29:09 +03:00
Maksim Kita
18bde6ef02 Fixed compile issues 2020-12-12 23:47:23 +03:00
Maksim Kita
3d261c82e9 Array aggregation functions 2020-12-12 22:50:28 +03:00
Anton Popov
6b09669d66 data type map: several fixes 2020-12-05 22:36:09 +03:00
hexiaoting
5b3a7f5c98 Merge remote-tracking branch 'origin/master' into dev_map2 2020-11-26 16:43:27 +08:00
Ivan Lezhankin
f7041c1b55 Fix style and ya.make 2020-11-18 16:24:16 +03:00
Ivan Lezhankin
f897f7c93f Refactor IFunction to execute with const arguments 2020-11-17 16:24:45 +03:00
hexiaoting
ef0b78cf12 style error fix 2020-11-06 17:21:26 +08:00
hexiaoting
66bca89001 Style error fix 2020-11-02 17:23:02 +08:00
hexiaoting
2ba68d7494 Add map function 2020-11-02 14:05:53 +08:00
hexiaoting
483be134b2 Support MergeTree Engine 2020-10-23 16:36:17 +08:00
Nikolai Kochetov
42a90cf533 Fix special build. 2020-10-21 11:32:57 +03:00
Nikolai Kochetov
a1d5adf8d5 Merge branch 'master' into new-block-for-functions-4 2020-10-20 16:16:08 +03:00
Nikolai Kochetov
295e612343 Fix build and tests. 2020-10-20 16:11:57 +03:00
Nikolai Kochetov
9fe51524cc Part 9. 2020-10-20 00:21:10 +03:00
hexiaoting
521b07d37a Fix build error 2020-10-18 20:40:51 +08:00
hexiaoting
fcd35b0619 Merge branch 'master' into dev_map2 2020-10-18 16:18:13 +08:00
hexiaoting
db8ba39c9c Implement Integer And Array for value type 2020-10-17 23:45:35 +08:00
Mike
e89a3b5d09
Fixing arrayIndex functions when right operand is LC but left is not (#16038) 2020-10-16 12:08:44 +03:00
Nikolai Kochetov
e2f826c22d Rename block to columns. 2020-10-14 17:44:22 +03:00
Nikolai Kochetov
1f49d83622 Rename block to columns. 2020-10-14 17:32:43 +03:00
Nikolai Kochetov
e64eba88da Rename block to columns. 2020-10-14 17:19:39 +03:00
Nikolai Kochetov
959424f28a Rename block to columns. 2020-10-14 17:04:50 +03:00
Nikolai Kochetov
966b1d6cf5 Rename Block to ColumnsWithTypeAndName. 2020-10-14 16:09:11 +03:00
hexiaoting
cb9e88efa3 Update with fresh master to build sucessfully. 2020-10-14 15:35:22 +08:00
hexiaoting
4f3f221987 Fix build error 2020-10-14 14:35:14 +08:00
hexiaoting
974352a8e1 Fix style check errors. 2020-10-14 14:35:14 +08:00
hexiaoting
cdb4dd57a6 Add new DataType Map(key,value) 2020-10-14 14:35:14 +08:00
Nikolai Kochetov
9b42bfdc36
Merge pull request #15817 from ClickHouse/new-block-for-functions-2
Use `ColumnsWithTypeAndName` instead of `Block` for function calls [part 2]
2020-10-12 00:32:58 +03:00
Nikolai Kochetov
23aec1f954 Fix build. 2020-10-11 22:44:20 +03:00
Nikolai Kochetov
3a17c2a7ac Rename FunctionArguments to ColumnsWithTypeAndName 2020-10-11 22:20:20 +03:00
Alexey Milovidov
269b6383f5 Check for #pragma once in headers 2020-10-10 21:37:02 +03:00
Nikolai Kochetov
d28325a353 Replace getByPosition to [] 2020-10-10 21:24:57 +03:00
Nikolai Kochetov
a7fb2e38a5 Use ColumnWithTypeAndName as function argument instead of Block. 2020-10-09 10:41:28 +03:00
Nikolai Kochetov
e94b814606 Update arrayConcat 2020-09-16 16:07:32 +03:00
Nikolai Kochetov
e9de8c8875 Fix build. 2020-09-16 15:21:26 +03:00
Nikolai Kochetov
85698e04fa Update slice for arrays. 2020-09-16 13:57:23 +03:00
Ildus Kurbangaliev
67b49862d9
Add mapPopulateSeries function (#13166) 2020-09-14 19:11:50 +03:00
alexey-milovidov
f21cf98960
Merge pull request #14657 from myrrc/feature/disable-debug-symbols-cmake-option
Extracted the debug info generation for functions into a cmake option
2020-09-10 21:04:15 +03:00
myrrc
c309f55c20 updated setting and added default value 2020-09-10 14:02:52 +03:00
alexey-milovidov
0c2ecb53d1
Update arrayIndex.h 2020-09-09 09:35:05 +03:00
myrrc
78eac658b0 adding correct LC nested nullability checker 2020-09-08 22:51:44 +03:00
Alexey Milovidov
53e39b05b2 Lower binary size in debug build 2020-09-07 18:35:18 +03:00
myrrc
d298409660 Merge remote-tracking branch 'upstream/master' into bug/low-cardinality-arrays-optimisations 2020-08-20 12:07:02 +03:00
myrrc
4f96291c35 rewrote the LC spec as a dispatcher 2020-08-19 21:59:39 +03:00
myrrc
5ef5c889fd moved the LC stuff to its implementations (some bugs remaining) 2020-08-18 23:09:41 +03:00
Alexey Milovidov
acf312467e Stratify nans comparison in arrayCompact function 2020-08-18 22:16:53 +03:00
myrrc
3337d206ba some bugs remaining 2020-08-18 01:55:41 +03:00
myrrc
69a0ca2564 checking other const approach 2020-08-18 01:43:20 +03:00
alexey-milovidov
8535e30bd4
Merge pull request #13753 from ClickHouse/avoid-too-slow-queries-with-arrays
Avoid too slow queries with arrays
2020-08-16 10:16:08 +03:00
Azat Khuzhin
e9d373b5b7 Fix step overflow in range() 2020-08-16 00:26:47 +03:00
Alexey Milovidov
57b8d3f89b Avoid too slow queries with arrays 2020-08-15 12:13:52 +03:00
myrrc
54f5c0e35a fixed the String impl non-const offset bug 2020-08-14 23:07:31 +03:00
myrrc
a519559644 updated ColumnVector to compare with other U, cleaned ImplString 2020-08-14 21:08:30 +03:00
myrrc
a9c9bae47e fixed the columnvector test 2020-08-13 17:17:49 +03:00
myrrc
0edf3a693d fixing the processGeneric ColumnVector type bug 2020-08-13 16:44:13 +03:00
myrrc
1ed406dfd8 empty commit to restart CI 2020-08-12 19:11:35 +03:00
Alexander Kazakov
6e0d536327
Merge branch 'master' into bug/low-cardinality-arrays-optimisations 2020-08-11 16:25:20 +03:00
myrrc
eabcc293eb fixed generic LC impl 2020-08-11 14:15:43 +03:00
myrrc
659c78c7ab more canonical resize 2020-08-10 18:37:04 +03:00
myrrc
8562c36ea4 fix: false processing 2020-08-10 18:32:02 +03:00
myrrc
565cedbf1c updating functions 2020-08-10 17:22:35 +03:00
myrrc
403a47bd1e reverted the code back to constant args handling 2020-08-10 13:34:19 +03:00
Alexey Milovidov
edd89a8610 Fix half of typos 2020-08-08 03:47:03 +03:00
myrrc
ac77e2a88f empty commit to restart CI 2020-08-07 14:24:07 +03:00
myrrc
d1412e5352 Merge branch 'bug/low-cardinality-arrays-optimisations' of github:myrrc/clickhouse into bug/low-cardinality-arrays-optimisations 2020-08-06 20:57:29 +03:00
myrrc
1c940a1921 got rid of a virtual col in loop in arrayIndex 2020-08-06 20:55:21 +03:00
Alexander Kazakov
8c1dbb3893 For compatibility with Arcadia 2020-08-06 16:27:19 +03:00
myrrc
c8f737c37c fix: re-resizing, Arcadia compatibility, updated perftest 2020-08-06 15:33:16 +03:00
myrrc
2d27fa0fa8 fix: style error, unused check 2020-08-06 02:24:28 +03:00
myrrc
4dd39f6fb4 fixed comparison bug by cloning the col_arg_indices 2020-08-05 18:16:03 +03:00
myrrc
0021f67664 re-unioned the *NumImpl 2020-08-05 15:43:19 +03:00
myrrc
807f1887f4 some data flow fixes 2020-08-04 22:51:15 +03:00
myrrc
b210afb789 cloning the arr column to build the lc index 2020-08-04 18:00:42 +03:00
myrrc
98119af9de Merge remote-tracking branch 'upstream/master' into bug/low-cardinality-arrays-optimisations 2020-08-04 15:01:27 +03:00
Alexey Milovidov
41111d1e57 Merge branch 'master' into stack-frams-size-limit 2020-08-02 19:18:33 +03:00
Alexey Milovidov
a4e8c47702 Fix assert in arrayElement 2020-08-02 04:07:08 +03:00
Alexey Milovidov
c202691319 Merge branch 'master' into stack-frams-size-limit 2020-07-30 23:53:52 +03:00
Ildus Kurbangaliev
fdf4fd337a
add mapAdd and mapSubtract functions (#11735) 2020-07-29 11:50:30 +03:00
myrrc
cf696afd4c fix: function visibility 2020-07-28 18:26:53 +03:00
myrrc
aaa05f2466 updated types checker 2020-07-28 17:41:04 +03:00
myrrc
6f953e06ae fix: style-checker 2020-07-24 18:02:57 +03:00
myrrc
1e32210953 updated reference, fixed NULL values handling 2020-07-24 17:17:39 +03:00
myrrc
b44b3e9b2b added column cast, added new test 2020-07-24 15:07:26 +03:00
myrrc
4a55186a99 some investigation 2020-07-23 19:46:38 +03:00
myrrc
9b9360eb2c try to handle runtime type casting to compare the index column and the
target value correctly
2020-07-23 02:09:03 +03:00
myrrc
31fc55ccef fix: const attributes 2020-07-23 00:54:43 +03:00
myrrc
76a866af47 another attribute fix 2020-07-23 00:44:39 +03:00
myrrc
6af63213ce Merge remote-tracking branch 'upstream/master' into bug/low-cardinality-arrays-optimisations 2020-07-22 22:49:46 +03:00
myrrc
1d0bf93444 added perftest, fixed style check and PVS bugs 2020-07-22 22:44:11 +03:00
myrrc
222eb7fba3 fixed result column overwriting 2020-07-22 16:18:21 +03:00
Nikolai Kochetov
e4689ce302 Make IFunction::executeImpl const. 2020-07-21 16:58:07 +03:00
Alexey Milovidov
50bbfc848d Merge branch 'master' into stack-frams-size-limit 2020-07-21 14:45:15 +03:00
myrrc
ad8afc3bfa updated LC spec to catch LC(N(T)) and N(LC(T)) 2020-07-20 18:49:06 +03:00
myrrc
b60b689417 fixed Const(Array()) DB::Exception 2020-07-17 21:06:21 +03:00
myrrc
00fc61c244 updated getOrFindIndex for NullableTypes 2020-07-17 19:57:26 +03:00
myrrc
52dcb211ba Merge branch 'master' into bug/low-cardinality-arrays-optimisations 2020-07-17 17:06:02 +03:00
myrrc
80053d745d first truly working version 2020-07-17 15:44:26 +03:00
myrrc
0ce74ccc28 updated interface, bug investigation 2020-07-16 23:59:32 +03:00
myrrc
bc8e8c25e9 initial more or less working version 2020-07-16 18:14:52 +03:00
Alexey Milovidov
34e67b521a Fix ugly ugliness 2020-07-08 04:56:50 +03:00
Alexey Milovidov
abf1e015b3 Add documentation for arrayFill 2020-07-08 04:44:24 +03:00
Alexey Milovidov
7138ccca2b Whitespace 2020-07-08 01:44:29 +03:00
alexey-milovidov
32a5dcd483
Update arraySum.cpp 2020-07-05 06:48:49 +03:00
Alexey Milovidov
d2e8c0df79 Minor modification 2020-07-05 02:39:27 +03:00
Alexey Milovidov
96e8e93c64 Fix warnings from CodeQL 2020-07-05 02:16:16 +03:00
Nikolai Kochetov
820d2c63df Try fix labda tuple(LC) argument. 2020-06-30 13:51:17 +03:00
Nikolai Kochetov
be51741566 Try fix labda tuple(LC) argument. 2020-06-30 13:19:06 +03:00
Anton Popov
39fe7d6c3f
Merge pull request #11729 from CurtizJ/distinct-combinator
Merging #10930. (Distinct combinator)
2020-06-26 13:40:32 +03:00
Alexander Kuzmenkov
7ee2e68f5b better error messages 2020-06-25 23:42:31 +03:00
Anton Popov
14e09e5650 Merge remote-tracking branch 'upstream/master' into HEAD 2020-06-25 14:59:15 +03:00
Alexander Kazakov
0510911559
Merge pull request #11071 (#11874)
* Add's hasSubstr  array function

* Add's example in the english doc of hasSubStr

* Updates conditions to avoid prematurely calling isEqual

* Remove feathericons

Authored-by: Ryad ZENINE <ryad.zenine@contentsquare.com>
2020-06-23 17:42:19 +03:00
Alexey Milovidov
7117b419b9 Don't allow arrayJoin inside higher order functions #3933 2020-06-21 21:22:34 +03:00
Anton Popov
8ba5bd8530 Merge remote-tracking branch 'upstream/master' into distinct-combinator 2020-06-18 01:44:36 +03:00
Anton Popov
88b325dcdc rework distinct combinator 2020-06-17 22:36:27 +03:00
Alexey Milovidov
0a6054eece Merge branch 'master' into return-not-nullable-from-count-distinct-2 2020-06-16 22:31:33 +03:00
Alexey Milovidov
8dac30ae95 Split file for better build times 2020-06-14 21:42:10 +03:00
Alexey Milovidov
394fb64a9c Better way of implementation 2020-06-14 20:42:11 +03:00
Alexey Milovidov
ef6c5a2855 Continuation 2020-06-08 22:52:55 +03:00
Alexey Milovidov
af176b8191 Continuation 2020-06-08 22:39:49 +03:00
Alexander Kuzmenkov
bf941755f2 fixup 2020-05-26 09:00:51 +03:00
Alexander Kuzmenkov
7142e68d7a fixup 2020-05-26 08:54:04 +03:00
Alexander Kuzmenkov
50df893dc6 Assert that allocator & container are consistent wrt. inline memory
There are lots of places where HashTable is used with
AllocatorWithStackMemory, but the size of allocator inline memory is set
incorrectly, and it's less than the initial HashTable buffer size.
Because of this, HashTable is always allocated on the heap, and the
inline memory becomes a useless dead weight.

For PODArray, we have previously added a helper template that makes sure
these values are in sync, so there was only one such discrepancy left,
in the unit test.
2020-05-20 22:37:13 +03:00
Nikolai Kochetov
7309cbbfda Try fix build. 2020-05-16 10:23:59 +03:00
Nikolai Kochetov
4d0503f021 Make IColumn::mutate() static. 2020-05-14 11:30:18 +03:00
Alexey Milovidov
8c9408f927 Checkpoint 2020-04-22 11:31:10 +03:00
Alexey Milovidov
03e17405cd Checkpoint 2020-04-22 10:03:43 +03:00
Nikolai Kochetov
234c4dbe84 Fix build. 2020-04-15 17:51:03 +03:00
Alexey Milovidov
fbe41a8ee6 Fix clang-tidy 2020-04-15 17:37:43 +03:00
alexey-milovidov
19c4968ca6
Update arrayIndex.h 2020-04-15 07:02:41 +03:00
Alexey Milovidov
eed2ea3b36 Remove strange code 2020-04-15 06:02:51 +03:00
Alexey Milovidov
8ad04d4fec Remove useless code 2020-04-15 00:05:45 +03:00
Ivan Lezhankin
06446b4f08 dbms/ → src/ 2020-04-03 18:14:31 +03:00