Commit Graph

779 Commits

Author SHA1 Message Date
zhang2014
eeae014a42 ISSUES-1885 use movemask & popcnt 2018-02-14 08:11:12 +08:00
zhang2014
0d8730c687 ISSUES-1885 fix signed problem 2018-02-13 13:46:16 +08:00
Alexey Milovidov
c104566eb8 Fixed performance regression in usage of COWPtr in complex cases [#CLICKHOUSE-3584]. 2018-02-12 23:10:24 +03:00
zhang2014
acb5b99195 ISSUES-1885 fix align bound 2018-02-12 16:05:24 +08:00
zhang2014
5f9292ac30 ISSUES-1885 resolve some opinions 2018-02-12 15:58:04 +08:00
zhang2014
73077e0245 ISSUES-1885 fix failed test 2018-02-12 15:31:54 +08:00
zhang2014
0f20952f2c ISSUES-1885 UTF8 countCodePoints use simd 2018-02-12 15:31:22 +08:00
alexey-milovidov
d3160393c5
Merge branch 'master' into CLICKHOUSE-3554 2018-02-08 23:07:50 +03:00
alexey-milovidov
b7d0ae49fd
Merge pull request #1844 from bocharov/master
Fix uniqHLL12 and uniqCombined for cardinalities 100M+.
2018-02-08 20:01:45 +03:00
Vitaliy Lyudvichenko
42754a5327 Add new virtual columns into system.tables. [#CLICKHOUSE-3554] 2018-02-08 17:15:40 +03:00
proller
0c00e47930 Fix tests 2018-02-02 20:29:45 +03:00
Alex Bocharov
9963e2f160 Fix uniqHLL12 and uniqCombined for cardinalities 100M+.
* Changing size() return type from UInt32 to UInt64 to prevent overflow (this shouldn't break back compatibility).
 * Removing "big cardinalities fix" for cardinalities >2^32/30 as it was very inaccurate and for estimates >2^32 it was trying to do 'log' of negative number which is NaN and it was casted to 0.
 * Adding python script to show that intHash32 is not a good choice for HyperLogLog algorithm when it's used for linear counting branch of it.
 * Adding bash script to test uniq, uniqHLL12, uniqCombined on different set cardinalities.
 * Altering documentation of uniq* aggregate functions with recommendations to use uniq instead of uniqHLL12 or uniqCombined.
2018-01-31 11:36:01 +00:00
Vitaliy Lyudvichenko
94f38d744e
Merge pull request #1750 from yandex/CLICKHOUSE-3346
Fault-tolerant cluster copier util
2018-01-31 13:21:51 +03:00
alexey-milovidov
bea49ca136
Merge pull request #1741 from yandex/array-functions-hasAll-hasAny-intersect
Array functions hasAll hasAny arrayIntersect arrayResize
2018-01-26 12:06:48 +03:00
proller
63b3bccb04 Test and build fixes (#1822)
* Fix travis

* try

* try

* Disable macos

* Travis enable macos

* Fix

* fast_finish: true

* fix

*  fxi

* fix openssl

* fix

* fix

* Fix

* try travis

* fix

* fix

* Cmake: dont filter platform-depended files in cmake

* misc

* renamed:    tests/server_wrapper.sh -> tests/clickhouse-test-serve

* install clickhouse-test-server

* clickhouse-test-server wip

* wip
2018-01-26 12:03:38 +03:00
Vitaliy Lyudvichenko
4665201827 Add metric for duplicated inserts. [#CLICKHOUSE-2] 2018-01-25 21:47:44 +03:00
Vitaliy Lyudvichenko
61233b886a Better system.part_log. [#CLICKHOUSE-3342] 2018-01-25 21:40:02 +03:00
alexey-milovidov
24ac18201c Update getFQDNOrHostName.cpp
Update isLocalAddress.cpp

Update IBlockOutputStream.h

Update users.xml
2018-01-24 17:14:21 +03:00
Vitaliy Lyudvichenko
b4ab7d4b8e Make early deduplication with block number creation. [#CLICKHOUSE-3545] 2018-01-23 18:50:29 +03:00
Vitaliy Lyudvichenko
0bd5f6a447 Merged ZooKeeper lib changes from CLICKHOUSE-3342. Part 1. [#CLICKHOUSE-3346] 2018-01-22 21:56:23 +03:00
Vitaliy Lyudvichenko
1000328571 Merge remote-tracking branch 'origin/master' into CLICKHOUSE-3346 2018-01-22 20:31:08 +03:00
Nikolai Kochetov
ff0328aee7 fix build [#CLICKHOUSE-2998] 2018-01-22 13:18:55 +03:00
Nikolai Kochetov
ba1bfb97c8 Merge branch 'array-function-resize' into array-functions-hasAll-hasAny-intersect 2018-01-19 22:33:43 +03:00
alexey-milovidov
0a3b1679ec
Update ClearableHashSet.h 2018-01-19 21:51:45 +03:00
alexey-milovidov
1b462b0b94
Merge pull request #1759 from yandex/CLICKHOUSE-3432
Fixed 'intersects previous part' due to blind OPTIMIZE
2018-01-19 21:48:41 +03:00
proller
76cf0ba5d0 Better tests (#1785)
* Make separate libs Common/ZooKeeper and Common/ConfigProcessor
renamed:    dbms/src/Common/StringUtils.h -> dbms/src/Common/StringUtils/StringUtils.h

* Fix space

* Fix data in system.build_options

* merge

* merge

* Travis optimize

* optimize

* Fix clickhouse-test --no-long

* no long

* Split too long test

* Better tests

* missing file

* Fix includes

* Added draft [#CLICKHOUSE-2].

* fix

* fix

* fix

* Fix test 281 under asan
2018-01-18 23:33:16 +03:00
Nikolai Kochetov
de274b317a added ArraySourceVisitor and ArraySinkVisitor [#CLICKHOUSE-2998] 2018-01-18 18:50:35 +03:00
Nikolai Kochetov
694b305036 added arrayIntersect [#CLICKHOUSE-3504] 2018-01-17 14:36:02 +03:00
proller
d97b2edc7c Make separate libs Common/ZooKeeper and Common/ConfigProcessor (#1749)
* Make separate libs Common/ZooKeeper and Common/ConfigProcessor
renamed:    dbms/src/Common/StringUtils.h -> dbms/src/Common/StringUtils/StringUtils.h

* Fix space

* Fix data in system.build_options

* merge

* merge
2018-01-15 22:07:47 +03:00
Vitaliy Lyudvichenko
03bca2144d OPTIMIZE doesn't produce intersecting merges now, add optimize_throw_if_noop setting. [#CLICKHOUSE-3432] [#CLICKHOUSE-3420]
Resolves #1753
2018-01-15 13:13:18 +03:00
proller
22e3695a47 More system.build_options 2018-01-12 19:50:10 +03:00
proller
364b8ec5ee Fix data in system.build_options 2018-01-12 19:04:18 +03:00
Vitaliy Lyudvichenko
388d47bbbc Merge branch 'CLICKHOUSE-3346-v310' into CLICKHOUSE-3346 2018-01-11 23:51:30 +03:00
Vitaliy Lyudvichenko
e996da050d Add copying check and retries. [#CLICKHOUSE-3346] 2018-01-11 21:55:45 +03:00
Vitaliy Lyudvichenko
e1fafb1f2f Minimal working example. [#CLICKHOUSE-3346] 2018-01-11 21:55:45 +03:00
Alexey Milovidov
73460a5f86 Fixed error [#CLICKHOUSE-2]. 2018-01-11 21:55:31 +03:00
Vitaliy Lyudvichenko
ac17c59108 Updated describe query, cluster copier draft. [#CLICKHOUSE-3346] 2018-01-11 21:55:08 +03:00
proller
b026eb7797 Use submodule contrib/capnproto, remove include_directories (#1746)
* Add submodule contrib/capnproto

* Use contrib/capnproto, remove include_directories

* Fix include

* Clean

* Fix werror

* Update doc

* Fix

* Final fix

* Fxi
2018-01-11 21:39:52 +03:00
Alexey Milovidov
0bfea2f52c Miscellaneous [#CLICKHOUSe-2] 2018-01-10 03:04:08 +03:00
Alexey Milovidov
c4687b5fb9 Unification of Nested: development [#CLICKHOUSE-2]. 2018-01-02 08:54:34 +03:00
Alexey Milovidov
fcdd5de47d Revert "Removed questionable code (2) [#CLICKHOUSE-2]."
This reverts commit fcabe8b888.
2017-12-28 07:39:19 +03:00
Alexey Milovidov
798299ba89 Merge branch 'aavdonkin-master' 2017-12-28 07:33:55 +03:00
Alexey Milovidov
4448766266 Merging [#CLICKHOUSE-3114] 2017-12-28 07:28:05 +03:00
Alexey Milovidov
104b09604a Merging [#CLICKHOUSE-3114] 2017-12-28 00:45:05 +03:00
Alexey Milovidov
09262ae0d7 Merge branch 'master' of github.com:yandex/ClickHouse 2017-12-27 01:56:30 +03:00
Alexey Milovidov
b2fcf06353 Merging [#CLICKHOUSE-3114] 2017-12-27 00:34:06 +03:00
Alexey Milovidov
203363ea73 Merge branch 'master' of github.com:yandex/ClickHouse 2017-12-26 20:53:36 +03:00
Alexey Milovidov
7a60d773ec Fixed strange code [#CLICKHOUSE-2]. 2017-12-26 20:53:31 +03:00
alexey-milovidov
9bf06a26cc Update PODArray.h 2017-12-26 20:52:22 +03:00
chenxing.xc
e7efee8f41 fix potential memory issue 2017-12-26 20:52:22 +03:00
Alexey Milovidov
c89041ce63 Removed questionable code (2) [#CLICKHOUSE-2]. 2017-12-26 01:51:04 +03:00
Alexey Milovidov
ec71908b00 Revert "Removed questionable code (2) [#CLICKHOUSE-2]."
This reverts commit fcabe8b888.
2017-12-26 00:57:29 +03:00
Alexey Milovidov
fcabe8b888 Removed questionable code (2) [#CLICKHOUSE-2]. 2017-12-26 00:32:33 +03:00
Alexey Milovidov
a85b2e5a95 Removed questionable code [#CLICKHOUSE-2]. 2017-12-26 00:10:46 +03:00
Alexey Milovidov
04eb0b896c Added proper support for Nullable arguments for function OR #1416 2017-12-25 09:33:51 +03:00
Alexey Milovidov
8ff93487e3 Miscellaneous [#CLICKHOUSE-2]. 2017-12-25 07:01:46 +03:00
Alexey Milovidov
61174e9150 Better implementation for IDataType::equals method #1650 2017-12-23 04:05:29 +03:00
Alexey Zatelepin
6d5ce3fa9a revert BackgroundSchedulePool usage in Replicated tables 2017-12-22 21:25:54 +03:00
Roman Tsisyk
0e556c2b03 Fix compilation without SSE 4.2
Fixes "'hash64' was not declared in this scope" on aarch64.
2017-12-21 00:48:17 +03:00
Marek Vavruša
fb1aa84973 Fixed clang build on macOS
- Make sure to use dynamic linking on macOS to avoid OpenSSL static linking bug
- Use -std=c++17 in CFLAGS for files in contrib
- Avoid bad support for thread_local on macOS with clang altogether
2017-12-21 00:46:50 +03:00
Nikolai Kochetov
39ec3f7d74 changed exception message, added comments 2017-12-19 22:51:59 +03:00
Silviu Caragea
b08463ed7b Fix for https://github.com/yandex/ClickHouse/issues/1648 2017-12-19 22:41:05 +03:00
Alexey Milovidov
d9732198ac Better semantic of sharing columns: development [#CLICKHOUSE-2]. 2017-12-19 03:51:12 +03:00
Alexey Milovidov
61c2b55a57 Better semantic of sharing columns: development [#CLICKHOUSE-2]. 2017-12-19 03:43:04 +03:00
Alexey Milovidov
f9170190c6 Miscellaneous [#CLICKHOUSE-2]. 2017-12-18 07:17:56 +03:00
Alexey Milovidov
c5d5296889 Miscellaneous [#CLICKHOUSE-2]. 2017-12-18 07:07:26 +03:00
Alexey Milovidov
7c802ee3de Better semantic of sharing columns: development [#CLICKHOUSE-2]. 2017-12-18 05:37:08 +03:00
Alexey Milovidov
5b32914089 Better semantic of sharing columns: development [#CLICKHOUSE-2]. 2017-12-16 07:29:34 +03:00
Alexey Milovidov
645f620873 Better semantic of sharing columns: development [#CLICKHOUSE-2]. 2017-12-16 00:46:56 +03:00
Alexey Milovidov
7284a64740 Better semantic of sharing columns: development [#CLICKHOUSE-2]. 2017-12-16 00:32:25 +03:00
Alexey Milovidov
01a0b91c83 Better semantic of sharing columns: development [#CLICKHOUSE-2]. 2017-12-15 00:20:14 +03:00
Alexey Milovidov
911d80ab51 Better semantic of sharing columns: development [#CLICKHOUSE-2]. 2017-12-14 07:25:22 +03:00
Alexey Milovidov
fb38ef9a8e Better semantic of sharing columns: development [#CLICKHOUSE-2]. 2017-12-14 06:56:56 +03:00
Alexey Milovidov
bed2d644e6 Merge remote-tracking branch 'origin/master' into cow_columns 2017-12-14 04:44:35 +03:00
Alexey Milovidov
f3bb24a3bf Better semantic of sharing columns: development [#CLICKHOUSE-2]. 2017-12-14 04:43:19 +03:00
Alexey Milovidov
9cc424b4b5 Fixed error: loading "preprocessed" files if dictionary/model config was specified with glob [#CLICKHOUSE-3501]. 2017-12-13 23:21:03 +03:00
Alexey Milovidov
819287b697 Better semantic of sharing columns: development [#CLICKHOUSE-2]. 2017-12-13 04:27:53 +03:00
Alexey Milovidov
524d98c7fc More strict semantic on sharing columns (development) [#CLICKHOUSE-2]. 2017-12-11 05:59:56 +03:00
Alexey Milovidov
254030d6c3 Cleanup semantics of data types [#CLICKHOUSE-2]. 2017-12-09 19:17:37 +03:00
Alexey Milovidov
3def5f03f5 Cleanup semantics of data types [#CLICKHOUSE-2]. 2017-12-09 19:17:37 +03:00
Alexey Milovidov
7f6c48d5de Cleanup semantics of data types [#CLICKHOUSE-2]. 2017-12-09 19:17:37 +03:00
Alexey Milovidov
00a7209607 Simplification of Nullable [#CLICKHOUSE-2] 2017-12-08 04:34:52 +03:00
Alexey Milovidov
2c1d7ad343 Simplification of Nullable [#CLICKHOUSE-2] 2017-12-07 03:31:46 +03:00
Alexey Milovidov
9996e15458 Allow to use values of AggregateFunction data type in groupArray aggregate function [#CLICKHOUSE-3485]. 2017-12-06 06:10:32 +03:00
Alexey Milovidov
5bb326de61 Allow to use values of AggregateFunction data type in groupArray aggregate function (incomplete) [#CLICKHOUSE-3485]. 2017-12-06 00:25:01 +03:00
Alexey Milovidov
2e652ffa1e Removed hopscotch hash (was used only in single test) [#CLICKHOUSE-2]. 2017-12-02 06:28:00 +03:00
Alexey Milovidov
668d88a359 Better [#CLICKHOUSE-2]. 2017-12-02 06:22:51 +03:00
Alexey Milovidov
d091789a09 Better [#CLICKHOUSE-2]. 2017-12-02 05:58:25 +03:00
Alexey Milovidov
c748493a86 Better [#CLICKHOUSE-2]. 2017-12-02 05:47:12 +03:00
Alexey Milovidov
d932d615e7 Merge branch 'master' of github.com:yandex/ClickHouse 2017-12-02 02:14:59 +03:00
Alexey Milovidov
790bda3b9a Whitespace [#CLICKHOUSE-2]. 2017-12-02 02:14:53 +03:00
Alexey Milovidov
54e601019c Better [#CLICKHOUSE-2]. 2017-12-02 00:40:58 +03:00
Alexey Milovidov
431da20d99 Better [#CLICKHOUSE-2]. 2017-12-01 23:21:35 +03:00
Alexey Milovidov
bdd25b15bd Better [#CLICKHOUSE-2]. 2017-12-01 22:34:51 +03:00
Alexey Milovidov
1a6cb2989b Better [#CLICKHOUSE-2]. 2017-12-01 21:36:55 +03:00
Alexey Milovidov
f5ecb2db5d Better [#CLICKHOUSE-2]. 2017-12-01 20:49:12 +03:00
alexey-milovidov
0ac2f5b479
Merge pull request #1559 from rlipovsky/geodata
[clickhouse-yt] separate geo dictionaries from data providers
2017-12-01 19:54:08 +03:00
alexey-milovidov
09f030a3ee
Merge branch 'master' into data_parts_multi_index 2017-12-01 19:53:04 +03:00
alexey-milovidov
66fdecf6ec
Merge branch 'master' into geodata 2017-12-01 19:25:27 +03:00
Vitaliy Lyudvichenko
b738d1baed Add multi index for data_parts storage. And fixed bugs. [#CLICKHOUSE-3452]
Fixed handling of obsolete parts.
Fixed conflict resolution between simultaneous PreCommitted covering parts.
Fixed memory leak caused by ordinary MergeTree parts stucked in Deleting state.
Added hidden _state column into system.parts.
2017-11-29 14:25:11 +03:00
Roman Lipovsky
9ed1ba2441 separate geo dictionaries from geo data providers 2017-11-29 01:15:06 +03:00
Alexey Milovidov
95d33b3e65 Merge remote-tracking branch 'origin/master' into unify-data-types-that-serialized-with-multiple-streams 2017-11-27 22:33:38 +03:00
alexey-milovidov
33ddc5e0f5 Update ConfigProcessor.cpp 2017-11-25 02:00:10 +03:00
Alexey Vasiliev
a6ee2125a4 ConfigProcessor: explicit ctor [#MOBMET-7044] 2017-11-25 02:00:10 +03:00
Alexey Vasiliev
6cb97b9221 ConfigProcessor: do not create config-preprocessed before setting umask [#MOBMET-7044] 2017-11-25 02:00:10 +03:00
proller
827a5d0612 Fix warnings-errors in gtest 2017-11-24 23:40:14 +03:00
proller
0d3c4f4d67 Core/FieldVisitors.h -> Common/FieldVisitors.h
Core/Progress.h -> IO/Progress.h
    tests: sudo --non-interactive
    Fix freebsd link
2017-11-24 16:55:31 +03:00
Alexey Milovidov
f3b0f17d50 Merge remote-tracking branch 'origin/master' into unify-data-types-that-serialized-with-multiple-streams 2017-11-22 22:02:24 +03:00
proller
875ef9b5cf Fix allocator test 2017-11-22 17:54:12 +03:00
Alexey Milovidov
f9cd1e7afc Merge remote-tracking branch 'origin/master' into unify-data-types-that-serialized-with-multiple-streams 2017-11-21 23:10:58 +03:00
proller
411202d5ad Zlib: as submodule, fix compile options; config: add logger options: logger.flush logger.rotateOnOpen 2017-11-21 23:10:37 +03:00
Alexey Milovidov
4aa520e7be Merge remote-tracking branch 'origin/master' into unify-data-types-that-serialized-with-multiple-streams 2017-11-21 22:40:59 +03:00
proller
2778f35e48 Lib Parsers 2017-11-21 22:35:54 +03:00
Alexey Milovidov
2fd17a3072 Fixed linking [#CLICKHOUSE-2]. 2017-11-20 09:01:05 +03:00
Alexey Milovidov
07d594c505 Fixed linking [#CLICKHOUSE-2]. 2017-11-20 08:59:58 +03:00
Alexey Milovidov
3b5f82000c Fixed linking [#CLICKHOUSE-2]. 2017-11-20 08:22:54 +03:00
Alexey Milovidov
3403f68c3f Fixed linking [#CLICKHOUSE-2]. 2017-11-20 08:21:50 +03:00
Alexey Milovidov
e340511931 Removed useless code [#CLICKHOUSE-2]. 2017-11-20 07:22:21 +03:00
Alexey Milovidov
a7d4fef0d2 Removed useless code [#CLICKHOUSE-2]. 2017-11-20 07:21:14 +03:00
Alexey Milovidov
b3f6844171 Merge remote-tracking branch 'origin/master' into unify-data-types-that-serialized-with-multiple-streams 2017-11-20 07:18:37 +03:00
Alexey Milovidov
01e8adbfff Removed "experimental" namespace [#CLICKHOUSE-2]. 2017-11-20 07:15:43 +03:00
Alexey Milovidov
2ca6952deb Merge branch 'master' into unify-data-types-that-serialized-with-multiple-streams 2017-11-20 02:16:18 +03:00
Alexey Milovidov
60825748d4 Merge branch 'fix11' of https://github.com/proller/ClickHouse into proller-fix11 2017-11-19 22:57:28 +03:00
Alexey Milovidov
c0321ce752 BackgroundSchedulePool: miscellaneous [#CLICKHOUSE-2]. 2017-11-19 03:59:57 +03:00
Alexey Milovidov
9b92c0fecd BackgroundSchedulePool: miscellaneous [#CLICKHOUSE-2]. 2017-11-19 03:22:13 +03:00
Alexey Milovidov
f497b0c63c BackgroundSchedulePool: miscellaneous; added TODO [#CLICKHOUSE-2]. 2017-11-19 03:08:37 +03:00
Alexey Milovidov
69714f0671 BackgroundSchedulePool: miscellaneous [#CLICKHOUSE-2]. 2017-11-19 02:55:53 +03:00
Alexey Milovidov
dfb4a92f5a BackgroundSchedulePool: miscellaneous [#CLICKHOUSE-2]. 2017-11-19 02:47:39 +03:00
Silviu Caragea
dfecd0b2f2 Merge with master 2017-11-18 10:16:06 +02:00
Alexey Milovidov
729b114c15 Removed unsupported functionality [#CLICKHOUSE-2]. 2017-11-18 05:34:00 +03:00
Alexey Milovidov
076e0ae014 More clear [#CLICKHOUSE-2]. 2017-11-18 00:20:28 +03:00
Alexey Milovidov
8425c56c0f Fixed wrong logic [#CLICKHOUSE-2]. 2017-11-18 00:00:29 +03:00
Alexey Milovidov
7cf5eaddc0 Fixed wrong logic [#CLICKHOUSE-2]. 2017-11-17 23:59:31 +03:00
Alexey Milovidov
4f8009517c Thread name can be 15 bytes max [#CLICKHOUSE-2]. 2017-11-17 23:57:07 +03:00
Alexey Milovidov
f54e99490f Merge branch 'master' into silviucpp-replicated_merge_tree_thread_pool 2017-11-17 23:48:16 +03:00
Alexey Milovidov
8e362ba641 Fixed build [#CLICKHOUSE-2]. 2017-11-17 23:48:00 +03:00
Alexey Milovidov
7c9ba15ba1 Style [#CLICKHOUSE-2]. 2017-11-17 23:42:03 +03:00
Alexey Milovidov
18be706127 Merge remote-tracking branch 'origin/master' into silviucpp-replicated_merge_tree_thread_pool 2017-11-17 23:30:51 +03:00
proller
5190325275 Allocator fix: nothing do when sizes equal, allow reallocate to smaller size (#1512)
* PerformanceTest fixes.

* format

* Allocator fix: nothing do when sizes equal, allow reallocate to smaller size

* Update Allocator.cpp
2017-11-17 23:27:12 +03:00
Alexey Milovidov
9264bc4013 Style [#CLICKHOUSE-2]. 2017-11-17 23:18:06 +03:00
Alexey Milovidov
4ab2d4bc31 Added comment [#CLICKHOUSE-2]. 2017-11-17 22:49:17 +03:00
Alexey Milovidov
263e262413 Style [#CLICKHOUSE-2]. 2017-11-17 22:43:25 +03:00
proller
5ba7e20c03 fixes 2017-11-17 22:40:27 +03:00
proller
aa3dd03389 Split lib dbms to dbms + dbms_common_io 2017-11-17 22:19:49 +03:00
Silviu Caragea
64619c614f Basic idea is :
- We add BackgroundSchedulePool which can execute a function at a specific point in time. Basically all tasks are added in a queue and precessed by worker threads.
- The most important difference between this and BackgroundProcessingPool is that we have the guarantee that the same function is not executed from many workers in the same time
- Each of the following classes instead starting a thread will register a task in BackgroundSchedulePool and when they need to run will call schedule or scheduleAfter(duration) functions

This commit is moving all threads created by ReplicatedMergeTree to BackgroundSchedulePool tasks

NOTE: I did a minimum number of changes to be much simple to review the code
2017-11-17 10:58:35 +02:00
proller
fa65bdcf48 Fix realloc on freebsd and macos (#1494) 2017-11-16 22:17:09 +03:00
proller
339424f5ea Fix realloc on freebsd and macos 2017-11-16 14:27:31 +03:00
Marek Vavruša
ba82b20cbe MemoryTracker: fixed build with clang 9.0.0 not properly supporting thread_local
This fixes #1488.

XCode 9.0 added support for C++11 thread_local:
https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html

The 443088ce31 replaced __thread with C++11 thread_local, which
broke the compilation for this platform with an error on link time.

I can't reproduce this with a minimal example yet.
2017-11-15 23:32:31 +03:00
Alexey Zatelepin
3ffb239185 add ZooKeeper::asyncTryRemove() [#CLICKHOUSE-3208] 2017-11-15 23:13:10 +03:00
alexey-milovidov
9b18c6cb76
Embedded compiler (#1484)
* Embedded compiler: development [#CLICKHOUSE-3396].

* Embedded compiler: development [#CLICKHOUSE-3396].

* Embedded compiler: development [#CLICKHOUSE-3396].

* Embedded compiler: development [#CLICKHOUSE-3396].

* Embedded compiler: development [#CLICKHOUSE-3396].

* Embedded compiler: development [#CLICKHOUSE-3396].

* Embedded compiler: development [#CLICKHOUSE-3396].

* Embedded compiler: development [#CLICKHOUSE-3396].

* Embedded compiler: development [#CLICKHOUSE-3396].

* Embedded compiler: development [#CLICKHOUSE-3396].

* Embedded compiler: development [#CLICKHOUSE-3396].
2017-11-12 15:58:40 +03:00
Иванов Евгений
e846d62410 Added support UUID type for distinct, uniq* functions and joins 2017-11-12 04:07:05 +03:00
Alexey Milovidov
a3fa44e71a Miscellaneous [#CLICKHOUSE-2]. 2017-11-12 03:46:22 +03:00
Silviu Caragea
b4f7bfaa02 Remove duplicate code from zookeeper.cpp 2017-11-11 03:36:29 +03:00
Alexey Milovidov
4e04c4da5f Attempt to change ext::shared_ptr_helper (incomplete) [#CLICKHOUSE-2]. 2017-11-04 06:56:31 +03:00
KochetovNicolai
bfb4e8f3fe zookeeper chroot fix (#1430)
* added root and identity section to zookeeper configuration [#CLICKHOUSE-3031]

* added root and identity section to zookeeper configuration [#CLICKHOUSE-3031]

* moved root section in zookeeper configuration [#CLICKHOUSE-3031]

* fixed root section in zookeeper configuration [#CLICKHOUSE-3031]

* added tests [#CLICKHOUSE-3031]

* replaced tabs to spaces in config files [#CLICKHOUSE-3031]

* fix build [#CLICKHOUSE-3031]

* added chech that root starts with '/' in zookeeper config file [#CLICKHOUSE-3031]

* added comments [#CLICKHOUSE-3031]

* Check if zookeeper chroot exists before start. Remove tailing slash form chroot. [#CLICKHOUSE-3400]

* added starting '/' to zookeeper path in ReplicatedMergeTree
2017-11-02 01:59:27 +03:00
Marek Vavruša
0d942a69c5 DataStreams: added Cap’n Proto format support
Cap'n Proto is a binary message format.
Like Protocol Buffers and Thrift (but unlike JSON or MessagePack), Cap'n Proto messages are strongly-typed and not self-describing. Due to this, it requires a schema setting to specify schema file and the root object. The schema is parsed on runtime and cached for each SQL statement.
2017-10-27 23:03:51 +03:00
alexey-milovidov
3b99b723d7
Merge pull request #1245 from yandex/CLICKHOUSE-3178
Atomic parts addition and removing
2017-10-27 23:03:33 +03:00
proller
4dd1634772 Print sizes in memory errors (#1413)
* Print sizes in memory errors

* use formatReadableSizeWithBinarySuffix

* Fix

* Requested changes

* fix alignment message
2017-10-27 22:18:39 +03:00
Alexey Milovidov
1d8dc11f40 Fixed one of errors that cause abort when no space left on device with logs (now useless, as ClickHouse will instead refuse all connections) [#CLICKHOUSE-2] 2017-10-27 20:24:33 +03:00
Vitaliy Lyudvichenko
71833a7f0f More correct procedure of parts deleting. [#CLICKHOUSE-3178] 2017-10-26 17:16:06 +03:00
Alexey Milovidov
2cc3fdae9b Useless modifications for cppcheck [#CLICKHOUSE-2]. 2017-10-26 04:47:03 +03:00
proller
4ffbca2d8c Fix warnings (#1406)
* Log query id in executeQuery; Better type mismatch error; change format in report tool

* Better log query_id

* fix message

* Use c++11 thread_local instaed of gcc's __thread

* lock mutex before notifying waiting thread in sync insertion into distributed [#CLICKHOUSE-3379]

* Cmake: fix build without downloaded submodules (#1379)

* fix

* ZooKeeper: fixed stack smashing with tryGet()

The tryGet() operation creates a 1MB buffer on stack. This may or
may not work depending on the default stack size for threads,
whether the stack protector is enabled or not, recursion depth,
and the actual value size.

This is probably going to slow down some ZK operations, but I don't
see how else this could work reliably with the existing API.

* increased timeout for test_insertion_sync_fails_with_timeout

* Update CHANGELOG_RU.md

* Update ZooKeeper.cpp

* Fix warnings

* Fixes

* Dont strip debug info from  asan, tsan and other builds except releases

* Fix asan error causd by test 00144

* Fix empty log message (#CLICKHOUSE-3378)
2017-10-25 21:39:10 +03:00
alexey-milovidov
8c327e9378 Revert "Make gperftools (libtcmalloc) as submodule and update. (#1381)"
This reverts commit fa2484ea90.
2017-10-24 22:18:15 +03:00
proller
fa2484ea90 Make gperftools (libtcmalloc) as submodule and update. (#1381)
* Update tcmalloc and make submodule

* wip

* wip

* wip

* wip

* clean

* fix

* fix

* fix

* Fix tests
2017-10-24 22:11:42 +03:00
Alexey Milovidov
d77686685a Using PODArray instead of std::vector in ZooKeeper library [#CLICKHOUSE-2]. 2017-10-23 18:08:31 +03:00
alexey-milovidov
91aa0713e5 Merge pull request #1371 from vavrusa/fix-zookeeper-stack-smashing
ZooKeeper: fixed stack smashing with tryGet()
2017-10-23 17:40:12 +03:00
alexey-milovidov
4f86ec9d58 Update ZooKeeper.cpp 2017-10-23 17:39:29 +03:00
alexey-milovidov
c5b5f2b4f8 Merge pull request #1374 from proller/fix4
Use c++11 thread_local instead of gcc's __thread
2017-10-22 12:43:11 +03:00
proller
8dd5c9dac2 Cmake: fix build without downloaded submodules (#1379) 2017-10-20 20:59:44 +03:00
proller
443088ce31 Use c++11 thread_local instaed of gcc's __thread 2017-10-19 22:36:37 +03:00
Marek Vavruša
e2a8526990 ZooKeeper: fixed stack smashing with tryGet()
The tryGet() operation creates a 1MB buffer on stack. This may or
may not work depending on the default stack size for threads,
whether the stack protector is enabled or not, recursion depth,
and the actual value size.

This is probably going to slow down some ZK operations, but I don't
see how else this could work reliably with the existing API.
2017-10-18 15:13:42 -07:00
Marek Vavruša
70543200be dbms: Fix build with clang after Poco update
In the current version of Poco, unsigned long no longer aliases to
UInt64 with LP64. The size_t aliases to unsigned long with clang,
so all the uses of size_t instead of UInt64 when interacting with
Poco interfaces are gone. I replaced uses with UInt64 where it makes
sense, and added an overloaded function for readVarUInt() to support size_t.
2017-10-13 18:26:24 -07:00
Marek Vavruša
2ac5a743cc dbms: fix build with OS X built-in clang
The built-in clang doesn’t support value() for
`std::experimental::optional`. It however supports
dereference operator, which is basically the
same thing:

```
/clickhouse/dbms/src/DataStreams/NullableAdapterBlockInputStream.cpp:83:67: error: call to unavailable member function 'value':
                    res.insert({elem.column, elem.type, rename[i].value()});
                                                        ~~~~~~~~~~^~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/experimental/optional:547:17: note: candidate function has been explicitly made unavailable
    value_type& value()
                ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/experimental/optional:539:33: note: candidate function has been explicitly made unavailable
    constexpr value_type const& value() const
```
2017-10-13 18:12:29 -07:00
proller
4c7850fdc2 Optional kafka (#1355)
* Zookeeper include fix

* Update submodule contrib/poco

* Fix zookeeper submodule ho-to-make doc

* Update zookeeper submodule

* Update submodule zookeeper

* Fix compile with external zookeeper

* Optional kafka

* fix

* Fix

* fix
2017-10-14 03:53:01 +03:00
Alexey Milovidov
f42c6014ce Merge branch 'master' of github.com:yandex/ClickHouse 2017-10-14 02:06:11 +03:00
proller
20329ce794 Zookeeper include fix (#1353) 2017-10-13 23:30:55 +03:00
proller
49f8080e52 Small debud improvement 2017-10-13 21:44:26 +03:00
Alexey Milovidov
0ec218a853 Merge branch 'master' of github.com:yandex/ClickHouse 2017-10-13 04:09:51 +03:00
Alexey Milovidov
3a6705af0f Improvement [#CLICKHOUSE-2]. 2017-10-12 23:34:01 +03:00
alexey-milovidov
b7c1076df2 Update ActionBlocker.h 2017-10-12 23:26:54 +03:00
alexey-milovidov
96b603a023 Update ActionBlocker.h 2017-10-12 23:26:54 +03:00
Vitaliy Lyudvichenko
62ea1133dd Disable part sendings and fetches before ALTER. [#CLICKHOUSE-3343] 2017-10-12 23:26:54 +03:00
alexey-milovidov
44e6ecfe78 Update ShellCommand.cpp 2017-10-12 22:36:27 +03:00
proller
1505ad6bac Executable dictionaries: fail if program returns non zero exit code (#CLICKHOUSE-3171) 2017-10-12 22:36:27 +03:00
Vitaliy Lyudvichenko
18af75a4f1 Add metrics for RWLockFIFO. [#CLICKHOUSE-3246] 2017-10-12 22:32:31 +03:00
Alexey Milovidov
1405415f94 Miscellaneous [#CLICKHOUSE-3]. 2017-10-09 01:53:38 +03:00
Marek Vavruša
28bb5e25cf AggregateFunctionTopK: read alphaMap for generic
* the alpha_map vector always (de)serialises
  the actual version (could empty sometimes)
* AggregateFunctionTopK generic variant deserialises
  it as well instead of ignoring it
* AggregateFunctionTopK generic variant clears the
  array before deserialising

refs #1283
2017-10-09 01:12:38 +03:00
Alexey Zatelepin
68cb592277 allow arbitrary partition literals in ALTER PARTITION queries [#CLICKHOUSE-3000] 2017-09-26 20:40:02 +03:00
KochetovNicolai
e0efb7e8c1 Point in polygon (#1264)
* added FunctionPointInPolygonWithGrid [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix PointInPolygonWithGrid [#CLICKHOUSE-3201]

* fix PointInPolygonWithGrid [#CLICKHOUSE-3201]

* fix PointInPolygonWithGrid [#CLICKHOUSE-3201]

* fix PointInPolygonWithGrid [#CLICKHOUSE-3201]

* added test for PointInPolygonWithGrid [#CLICKHOUSE-3201]

* added test for PointInPolygonWithGrid with holes [#CLICKHOUSE-3201]

* added arbitrary orientation for polygons in PointInPolygonWithGrid [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix arbitrary orientation for polygons in PointInPolygonWithGrid [#CLICKHOUSE-3201]

* added test for arbitrary orientation for polygons in PointInPolygonWithGrid [#CLICKHOUSE-3201]

* fixed shifted grid for PointInPolygonWithGrid, added test [CLICKHOUSE-3201]

* expand box for complex polygons in PointInPolygonWithGrid [#CLICKHOUSE-3201]

* fixed build [#CLICKHOUSE-3201]

* fix expand box for complex polygons in PointInPolygonWithGrid [#CLICKHOUSE-3201]

* added pool to PointInPolygonWithGrid [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* changed FunctionPointInPolygonWithGrid signature [#CLICKHOUSE-3201]

* changed FunctionPointInPolygonWithGrid signature [#CLICKHOUSE-3201]

* fixed test [#CLICKHOUSE-3201]

* unified signature for PointInPolygon [#CLICKHOUSE-3201]

* fixed build [#CLICKHOUSE-3201]

* fixed build [#CLICKHOUSE-3201]

* fixed build [#CLICKHOUSE-3201]

* fixed build [#CLICKHOUSE-3201]

* fixed build [#CLICKHOUSE-3201]

* fixed build [#CLICKHOUSE-3201]

* fixed build [#CLICKHOUSE-3201]

* fixed build [#CLICKHOUSE-3201]

* fixed build [#CLICKHOUSE-3201]

* fixed build [#CLICKHOUSE-3201]

* fixed build [#CLICKHOUSE-3201]

* fixed build [#CLICKHOUSE-3201]

* supported Float64 for pointInPolygon [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fix build [#CLICKHOUSE-3201]

* fixed check for numeric tuple in PointInPolygon function [#CLICKHOUSE-3201]

* fixed build [#CLICKHOUSE-3201]

* fixed build [#CLICKHOUSE-3201]

* added profile events polygons pool [#CLICKHOUSE-3201]

* fixed build [#CLICKHOUSE-3201]

* fixed build [#CLICKHOUSE-3201]

* Update FunctionsGeo.cpp
2017-09-20 05:30:44 +03:00
proller
0a0e04f1a5 Fix includes 2017-09-18 21:52:47 +03:00
Alexey Milovidov
bc622c4c45 Better [#CLICKHOUSE-2]. 2017-09-17 03:13:26 +03:00
Alexey Milovidov
86c46ad1bd Unification [#CLICKHOUSE-2]. 2017-09-15 15:16:12 +03:00
Alexey Milovidov
5e25c40a26 Fixed error found by Coverity [#CLICKHOUSE-2]. 2017-09-14 07:24:20 +03:00
Alexey Milovidov
9a58e26b8c Added comment [#CLICKHOUSE-2]. 2017-09-13 00:06:11 +03:00
Vadim Skipin
7576cb2c18 fix LRU cache definition 2017-09-11 14:41:47 +03:00
Alexey Milovidov
cd540c2674 Replaced Mersenne Twister to PCG-Random [#CLICKHOUSE-2]. 2017-09-10 02:17:38 +03:00
Alexey Milovidov
253893bf4d Fixed insignificant error, shown by TSan [#CLICKHOUSE-2]. 2017-09-09 07:06:54 +03:00
Alexey Milovidov
5a8f45c131 Fixed insignificant error, shown by TSan [#CLICKHOUSE-2]. 2017-09-09 06:46:18 +03:00
Alexey Milovidov
dc4976f562 Implemented some suggestions from clang-tidy (part 8) [#CLICKHOUSE-3301]. 2017-09-08 07:58:57 +03:00
Alexey Milovidov
71d29acdfb Implemented some suggestions from clang-tidy (part 7) [#CLICKHOUSE-3301]. 2017-09-08 07:43:57 +03:00