Commit Graph

1942 Commits

Author SHA1 Message Date
Vitaly Baranov
095fc7b454 Optimization by using implementation-specific JSONParser::sizeOfArray(), JSONParser::sizeOfObject(). 2019-05-17 17:24:13 +03:00
Danila Kutenin
64913c4778 better names 2019-05-17 16:00:29 +03:00
Danila Kutenin
0d3422fa8a toValidUTF8 function added 2019-05-17 15:55:21 +03:00
Vitaly Baranov
823d862ceb Add a setting to disable simdjson. 2019-05-16 22:39:49 +03:00
Vitaly Baranov
b90a3a4222 Add UInt64 support to JSON functions. 2019-05-16 21:22:59 +03:00
Vitaly Baranov
8ab4e4dcfe Use rapidjson when AVX2 instructions are not available. 2019-05-16 20:40:24 +03:00
chertus
fdcbf509bb support quantile(s)ExactWeighted for Decimal 2019-05-16 17:33:13 +03:00
Vitaly Baranov
263fc16bd5 Fix handling wrong JSONs. 2019-05-16 15:16:21 +03:00
Vitaly Baranov
f4942007e1 Add function JSONExtractKeysAndValues(). 2019-05-16 14:09:22 +03:00
Vitaly Baranov
99ab74acc6 Use CpuFlagsCache instead of __builtin_cpu_supports. 2019-05-16 14:09:22 +03:00
Vitaly Baranov
edf1c42c7b Add comments to the class template FunctionJSON. 2019-05-16 14:09:22 +03:00
Vitaly Baranov
c93bd31695 Simplify template implementation. 2019-05-16 14:09:22 +03:00
Vitaly Baranov
76bda0342b Move ExtraArg to the end of arguments of JSONExtract(). 2019-05-16 14:09:22 +03:00
Vitaly Baranov
d003682626 Implement function JSONExtractRaw(). 2019-05-16 14:09:22 +03:00
Vitaly Baranov
900f5cac81 Return Enum8 instead of string from JSONType(). 2019-05-16 14:09:22 +03:00
Vitaly Baranov
8be2e728c0 Use capital letters in the names of json functions: jsonHas => JSONHas 2019-05-16 14:09:22 +03:00
Vitaly Baranov
0d26ac8583 Reimplement indices in objects in more straightforward way 2019-05-16 14:09:22 +03:00
chertus
2739a3f6d0 Merge branch 'master' into nulls 2019-05-16 14:02:12 +03:00
chertus
5f19c0981d add toDecimalOrZero and toDecimalOrNull fuctions 2019-05-15 21:50:35 +03:00
proller
51ca4cbaa4
Build fixes (#5278) 2019-05-15 20:19:39 +03:00
Nikita Lapkov
ab69128e1d introduce Backtrace class 2019-05-14 22:15:23 +00:00
Vitaly Baranov
9620e2e223
Merge pull request #5003 from Enmk/geohash_support
Implementation of geohashEncode and geohashDecode functions;
2019-05-14 20:01:22 +03:00
proller
cc3de4115f
Build fixes (#5261) 2019-05-14 12:58:33 +03:00
Alexander Kozhikhov
003a0fbadf conflict fix 2019-05-13 17:43:47 +03:00
Alexander Kozhikhov
9b4f322fd8 Merge branch 'master' of https://github.com/yandex/ClickHouse 2019-05-13 16:50:56 +03:00
Nikita Lapkov
6dbe205b55 Merge remote-tracking branch 'upstream/master' into query-poor-mans-profiler 2019-05-12 16:16:30 +00:00
svladykin
22389d4eca Support for bitmapHasAny and bitmapHasAll functions. 2019-05-12 17:47:31 +03:00
Vasily Nemkov
e4988110ec Implementation of geohashEncode and geohashDecode functions;
Function signatures:
 * geohashEncode(float lon, float lat, int precision) => string

 * geohashDecode(string encoded) => (float llon, float lat)

With test cases and documentation;
2019-05-10 14:59:24 +03:00
吴健
bd43e8bada Fix if, multiIf's nullable bug. 2019-05-10 18:42:44 +08:00
alexey-milovidov
9f5e1a5b80
Merge pull request #5228 from andyyzh/fix_bitmap_issue_5220
Fix bitmap functions crash the server bug segfault
2019-05-09 23:06:57 +03:00
alexey-milovidov
a1cb9a2d67
Merge pull request #5152 from janplus/bug-null-in
Fix null problem in FunctionIn
2019-05-09 19:22:41 +03:00
Andy Yang
4b66622601 Fix bitmap functions crash the server bug segfault 2019-05-09 17:24:36 +08:00
Vitaly Baranov
7ace113ac0 Use custom cmake file for simdjson and fix build 2019-05-08 16:20:25 +03:00
Vitaly Baranov
14d58737dd Fix error: use of old-style cast 2019-05-08 16:20:25 +03:00
hcz
682ce99133 Return strings in jsonType 2019-05-08 16:20:25 +03:00
hcz
706f335042 Format code and update tests 2019-05-08 16:20:25 +03:00
hcz
8cae381428 Performance improvement 2019-05-08 16:20:25 +03:00
hcz
b721ae11f5 Fix const column detection 2019-05-08 16:20:25 +03:00
hcz
e1a236f55c Update API 2019-05-08 16:20:25 +03:00
hcz
789b484108 Fix cmakelists 2019-05-08 16:20:25 +03:00
hcz
560246c0c3 Add Simdjson API 2019-05-08 16:20:25 +03:00
Andy Yang
92b0c9a668 Add document and test sql 2019-05-07 19:27:20 +08:00
吴健
c687a85304 Merge branch 'bug-null-in' of github.com:janplus/ClickHouse into bug-null-in 2019-05-07 13:59:46 +08:00
吴健
84ee8cec93 Add function ignoreExceptNull to meet nullable functionIn's requirement for optimization of analyse. 2019-05-07 13:20:23 +08:00
Andy Yang
3d583dafea toCustomWeek, toCustomYear, toStartOfCustomYear functions 2019-05-06 20:14:45 +08:00
Guillaume Tassery
3f8121d34f format code style 2019-05-06 17:23:06 +07:00
Guillaume Tassery
24dce70207 Merge branch 'master' of github.com:PerformanceVision/ClickHouse into ignore_scheme 2019-05-06 17:20:25 +07:00
Danila Kutenin
c280907f09 Zero initialization instead of memset 2019-05-06 11:34:28 +03:00
Danila Kutenin
512c7fa3a4 Comments 2019-05-06 00:40:37 +03:00
Danila Kutenin
8b235f7a4a Comments 2019-05-06 00:37:58 +03:00
Danila Kutenin
6a6b30a56f Less code with unique ptrs and some docs added 2019-05-06 00:35:08 +03:00
Danila Kutenin
f613c06c47 ngram vector_vector distance added 2019-05-05 23:48:46 +03:00
Andy Yang
eb4d85e964 toCustomWeek, toCustomYear, toStartOfCustomYear functions 2019-05-05 15:54:51 +08:00
Danila Kutenin
ca4f098362 fix hyperscan to treat regular expressions as utf-8 expressions 2019-05-05 09:51:59 +03:00
Alexey Milovidov
c462b0fabb Miscellaneous 2019-05-05 02:12:55 +03:00
alexey-milovidov
9e3c80d2ed
Merge pull request #5170 from yandex/cidr-to-range-better-code
Cidr to range better code
2019-05-02 19:29:36 +03:00
Alexey Milovidov
4dc0170d2c CIDR functions: better code #5095 2019-05-02 16:04:24 +03:00
alexey-milovidov
478b721b36
Merge pull request #5167 from yandex/remove-useless-code-in-columns-description
Removed bad and useless code in ColumnsDescription
2019-05-02 02:16:36 +03:00
Alexey Milovidov
0381a6a1ec Better code for CIDR to range functions #5095 2019-05-02 01:09:24 +03:00
Alexey Milovidov
3fa2784e7c Removed unneeded file #5095 2019-05-02 01:00:56 +03:00
alexey-milovidov
2dccdb18eb
Merge pull request #5095 from PerformanceVision/CIDR_MASK
Functions for calculate lower and high range of an IP address using a CIDR mask
2019-05-02 01:00:29 +03:00
Alexey Milovidov
1be21e3cb6 Removed bad and useless code in ColumnsDescription 2019-05-02 00:43:05 +03:00
alexey-milovidov
35471f4234
Update in.cpp 2019-04-30 20:26:56 +03:00
alexey-milovidov
b88c981902
Update basename.cpp 2019-04-30 19:15:08 +03:00
alexey-milovidov
39b696f9df
Update basename.cpp 2019-04-30 19:14:53 +03:00
Guillaume Tassery
ee742f38d9 Formatting 2019-04-30 13:53:09 +07:00
Guillaume Tassery
9a5a0b2776 Formatting 2019-04-30 13:50:38 +07:00
吴健
acbeedad38 Fix null problem in FunctionIn 2019-04-30 11:50:30 +08:00
alexey-milovidov
109726d533
Update basename.cpp 2019-04-30 00:40:54 +03:00
Guillaume Tassery
95141804fb Add a basename function 2019-04-29 16:40:44 +07:00
Guillaume Tassery
f21004ed7e IPv4CIDRtoIPv4Range and IPv6CIDRtoIPv6Range return now an IP 2019-04-26 13:30:07 +07:00
Guillaume Tassery
7c4541b127
Merge branch 'master' into top_level_domain 2019-04-26 12:30:23 +07:00
Guillaume Tassery
40db4551f2 Add USE_GPERF on configuration file 2019-04-26 12:01:02 +07:00
Guillaume Tassery
d1bca5b6a4 Remove test file 2019-04-26 10:59:20 +07:00
Guillaume Tassery
2640a0716c Add some pragma for ignoring some compilation flags for file generated by gperf 2019-04-24 17:09:46 +07:00
proller
ba4687e110
Cmake: dont use LINK_MODE (but use BUILD_SHARED_LIBS) (#5091) 2019-04-24 12:06:28 +03:00
Guillaume Tassery
68b0144178 Remove unused header and some typo in comment for IPv6 range function 2019-04-24 13:26:28 +07:00
Guillaume Tassery
efd780f20d Apply fix for IPv6 range function when we use a column with more than one element 2019-04-24 12:19:36 +07:00
Guillaume Tassery
0e67d424da Code reformating for ip range function 2019-04-24 11:18:17 +07:00
Guillaume Tassery
56393de68e Handle UB case for CIDR IP range function and add documentation 2019-04-23 19:28:25 +07:00
Guillaume Tassery
8dee4fe5d1 Add function for get an ipv4 range using an ipv4 and a cidr mask 2019-04-23 14:02:23 +07:00
Guillaume Tassery
8b0dda39e4 Handle more test and update tests 2019-04-23 13:08:09 +07:00
Guillaume Tassery
3639f03bc6 Check if we got a reserved char on url for domain and top level domain 2019-04-23 12:56:24 +07:00
Guillaume Tassery
b567127f49 Doing more URL check on domain and topLevelDomain function 2019-04-23 12:23:59 +07:00
Guillaume Tassery
153c9d6455 Add function for get an IP range from a CIDR 2019-04-22 18:21:59 +07:00
Alexander Kozhikhov
fd07c97097 Merge branch 'master' of https://github.com/yandex/ClickHouse 2019-04-21 18:43:29 +03:00
Alexander Kozhikhov
daf4690d37 review fixes 2019-04-21 17:32:42 +03:00
Guillaume Tassery
5964646971 Remove template for getURLHost function for skip scheme 2019-04-19 11:02:25 +07:00
Guillaume Tassery
bd9a583869 Adapt coding style top level domain lookup 2019-04-18 10:51:02 +07:00
Guillaume Tassery
593dcbb33f Handle URL without www and scheme for domain and topleveldomain function 2019-04-18 10:36:10 +07:00
Vitaly Baranov
7ef7a2d767 Disable ubsan error "outside the range of representable values" in bitSwapLastTwo.cpp 2019-04-17 19:14:31 +03:00
Guillaume Tassery
a904a4af7a Remove useless file 2019-04-17 19:45:25 +07:00
Guillaume Tassery
65fc607c18 Modify tldlookup.gperf file for include only second level domain 2019-04-17 19:40:11 +07:00
Guillaume Tassery
1eccfacca5 Take into account when we have content after the dns on (cutTo)firstSignificantSubdomain function 2019-04-17 19:27:15 +07:00
Guillaume Tassery
4cc0ee677a Use gperf perfect hash for checking with a better accurency the tld for firstSignificantSubdomain and cutToFirstSignificantSubdomain 2019-04-17 13:21:26 +07:00
Danila Kutenin
0abde66822 isValidUTF8 movemask is a bad choice, let's use testz 2019-04-16 15:49:22 +03:00
Guillaume Tassery
6df315a985 Add a way to accept URL without scheme for domain and topLevelDomain 2019-04-16 12:17:56 +07:00
Alexander Kozhikhov
19021e76bb style 2019-04-15 03:16:13 +03:00
Alexander Kozhikhov
12132b8fdf fix in evalMLMethod 2019-04-15 02:57:14 +03:00
Alexey Milovidov
0db5ec9227 More tests 2019-04-12 03:52:24 +03:00
Alexey Milovidov
ceef92fa9e Fixed inconsistent whitespaces 2019-04-12 03:37:07 +03:00
Alexey Milovidov
b4878dbffa Added support for non-constant and negative size and length arguments for function substringUTF8 2019-04-12 03:34:11 +03:00
Alexey Milovidov
36d016d331 Added [[noreturn]] attributes for functions that throw unconditionally 2019-04-10 23:27:14 +03:00
Alexey Milovidov
5be06d8556 Simplified expression (suggested by PVS-Studio) 2019-04-10 23:05:25 +03:00
Alexey Milovidov
37e086f3bf Merge branch 'master' of github.com:yandex/ClickHouse 2019-04-10 22:57:42 +03:00
Alexey Milovidov
b4efebc6ac Fixed error found by PVS-Studio 2019-04-10 22:57:30 +03:00
Danila Kutenin
e9bef32618 License to valid utf8 function 2019-04-10 22:09:27 +03:00
Alexander Kozhikhov
c93aae6741 linear regression 2019-04-09 01:40:37 +03:00
Alexander Kozhikhov
a9ae6d0681 Merge branch 'master' of https://github.com/yandex/ClickHouse 2019-04-09 00:01:28 +03:00
Danila Kutenin
9dc6d8f0f5 Style 2019-04-08 00:23:15 +03:00
Danila Kutenin
3519598ae9 Accurate tail handling 2019-04-07 23:24:08 +03:00
Danila Kutenin
b603e51c6e isValidUTF8 function added 2019-04-07 21:58:13 +03:00
Nikita Lapkov
fbdf2c3525 Merge remote-tracking branch 'upstream/master' into query-poor-mans-profiler 2019-04-06 06:58:40 +00:00
Alexander Kozhikhov
f550304fa4 Merge branch 'master' of https://github.com/yandex/ClickHouse 2019-04-04 03:17:37 +03:00
Vitaly Baranov
842ce6cff8 Fix function cutQueryStringAndFragment(). 2019-04-03 15:58:38 +03:00
Nikolai Kochetov
30d3496c36
Merge pull request #4871 from yandex/fix-array-intersect-impl
Fix array intersect
2019-04-02 17:05:01 +03:00
proller
45591c9d83
Build and test fixes (#4873) 2019-04-02 12:43:53 +03:00
Nikolai Kochetov
e8a8da1a4f Fix array intersect. 2019-04-01 16:27:07 +03:00
Nikolai Kochetov
736e3c0f46
Merge pull request #4847 from fancyqlx/master
Fixed segment fault of arrayIntersect
2019-04-01 16:06:56 +03:00
Danila Kutenin
fca67c8820 Fix clang build 2019-04-01 08:05:52 +03:00
Danila Kutenin
3ce9686bc4 Some cosmetics 2019-04-01 00:04:45 +03:00
Danila Kutenin
8edb5c5b2d Some cosmetics 2019-03-31 23:59:18 +03:00
Danila Kutenin
d509c226ab Pool was not doing what I expected, great improvement of compilation 2019-03-31 23:55:36 +03:00
Danila Kutenin
f80fb09b81 Hyperscan better usage of scratch space and error handling 2019-03-31 23:19:22 +03:00
qianlixiang
bd6bc86ceb Fixed style check errors 2019-03-31 13:03:08 +08:00
qianlixiang
32692fb0dd Fixed style check errors 2019-03-31 12:52:24 +08:00
qianlixiang
dad023ea48 Fixed style check errors 2019-03-31 12:00:11 +08:00
qianlixiang
a1d2732d4c Fixed segment fault of arrayIntersect and add a test 2019-03-31 11:44:05 +08:00
alexey-milovidov
cf492a4401
Merge pull request #4862 from danlark1/master
Optimize Volnitsky by inlining compare function
2019-03-31 02:24:33 +03:00
alexey-milovidov
254369324b
Miscellanous changes in ColumnArray (#4857)
* Miscellanous

* Miscellanous

* Miscellanous
2019-03-30 13:46:17 +03:00
Danila Kutenin
18d3813ff9 Optimize Volnitsky by inlining compare function 2019-03-30 12:39:45 +03:00
qianlixiang
bdb420cdfd Fixed segment fault of arrayIntersect 2019-03-29 18:53:50 +08:00
alexey-milovidov
7aefd6663f
Merge pull request #4841 from danlark1/master
Added hyperscan fuzzy search
2019-03-29 12:39:25 +03:00
Danila Kutenin
cd850f6f98 Fix clang build 2019-03-29 10:04:44 +03:00
Danila Kutenin
b822923f5a Better renamings of fuzzy string search 2019-03-29 04:27:17 +03:00
Danila Kutenin
ef0d622a5f Added hyperscan fuzzy search 2019-03-29 04:02:05 +03:00
alexey-milovidov
e3c5da0a69
Merge pull request #4783 from yandex/cow-ptr-compositions
WIP. Attempt to make compositions with COWPtr more convenient
2019-03-29 02:09:39 +03:00
Danila Kutenin
d22d66a552 Fix exception message 2019-03-28 20:06:04 +03:00
Danila Kutenin
d4e67fa64c Another bug fixed to the comparison 2019-03-28 19:58:16 +03:00
Danila Kutenin
70a7f4805d Test to the restriction added, fix bug 2019-03-28 19:41:11 +03:00
Danila Kutenin
cae4a426c5 Hyperscan restriction 2019-03-28 17:59:25 +03:00
Alexey Milovidov
4417705f32 Merge branch 'master' into cow-ptr-compositions 2019-03-28 17:47:59 +03:00
Alexey Milovidov
faf9462c37 Added support for constant-constant case in multi-search functions 2019-03-27 22:25:58 +03:00
Alexey Milovidov
42dd521e45 Added a setting to disallow Hyperscan 2019-03-27 00:56:46 +03:00
Ivan Remen
2fb5addc40 H3 library integration 2019-03-26 11:59:48 +03:00
proller
1584fd4367
Fix hyperscan library find and use (#4798) 2019-03-26 00:31:00 +03:00
Alexey Milovidov
fb19cf1eec Attempt to make compositions with COWPtr more convenient 2019-03-25 04:43:54 +03:00
alexey-milovidov
06e79a7643
Merge pull request #4780 from danlark1/master
Hyperscan string search regular expression matching was added
2019-03-25 04:26:18 +03:00
Danila Kutenin
4b7824095e Possible fixes to docker containers 2019-03-24 21:24:56 +03:00
Danila Kutenin
1c90d98d16 Clang fix 2019-03-24 02:56:52 +03:00
Danila Kutenin
725139f0f5 Renamings, fixes to search algorithms, more tests 2019-03-24 01:49:38 +03:00
Danila Kutenin
f8001b41ba Hyperscan multi regular expressions search 2019-03-23 22:40:16 +03:00
Nikita Lapkov
4a4ff8d5bf Merge remote-tracking branch 'upstream/master' into query-poor-mans-profiler 2019-03-23 18:45:22 +00:00
Alexey Milovidov
847abfdbb1 Fixed bad code with arithmetic ops on aggregate function states 2019-03-23 05:35:50 +03:00
Alexey Milovidov
5a7237cc13 Miscellaneous 2019-03-23 04:27:08 +03:00
proller
d6d83d4a5c
Allow build without ssl (#4525) (#4750) 2019-03-22 14:18:24 +03:00
alexey-milovidov
f7bdc657d3
Update hasAllAny.h 2019-03-15 02:12:30 +03:00
Alexey Milovidov
a459b2c298 Fixed insufficient type checking in hasAll, hasAny functions 2019-03-15 02:10:51 +03:00
proller
cf8001b6a9
Fix includes (#4673) 2019-03-13 16:58:04 +03:00
alexey-milovidov
617a0a8938
Merge pull request #4592 from yandex/fix-concurrent-alters2
Fix a race condition during concurrent ALTER COLUMN queries
2019-03-10 19:11:49 +03:00
Nikita Lapkov
1ea971ddd2 Merge remote-tracking branch 'upstream/master' into query-poor-mans-profiler 2019-03-10 01:56:41 +00:00
alexey-milovidov
357e17959e
Merge pull request #4602 from danlark1/master
Rename trigramDistance to ngramDistance, add more functions with CaseInsensitive and UTF, update docs, more job done in perf, added some perf tests for string search that I would like to see
2019-03-09 21:19:59 +03:00
Alexey Zatelepin
3344955154 separate Read and Write lock holders, better method names 2019-03-07 21:10:21 +03:00
Alexey Zatelepin
ab025805a3 alter intention lock 2019-03-07 20:21:18 +03:00
Alexey Milovidov
3389cd1735 Merge branch 'master' into fix-function-replicate 2019-03-07 14:56:43 +03:00
proller
86d9876221 Merge remote-tracking branch 'upstream/master' into fix23 2019-03-06 22:58:47 +03:00
proller
ee15cb237c Better fix 2019-03-06 22:19:21 +03:00
proller
9159d602f5 Fix bug in arrayEnumerateRanked 2019-03-06 20:19:26 +03:00
Nikita Lapkov
12fe175385 Merge remote-tracking branch 'upstream/master' into query-poor-mans-profiler 2019-03-06 10:30:47 +00:00
Alexey Milovidov
fb8e37f60f Fix segfault in function "replicate" 2019-03-06 02:37:41 +03:00
Danila Kutenin
dcfd3fe37f Comment in FunctionsStringSimilarity 2019-03-06 02:08:08 +03:00
Alexey Milovidov
5a644f0052 Miscellaneous 2019-03-06 02:05:47 +03:00
Alexey Milovidov
b5b3f52f0f Added documentation 2019-03-06 01:43:18 +03:00
Danila Kutenin
952b5ea24a Rename trigramDistance to ngramDistance, add more functions with CaseInsensitive and UTF, update docs, more job done in perf, added some perf tests for string search that I would like to see 2019-03-06 01:42:28 +03:00
Alexey Milovidov
224839a58a Attempt to read the code #4475 2019-03-06 00:53:16 +03:00
proller
89014b5480
Build fixes (#4591) 2019-03-05 13:15:47 +03:00
Vitaly Baranov
61e21d50e1
Merge pull request #4207 from andyyzh/bitmap_feature
Added bitmap function feature with roaring bitmap
2019-03-04 22:42:47 +03:00
Alexey Milovidov
3033d329eb Fixed error #4564 2019-03-04 18:50:23 +03:00
Alexey Milovidov
b29c24d3d9 Fixed error #4564 2019-03-04 18:13:33 +03:00
Alexey Milovidov
315b6f3878 Better string comparison (development) 2019-03-03 23:08:39 +03:00
Alexey Milovidov
865d54d9e3 Addition to prev. revision 2019-03-03 16:53:06 +03:00
Alexey Milovidov
d120fc788b NaN comparisons are implementation specific - remove them from tests 2019-03-03 04:18:35 +03:00
Alexey Milovidov
bcf8cd6297 NaN comparisons are implementation specific - remove them from tests 2019-03-03 04:17:33 +03:00
Alexey Milovidov
0dc576e44f Avoid performance degradation in few degenerate cases: added fast path for tautological compares #4405 2019-03-03 02:51:48 +03:00
Alexey Milovidov
8df4b8e270 Added comment #4409 2019-03-01 23:17:30 +03:00
Alexey Milovidov
3c2dd5257b Fixed typo #4409 2019-03-01 23:16:56 +03:00
Alexey Milovidov
bc25bedbd4 Implemented function "flatten" #4409 2019-03-01 23:07:58 +03:00
Alexey Milovidov
9d0adf40d2 Merge branch 'array-flatten-function' of https://github.com/kzon/ClickHouse into kzon-array-flatten-function 2019-03-01 19:42:06 +03:00
alexey-milovidov
97cea95f74
Merge pull request #4536 from amosbird/fixedhashtable
A Proper lookup table that uses HashTable's API
2019-03-01 17:47:33 +03:00
Nikita Lapkov
ce4e48d6f4 Merge branch 'master' into query-poor-mans-profiler 2019-03-01 14:22:38 +00:00
Amos Bird
26ab5dd7a7 A Proper lookup table that uses HashTable's API
This is the first step of allowing heterogeneous cells in hash tables.

performance test results are

```

1. HashMap<UInt16, UInt8, TrivialHash, HashTableFixedGrower<16>>;
2. NewLookupMap<UInt16, UInt8>

ResolutionWidth 30000 1 .................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................223550276.46
ResolutionWidth 30000 2 .................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................248772721.24
Best: 2 - 24877272124

ResolutionWidth 100000 1 ..........................................................................................................................................................................................................................................................238498413.99
ResolutionWidth 100000 2 ..........................................................................................................................................................................................................................................................261808889.98
Best: 2 - 26180888998

ResolutionWidth 300000 1 ...................................................................................239307348.81
ResolutionWidth 300000 2 ...................................................................................257592761.30
Best: 2 - 25759276130

ResolutionWidth 1000000 1 .........................240144759.26
ResolutionWidth 1000000 2 .........................257093531.91
Best: 2 - 25709353191

ResolutionWidth 5000000 1 .....241573260.35
ResolutionWidth 5000000 2 .....259314162.79
Best: 2 - 25931416279

ResolutionDepth 30000 1 .................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................217108119.84
ResolutionDepth 30000 2 .................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................249459504.41
Best: 2 - 24945950441

ResolutionDepth 100000 1 ..........................................................................................................................................................................................................................................................229065162.17
ResolutionDepth 100000 2 ..........................................................................................................................................................................................................................................................253769105.64
Best: 2 - 25376910564

ResolutionDepth 300000 1 ...................................................................................233079225.18
ResolutionDepth 300000 2 ...................................................................................256316273.78
Best: 2 - 25631627378

ResolutionDepth 1000000 1 .........................234184633.51
ResolutionDepth 1000000 2 .........................261100491.57
Best: 2 - 26110049157

ResolutionDepth 5000000 1 .....233118795.66
ResolutionDepth 5000000 2 .....252436160.41
Best: 2 - 25243616041

```
2019-03-01 16:47:13 +08:00
Alexey Zatelepin
eee73dac42 Merge branch 'master' into fix-concurrent-alters 2019-02-28 19:19:21 +03:00
proller
aad2856eba CLICKHOUSE-4179 : arrayEnumerateDenseRanked arrayEnumerateUniqRanked (#4475)
* Build fixes (clang 7.0.0+)

* better

* wip

* wip

* fix

* fix

* wip

* fix

* clean

* clean

* CLICKHOUSE-4179 WIP

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

*    wip

* wip

* wip

* wip

* wip

* cf

*    wip

* wip

* wip

* wip

* cf

* wip

* wip# Please enter the commit message for your changes. Lines starting

* wip# Please enter the commit message for your changes. Lines starting

* cf

* wip# Please enter the commit message for your changes. Lines starting

* wip

* cf

* wip

* wip

* clean

* clean

* clean

* clean

* wip

* wip

* wip

* cf

* wip

* wip

* wip

* cf

* clean

* wip

* clean

* cf

* clean

* clean

* test

* clean

* wip

* cf

* wip

* clean

* clean

* wip

* wip

* clean

* cf

* clean

* Requested changes

* cf

* no convertToFullColumnIfConst

* clean

* clean

* clean

* fix

* Remove comment
2019-02-28 01:18:58 +03:00
Alexey Zatelepin
0d7ab9e3ea allow acquiring read lock to a table out of order if it was already locked by the same query [#CLICKHOUSE-3789]
this is important in preventing ALTER deadlocks
2019-02-27 21:34:38 +03:00
proller
23d70b2e04
Add Y_IGNORE (#4521) 2019-02-27 19:52:08 +03:00
alexey-milovidov
bffe514efa
Merge pull request #4466 from danlark1/master
Function trigramDistance() added for string similarity search
2019-02-25 21:20:29 +03:00
Георгий Кондратьев
b94de32423 Support xxHash with external lz4
xxhash.h does not exist in external lz4 because it is an implementation detail
and its symbols are namespaced with XXH_NAMESPACE macro.  When lz4 is external,
xxHash has to be external too, and the dependents have to link to it.

This find_xxhash.cmake is based on find_lz4.cmake.
2019-02-25 07:14:37 +00:00
Danila Kutenin
6c50a55777 Faster hash function and one comment removed 2019-02-23 21:26:09 +03:00
Danila Kutenin
6736dcc96b A bit better performance, return old name to function 2019-02-22 22:43:47 +03:00
Danila Kutenin
9ea1e948b3 better style in distance() 2019-02-22 06:50:06 +03:00
Danila Kutenin
3149eac681 some style 2019-02-22 06:07:35 +03:00
Danila Kutenin
ada849263b Optimize distance function, some allocation, hashmap tricks 2019-02-22 06:02:10 +03:00
Danila Kutenin
3f636b3c34 Remove redundant include 2019-02-21 08:16:55 +03:00
Danila Kutenin
953d8c29a5 Remove redundant comment 2019-02-21 08:14:26 +03:00
Danila Kutenin
16b2e45586 Function trigramDistance added for string similarity search 2019-02-21 08:08:37 +03:00
Anton Kobzev
58b94db3fd
Merge branch 'master' into array-flatten-function 2019-02-15 12:08:24 +03:00
anton
2868bbcb21 Basic implementation 2019-02-15 10:00:50 +03:00
anton
5cb04155d7 Basic implementation 2019-02-15 08:47:49 +03:00
anton
350975cb25 Basic implementation 2019-02-14 17:56:11 +03:00
Andy Yang
4a4dbcd2c1 Merge remote-tracking branch 'origin' into bitmap_feature 2019-02-14 15:14:18 +08:00
alexander kozhikhov
b23cd21ce1 predict correctly using scalar aggr state 2019-02-13 01:33:37 +03:00
alexander kozhikhov
aedf4925dc Merge branch 'master' into ml_methods 2019-02-12 23:04:25 +03:00
alexander kozhikhov
f20ad204e7 Merge branch 'master' of https://github.com/yandex/ClickHouse 2019-02-12 23:00:47 +03:00
alexey-milovidov
2493b63bf2
Merge pull request #4365 from vitlibar/function-to-start-of-day-now-can-receive-date
Function toStartOfDay() now can receive a date.
2019-02-12 21:33:12 +03:00
Nikolai Kochetov
31397f7156 Fix column size for const LowCardinality arguments. 2019-02-12 19:04:05 +03:00
Nikolai Kochetov
bb686b3154 Fix type for constant LowCardinality arguments. 2019-02-12 18:43:58 +03:00
Nikolai Kochetov
1af4d9b89c Fix type for constant LowCardinality arguments. 2019-02-12 18:42:33 +03:00
Vitaly Baranov
83d461975e Function toStartOfDay() now can receive a date. 2019-02-12 17:21:37 +03:00
Alexey Milovidov
2aafcb8401 Fixed ubsan build #4322 2019-02-12 16:51:34 +03:00
Alexey Milovidov
8f1910729a Fixed ubsan build #4322 2019-02-12 15:33:24 +03:00
Alexey Milovidov
2294575693 Fixed fuzz test #4322 2019-02-11 20:26:35 +03:00
alexey-milovidov
4e12697e1c
Merge pull request #4304 from vitlibar/add-function-to-start-of-interval
Add time function toStartOfInterval().
2019-02-11 17:21:48 +03:00
Vitaly Baranov
0dd1dc242a Add time function toStartOfInterval(). 2019-02-11 14:59:17 +03:00
alexander kozhikhov
bfccafef49 small test code 2019-02-11 00:16:16 +03:00
Alexey Milovidov
e150e62040 Grouped includes (40 of 182) 2019-02-10 20:40:52 +03:00
Alexey Milovidov
ba3cb83a84 Removed duplicate includes 2019-02-10 20:12:22 +03:00
Nikita Lapkov
2a0af15951 add symbolizeTrace function 2019-02-10 03:10:07 +00:00
alexey-milovidov
77ce3dab0f
Merge pull request #4320 from yandex/bitmask-ubsan
Fixed error found by UBSan; added a test for bitmask functions for negative input
2019-02-10 01:27:04 +03:00
Alexey Milovidov
f794ebbec4 Fixed implementation of "arrayWithConstant" #4309 2019-02-10 00:13:58 +03:00
alexander kozhikhov
be17c6fab6 Merge branch 'master' of https://github.com/yandex/ClickHouse 2019-02-10 00:10:33 +03:00
Alexey Milovidov
a01427db27 Merge branch 'master' of https://github.com/Stupnikov/ClickHouse into Stupnikov-master 2019-02-10 00:04:17 +03:00
Alexey Milovidov
871670d4fb Fixed test 2019-02-10 00:03:42 +03:00
Alexey Milovidov
d705c4fc9c Fixed error found by UBSan; added a test for bitmask functions for negative input 2019-02-09 22:44:27 +03:00
Andy Yang
1a28ba01c1 Added bitmap function feature, fixed test errors and code styles 2019-02-09 14:33:09 +08:00
proller
a95d2d153d Build ARM fix (#4306)
* Build ARM fix

* Fix warning: declaration shadows a local variable

* Add info about SPLIT_SHARED_LIBRARIES

* Fix cpuid on ARM

* release: better pbuilder autoinstall
2019-02-09 01:09:32 +03:00
Stupnikov Andrey
dbc9376a0f arrayWithConstant function implementation; 2019-02-08 02:24:07 +03:00
Vitaly Baranov
7ff5439971
Merge pull request #4298 from vitlibar/add-function-to-start-of-ten-minutes
Add function toStartOfTenMinutes().
2019-02-07 11:46:13 +03:00
Vitaly Baranov
7cbdb17f5b Add function toStartOfTenMinutes(). 2019-02-07 01:50:04 +03:00
alexey-milovidov
2686f64233
Merge pull request #4128 from yandex/unified-sets
Unified sets
2019-02-06 20:40:11 +03:00
alexey-milovidov
f234d7b55e
Merge pull request #4291 from proller/fix15
Build ARM fixes
2019-02-06 18:41:24 +03:00
KochetovNicolai
9f971c276f
Merge pull request #3669 from Enmk/ipv4_and_ipv6_domains
Ipv4 and ipv6 domains
2019-02-06 18:16:58 +03:00
proller
8a714ed2f0 Build ARM fixes 2019-02-06 14:37:30 +00:00
Nikita Vasilev
a1b0dede07 Data Skipping Indices (#4143)
* made index parser

* added index parsing

* some fixes

* added index interface and factory

* fixed compilation

* ptrs

* added indexParts

* indextypes

* index condition

* IndexCondition

* added indexes in selectexecutor

* fix

* changed comment

* fix

* added granularity

* comments

* fix

* fix

* added writing indexes

* removed indexpart class

* fix

* added setSkipIndexes

* add rw for MergeTreeIndexes

* fixes

* upd error

* fix

* fix

* reading

* test index

* fixed nullptr error

* fixed

* fix

* unique names

* asts -> exprlist

* minmax index

* fix

* fixed select

* fixed merging

* fixed mutation

* working minmax

* removed test index

* fixed style

* added indexes to checkDataPart

* added tests for minmax index

* fixed constructor

* fix style

* fixed includes

* fixed setSkipIndexes

* added indexes meta to zookeeper

* added parsing

* removed throw

* alter cmds parse

* fix

* added alter

* fix

* alters fix

* fix alters

* fix "after"

* fixed alter

* alter fix + test

* fixes

* upd setSkipIndexes

* fixed alter bug with drop all indices

* fix metadata editing

* new test and repl fix

* rm test files

* fixed repl alter

* fix

* fix

* indices

* MTReadStream

* upd test for bug

* fix

* added useful parsers and ast classes

* fix

* fix comments

* replaced columns

* fix

* fixed parsing

* fixed printing

* fix err

* basic IndicesDescription

* go to IndicesDescr

* moved indices

* go to indicesDescr

* fix test minmax_index*

* fixed MT alter

* fixed bug with replMT indices storing in zk

* rename

* refactoring

* docs ru

* docs ru

* docs en

* refactor

* rename tests

* fix docs

* refactoring

* fix

* fix

* fix

* fixed style

* unique idx

* unique

* fix

* better minmax calculation

* upd

* added getBlock

* unique_condition

* added termForAST

* unique

* fixed not

* uniqueCondition::mayBeTrueOnGranule

* fix

* fixed bug with double column

* is always true

* fix

* key set

* spaces

* test

* tests

* fix

* unique

* fix

* fix

* fixed bug with duplicate column

* removed unused data

* fix

* fixes

* __bitSwapLastTwo

* fix
2019-02-05 17:50:25 +03:00
Nikolai Kochetov
a249fc7788 Do nut use Arena in ColumnsHashing for string in functions arrayUniq and arrayEnumerate. 2019-02-05 14:14:09 +03:00
Nikolai Kochetov
daa051b1f8 Fix tests. 2019-02-05 13:55:34 +03:00
Nikolai Kochetov
1644349342 Refactor arrayEnumerateUniq using ColumnsHashing. 2019-02-05 13:55:25 +03:00
Alexey Milovidov
b186861ef7 Fixed error message 2019-02-04 22:50:21 +03:00
Vasily Nemkov
2716df8ab2 IPv4 and IPv6 Domain implementation.
Added:
 * IDataTypeDomain interface;
 * method DataTypeFactory::registerDataTypeDomain for registering domains;
 * DataTypeDomainWithSimpleSerialization domain base class with simple serialization/deserialization;
 * Concrete IPv4 and IPv6 domain implementations: DataTypeDomanIPv6 and DataTypeDomanIPv4;

Updated:
 * IDataType text serialization/deserialization methods;
 * IDataType implementation to use domain for text serialization/deserialization;
 * Refactored implementation of the IPv4/IPv6 functions to use formatIPv4/v6 and parseIPv4/v6 from Common/formatIPv6.h;

Tests:
 * Added test cases for IPv4 and IPv6 domains.
 * Updated IPv4/v6 functions tests to validate more cases;
 * Added performance tests for IPv4 and IPv6 related functions;
2019-02-04 12:37:46 +03:00
Alexey Milovidov
1f72b0fb16 Disable JIT compilation for comparison of Date and DateTime and conditional operator 2019-02-04 01:11:28 +03:00
Alexey Milovidov
59318c2ad9 Disable JIT compilation for comparison of Date and DateTime and conditional operator 2019-02-04 01:08:17 +03:00
Alexey Milovidov
2129094ba3 Merge branch 'master' into generic-case-for-function-if 2019-02-03 16:01:56 +03:00
alexey-milovidov
91d0d403a2
Merge pull request #3890 from zhang2014/fix/ISSUES-3885
ISSUES-3885 temporarily disable predicate optimization for order by
2019-02-03 12:10:20 +03:00
Alexey Milovidov
bf19e73386 Added generic case for function "if" 2019-02-03 11:41:25 +03:00
alexey-milovidov
ad2f6b4db3
Merge pull request #4237 from valexey/date_and_datetime_comparison
correct Date and DateTime comparison
2019-02-02 20:58:07 +03:00
alexey-milovidov
592d56ac69
Update FunctionsComparison.h 2019-02-02 20:57:36 +03:00
alexey-milovidov
14f208b9a3
Merge pull request #4239 from danlark1/master
produce hints for typo functions and types
2019-02-02 20:42:35 +03:00
Alexey
fc417a4e62 code cleanup 2019-02-02 07:02:57 -08:00
Danila Kutenin
5e62a0825a produce hints for typo functions and types 2019-02-02 17:54:50 +03:00
Alexey
84bbc83192 use common time for Date and DateTime comparisons 2019-02-02 06:23:44 -08:00
proller
c7cb8d2db5 Freebsd fixes (#4225)
* CLICKHOUSE-4109 mlock clickhouse

* wip

* Fix

* wip

* fix

* fix

* better place

* wip

* clean

* tidy

* fix

* Freebsd fix

* Fix compile on ARM

* Freebsd fixes

* Simpler test

* Fuzzy test: dont skip already fixed functions
2019-02-02 14:09:22 +03:00
Andy Yang
7e7a864fd4 Added bitmap function feature with roaring bitmap 2019-01-31 21:26:11 +08:00
zhang2014
3af26ca070 ISSUES-3885 better test & fix isStateful bug 2019-01-30 12:49:00 +08:00
zhang2014
ddbd384f32 ISSUES-3885 mark stateful function & do not optimize their predicate 2019-01-30 12:04:28 +08:00
alexey-milovidov
aa06005a32
Merge pull request #4179 from yandex/avoid-overflow-in-function-sleep
Fixed possible overflow in function "sleep" (found by fuzz test with UBSan)
2019-01-29 13:44:39 +03:00
Alexey Milovidov
c792191831 Fixed possible overflow in function "sleep" (found by fuzz test with UBSan) #4166 2019-01-29 13:42:45 +03:00
proller
2eee2d97df Update contrib/libmetrohash 2019-01-28 17:00:50 +03:00
Amos Bird
d8eba7e71b Better joinGet. 2019-01-25 23:38:13 +08:00
alexander kozhikhov
fd8f9c4fba changes after review 2019-01-23 04:29:53 +03:00
alexander kozhikhov
ffd0d9af26 Merge branch 'alexkoja_ML' 2019-01-23 00:31:53 +03:00
alexander kozhikhov
61bb3b8ade simple linear regression 2019-01-23 00:07:05 +03:00
maiha
6c83beafdd dbms: Fixed misspells in comments 2019-01-23 04:56:53 +09:00
Alexey Milovidov
c7b95b5175 Miscellaneous changes for PVS-Studio 2019-01-20 02:27:52 +03:00
Boris Granveaud
f1a7f60165 new functions filesystemAvailable, filesystemFree and filesystemCapacity 2019-01-18 16:44:53 +01:00
Danila Kutenin
12bcff48ee Miscellaneous and some optimizations 2019-01-16 20:41:08 +03:00
Alexey Milovidov
7d03804d06 Miscellaneous #4053 2019-01-16 16:57:11 +03:00
Danila Kutenin
a5669b6b7a MultiVolnitsky added with tests and some benchmark, many multiFunctions are added to support multistring search 2019-01-14 18:54:47 +03:00
proller
7cefef6983
Fix linking in all modes (unbundled, split, ...) (#4037) 2019-01-11 19:52:46 +03:00
alesapin
8ae59da557 Fix name hiding 2019-01-10 14:46:20 +03:00
Alexey Milovidov
19f4652959 Fixed bugs found by PVS-Studio 2019-01-09 18:44:20 +03:00
alexey-milovidov
0648088ff0
Merge pull request #4000 from housepower/feature/gccHash
Add gccHash function
2019-01-09 10:29:37 +03:00
sundy-li
31a516300a rename to gccMurmurHash 2019-01-09 10:03:50 +08:00
Alexey Milovidov
ed07c1a1d2 Added "reserve" for "arrayFirst" #3920 2019-01-08 18:30:04 +03:00
sundy-li
e6c02a2356 Add gccHash function 2019-01-08 13:12:52 +08:00
Alexey Milovidov
d4f5310358 Miscellaneous [#CLICKHOUSE-2] 2019-01-07 22:57:32 +03:00
Alexey Milovidov
1c7ccbf108 Miscellaneous [#CLICKHOUSE-2] 2019-01-07 22:56:53 +03:00
Alexey Milovidov
0dfa553fca Added more warnings from clang's -Weverything, that are available in clang 8 2019-01-07 13:40:58 +03:00
Alexey Milovidov
06a8c3f02d Added some warnings from clang's -Weverything 2019-01-05 06:33:22 +03:00
Alexey Milovidov
afda68d25c Added some warnings from clang's -Weverything 2019-01-04 17:18:49 +03:00
Alexey Milovidov
4622f5dc7c Added some warnings from clang's -Weverything 2019-01-04 16:32:08 +03:00
Alexey Milovidov
1d4701b0bc Added some warnings from clang's -Weverything 2019-01-04 15:10:00 +03:00
Alexey Milovidov
e33e5150b7 Miscellaneous [#CLICKHOUSE-2] 2019-01-02 09:44:36 +03:00
Alexey Milovidov
cd6a1c9bc9 Fixed uninitialized memory in "runningDifference" function [#CLICKHOUSE-2] 2018-12-29 03:53:11 +03:00
alexey-milovidov
4ac9f7a204
Merge pull request #3959 from yandex/catboost-multiclass-models
Catboost multiclass models
2018-12-29 01:22:14 +03:00
Nikolai Kochetov
bdaf1ac109 Support multiclass models for CatBoost. 2018-12-28 21:08:32 +03:00
Alexey Milovidov
88bdbc4dc7 Some additions to Amos Bird's optimization #3920 2018-12-27 22:58:30 +03:00
Alexey Milovidov
160ffe8c7f Fixed UB #3926 2018-12-27 05:00:31 +03:00
Alexey Milovidov
76dafd4d95 Fixed UB #3926 2018-12-27 04:51:22 +03:00
Alexey Milovidov
673fa80a9c Allowed some UB #3926 2018-12-27 03:40:10 +03:00
Alexey Milovidov
39492139f0 Allowed some UB #3926 2018-12-27 03:25:47 +03:00
Alexey Milovidov
d6c7825328 Addition to prev. revision #3926 2018-12-27 03:11:42 +03:00