Commit Graph

2034 Commits

Author SHA1 Message Date
Vitaliy Lyudvichenko
bc9ee54985 Don't throw exception in case of clearing empty part. [#CLICKHOUSE-2896] 2017-07-24 18:04:17 +03:00
Nikolai Kochetov
b55dcc9f93 cnanged comments; fixed 00443_preferred_block_size_bytes test 2017-07-24 16:59:03 +03:00
Alexey Milovidov
1e8547b3f6 Fixed regression [#CLICKHOUSE-3148]. 2017-07-21 23:59:01 +03:00
Nikolai Kochetov
10bbededb0 merged with master 2017-07-21 21:10:14 +03:00
Nikolai Kochetov
bc0921a64e added comments 2017-07-21 21:02:02 +03:00
Alexey Zatelepin
c939d2f96e put Distributed inserts with different block structure into different batches [#CLICKHOUSE-3163] 2017-07-21 20:55:38 +03:00
Nikolai Kochetov
ca1957ab82 ignore preferred_max_column_in_block_size_bytes if zero [#CLICKHOUSE-3170] 2017-07-21 20:54:09 +03:00
Nikolai Kochetov
cc349b410e set min block size as index granularity for max_block_size limit during reading [#CLICKHOUSE-3170] 2017-07-21 20:54:09 +03:00
Nikolai Kochetov
c64b65ee29 ignore preferred_max_column_in_block_size_bytes if zero [#CLICKHOUSE-3170] 2017-07-21 20:45:51 +03:00
Nikolai Kochetov
755d16b22d set min block size as index granularity for max_block_size limit during reading [#CLICKHOUSE-3170] 2017-07-21 14:55:33 +03:00
Alexey Milovidov
c7b1e92522 Fixed error after merge [#CLICKHOUSE-3150]. 2017-07-21 09:40:05 +03:00
alexey-milovidov
d4d266fa18 ColumnConst unification (#1011)
* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* Fixed error in ColumnArray::replicateGeneric [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].
2017-07-21 09:35:58 +03:00
alexey-milovidov
1a1112d8bb Update MergeTreeBlockReadUtils.h 2017-07-20 23:45:23 +03:00
Nikolai Kochetov
0b7439469d fixed MergeTreeBlockSizePredictor initialization for sample block 2017-07-20 23:45:23 +03:00
Nikolai Kochetov
00ae32c946 renamed approximate_number_of_rows_in_part to number_of_rows_in_part 2017-07-20 23:45:23 +03:00
Nikolai Kochetov
e612152584 changed initialization in MergeTreeBlockSizePredictor 2017-07-20 23:45:23 +03:00
Nikolai Kochetov
2afd84c40c fixed is_reading_finished status assignment in MergeTreeRangeReader [#CLICKHOUSE-3161] 2017-07-19 19:39:18 +03:00
Nikolai Kochetov
b5e94ede62 fixed is_reading_finished status assignment in MergeTreeRangeReader [#CLICKHOUSE-3161] 2017-07-19 16:44:46 +03:00
Alexey Milovidov
6e6e9f9d38 Removed useless variable [#CLICKHOUSE-3161]. 2017-07-19 04:05:39 +03:00
Nikolai Kochetov
7e293df9af merged with master 2017-07-17 22:48:22 +03:00
Nikolai Kochetov
eae94edd6b fixed vertical merge for ReplacingSortedBlockInputStream [#CLICKHOUSE-3131] 2017-07-17 22:40:30 +03:00
Alexey Milovidov
5c3ca0c16e Inverted dependency in DataTypeFactory [#CLICKHOUSE-3149]. 2017-07-16 07:11:11 +03:00
Alexey Milovidov
17786c0e6d Added missing file [#CLICKHOUSE-3148]. 2017-07-15 07:06:51 +03:00
Alexey Milovidov
9406b6a5aa Get rid of ASTSet, because it is not really an AST and it lead to bugs [#CLICKHOUSE-3148]. 2017-07-15 06:48:36 +03:00
Nikolai Kochetov
a13423e552 added vertical merge for ReplacingSortedBlockInputStream 2017-07-14 21:17:23 +03:00
Alexey Milovidov
1a0f5dd7cf Getting rid of ASTSet (incomplete) [#CLICKHOUSE-2] 2017-07-14 03:33:37 +03:00
Nikolai Kochetov
283810e8ab merged with master 2017-07-13 23:59:34 +03:00
Nikolai Kochetov
75be0b81d8 removed typeid_cast from IColumn.h 2017-07-13 23:58:19 +03:00
Nikolai Kochetov
210f14aaba renamed IDataType::updateAvgValueSizeHints to IDataType::updateAvgValueSizeHint 2017-07-13 21:54:17 +03:00
Nikolai Kochetov
f3f217b40a fixed tests 2017-07-13 21:45:09 +03:00
Nikolai Kochetov
546012079c fixed reading with zero max block size setting 2017-07-13 21:45:09 +03:00
Nikolai Kochetov
e2d032b883 fixed reading with zero max block size setting 2017-07-13 21:45:09 +03:00
Nikolai Kochetov
8ea812e669 better comment for MergeTreeRangeReader 2017-07-13 21:45:09 +03:00
Nikolai Kochetov
f232afd2f8 round number of rows to nearest mark in MergeTreeBaseBlockInputStream 2017-07-13 21:45:09 +03:00
Nikolai Kochetov
f1775af3f0 deleted commented code 2017-07-13 21:45:09 +03:00
Nikolai Kochetov
30ed774bf7 refactoring and more comments in MergeTreeBaseBlockInputStream [#CLICKHOUSE-3065] 2017-07-13 21:45:09 +03:00
Nikolai Kochetov
89386394aa refactoring and more comments in MergeTreeBaseBlockInputStream [#CLICKHOUSE-3065] 2017-07-13 21:45:09 +03:00
Nikolai Kochetov
8c65d6013e added preferred_max_column_in_block_size_bytes setting, added filtration ratio prediction [#CLICKHOUSE-3065] 2017-07-13 21:45:09 +03:00
Nikolai Kochetov
4470afc9a9 added estimateNumRowsMax to MergeTreeBlockSizePredictor based on max column size 2017-07-13 21:45:09 +03:00
Nikolai Kochetov
6b29b3bd47 round number of rows to next mark in MergeTreeBaseBlockInputStream 2017-07-13 21:45:09 +03:00
Nikolai Kochetov
d14f64af7b delected commented logging code 2017-07-13 21:45:09 +03:00
Nikolai Kochetov
586dff9126 delay reading for granulas if prewhere column is false during partial granula reading 2017-07-13 21:45:09 +03:00
Nikolai Kochetov
86680f5513 fixed partial granula reading for const columns in prewhere 2017-07-13 21:45:09 +03:00
Nikolai Kochetov
609711b20c partial part reading with prewhere 2017-07-13 21:45:09 +03:00
Nikolai Kochetov
c6d5ef6d30 added MergeTreeRangeReader 2017-07-13 21:45:09 +03:00
Nikolai Kochetov
985e449bd3 added IDataType::updateAvgValueSizeHints; renamed PODArray::allocated_size to PODArray::allocated_bytes; renamed renamed IColumn::allocatedSize to IColumn::allocatedBytes; removed IColumn.h from IDataType.h 2017-07-13 19:49:09 +03:00
Alexey Milovidov
7068d1ff81 Using lexer (incomplete) [#CLICKHOUSE-2]. 2017-07-13 08:59:01 +03:00
Alexey Milovidov
de75fa000b Using lexer (incomplete) [#CLICKHOUSE-2]. 2017-07-13 08:59:01 +03:00
Alexey Milovidov
83c8043193 Using lexer (incomplete) [#CLICKHOUSE-2]. 2017-07-13 08:59:01 +03:00
Alexey Milovidov
1bab7fc344 Using lexer (incomplete) [#CLICKHOUSE-2]. 2017-07-13 08:59:01 +03:00
Alexey Milovidov
4b1eeee1a3 Using lexer (incomplete) [#CLICKHOUSE-2]. 2017-07-13 08:59:01 +03:00
Alexey Milovidov
5b5795633e Using lexer (incomplete) [#CLICKHOUSE-2]. 2017-07-13 08:59:01 +03:00
Nikolai Kochetov
1cf669cc0a made collectIdentifiersInFirstLevelOfSelectQuery static 2017-07-12 21:51:51 +03:00
Nikolai Kochetov
5ed5e8c75d moved getRequestedColumns to StorageMerge::collectIdentifiersInFirstLevelOfSelectQuery 2017-07-12 21:51:51 +03:00
Nikolai Kochetov
5924b13f4c fixed unnecessary columns removing for merge table on distibuted 2017-07-12 21:51:51 +03:00
Alexey Zatelepin
58d541b740 slightly more robust ReplicatedMergeTreePartCheckThread::TemporarilyStop [#CLICKHOUSE-3074] 2017-07-12 20:09:44 +03:00
Alexey Zatelepin
bdc529645e fix cyclical yielding of leadership at startup [#CLICKHOUSE-3074] 2017-07-12 20:09:44 +03:00
Vitaliy Lyudvichenko
b843ea5b3f Resolves #964. Fixed input_format_skip_unknown_fields for negative numbers. [#CLICKHOUSE-3] 2017-07-11 21:36:51 +03:00
Nikolai Kochetov
ee66169d5e added throw_if_column_not_found to FilterColumnsBlockInputStream [#CLICKHOUSE-3111] 2017-07-11 20:58:49 +03:00
Alexey Zatelepin
57ba50f585 allow batching Distributed inserts [#CLICKHOUSE-3126] 2017-07-11 20:56:17 +03:00
Alexey Zatelepin
4a98d83a3b introduce replicated_can_become_leader merge_tree setting [#CLICKHOUSE-3109] 2017-07-11 20:44:35 +03:00
Alexey Milovidov
2bd84600d1 Miscellaneous [#CLICKHOUSE-2]. 2017-07-11 04:20:40 +03:00
Alexey Milovidov
86eb4d2d06 Renamed Singleton to avoid conflicts with Arcadia* codebase [#DEVTOOLS-3343].
* - "Arcadia" is the name of Yandex's monorepo.
2017-07-10 07:34:14 +03:00
alexey-milovidov
b64b243a73 Merge pull request #945 from YiuRULE/master
Implement natively uuid type in Clickhouse
2017-07-10 07:00:45 +03:00
Alexey Milovidov
119961133c Removed obsolete test [#CLICKHOUSE-3]. 2017-07-10 06:47:20 +03:00
Alexey Milovidov
bf58b8cdb1 Fixed test [#CLICKHOUSE-3]. 2017-07-10 06:45:04 +03:00
Alexey Zatelepin
89939a685a Stream row sources from disk for vertical merge [#CLICKHOUSE-3118] 2017-07-09 21:57:06 +03:00
Marek Vavruša
ff73394124 PKCondition: infer index use with pk subexpression
By default only constraints explicitly matching
primary key expression (or expression wrapped in
a monotonic function) are eligible for part and
range selection. So for example, if index is:

(toStartOfHour(dt), UserID)

Then a query such as this resorts to full scan:

SELECT count() FROM t WHERE dt = now()

Intuitively, only parts with toStartOfHour(now())
could be selected, but it is less trivial to prove.
The primary key currently can be wrapped in a chain
of monotonic functions, so following would work:

toStartOfHour(dt) = toStartOfHour(now()) AND dt = now()

It must be however explicitly stated, if we wanted
to infer that we’d have to know the inverse function,
and prove that the inverse function is monotonic
on given interval. This is not practical as
there is no inverse function that for example undos
rounding, it isn’t strictly monotonic.

There are however functions that don’t transform
output range and preserve monotonicity on the
complete input range, such as rounding or casts
to a same or wider numeric type. This eliminates
the need to find inverse function, as no check for monotonicity over arbitrary interval is needed,
and thus makes this optimisation possible.
2017-07-09 17:13:51 +03:00
Nikolai Kochetov
f1ec4cd863 added FilterColumnsBlockInputStream into StorageMerge [#CLICKHOUSE-3111] 2017-07-05 20:14:17 +03:00
Alexey Milovidov
66638c4158 Fixed error in StorageDictionary [#CLICKHOUSE-2]. 2017-07-05 19:36:45 +03:00
Guillaume Tassery
aeeb81fadf Rename field in UInt128 2017-07-04 18:10:36 +02:00
Alexey Milovidov
032d12d431 Fixed translation error [#CLICKHOUSE-2]. 2017-07-04 15:46:31 +03:00
Guillaume Tassery
cba9815981 Change Uuid to UUID datatype and make UInt128 a generic type 2017-07-04 12:42:53 +02:00
Alexey Milovidov
727ce48c23 Fixed error with selecting number of threads for distributed query processing [#CLICKHOUSE-3115]. 2017-07-04 00:04:10 +03:00
Guillaume Tassery
525851ec68 sync master 2017-06-30 22:21:42 +02:00
Guillaume Tassery
1231952fca Implement UUID type and toUuid function 2017-06-30 22:01:27 +02:00
Alexey Zatelepin
9de4d8facb allow loading missing setting from config [#CLICKHOUSE-3091] 2017-06-28 19:56:35 +03:00
Alexey Zatelepin
7cf413dea8 Revert "Raised up limit on max size of parts to merge [#CLICKHOUSE-3091]."
This reverts commit 425156e32c.
2017-06-28 15:32:52 +03:00
Vitaliy Lyudvichenko
97f7b46ebd Fixed CLEAR COLUMN test in case of deduplication rollback. [#CLICKHOUSE-2] 2017-06-26 19:34:38 +03:00
Vitaliy Lyudvichenko
9c0da6e698 Addition to previous commit. Fix error code, rename test tables. [#CLICKHOUSE-2] 2017-06-26 17:35:26 +03:00
Vitaliy Lyudvichenko
49cbc33a6b Fix ZK exception in case of concurrent INSERTs in new partition. [#CLICKHOUSE-2] 2017-06-26 17:21:25 +03:00
Vitaliy Lyudvichenko
b53d6976b3 Fix build after merge. [#CLICKHOUSE-2] 2017-06-26 15:47:15 +03:00
Alexey Milovidov
a48a21f593 Merge branch 'master' into CLICKHOUSE-2896 2017-06-26 11:54:58 +03:00
alexey-milovidov
e122cf0bcf Merge pull request #914 from yandex/database-dictionary
DatabaseDictionary
2017-06-25 22:02:45 +03:00
Alexey Milovidov
8f145da1e8 Preparation [#CLICKHOUSE-2]. 2017-06-25 06:43:59 +03:00
Alexey Milovidov
dbc61a6a43 Added support for SQL-style quoting [#CLICKHOUSE-20]. 2017-06-25 06:43:37 +03:00
Alexey Milovidov
275a1d4651 Improvement [#CLICKHOUSE-3091]. 2017-06-25 05:48:38 +03:00
Alexey Milovidov
90a1ae1062 Fixed error in prev. revision [#CLICKHOUSE-3091]. 2017-06-25 05:22:10 +03:00
Alexey Milovidov
516b095423 Fixed error in prev. revision [#CLICKHOUSE-3091]. 2017-06-25 04:54:25 +03:00
Alexey Milovidov
8228acd3ea Removed obsolete code that was relevant only in extremely rare case of transforming CollapsingMergeTree to ReplicatedCollapsingMergeTree through ATTACHing data parts and while some considerations about data order in table is important [#CLICKHOUSE-3091]. 2017-06-25 03:51:51 +03:00
Alexey Milovidov
3c660fd65b Fixed translation errors [#CLICKHOUSE-3091]. 2017-06-25 03:17:08 +03:00
Alexey Milovidov
28e9e06992 Preparation: locking block number only after write to filesystem; removed obsolete code [#CLICKHOUSE-3091]. 2017-06-25 03:01:10 +03:00
Alexey Milovidov
c7f35997f5 Removed unused variable [#CLICKHOUSE-2]. 2017-06-25 01:36:43 +03:00
proller
4db8d09de9 Reorganize includes. part 1 (#921)
* Make libunwind optional. Allow use custom libcctz

* fix

* Fix

* fix

* Update BaseDaemon.cpp

* Update CMakeLists.txt

* Reorganize includes. part 1

* Update dbms_include.cmake

* Reorganize includes. part 2

* Reorganize includes. part 3

* dbms/src/Common/ThreadPool -> libs/libcommon

* Reorganize includes. part 4

* Fix print_include_directories

* Update thread_creation_latency.cpp

* Update StringRef.h
2017-06-23 23:22:35 +03:00
Nikolai Kochetov
adb632319d DatabaseDictionary creates new storage for every create table query; drop table works untill restart 2017-06-23 18:55:45 +03:00
Alexey Milovidov
061c214c16 Fixed error [#CLICKHOUSE-3074]. 2017-06-23 09:57:55 +03:00
Alexey Milovidov
f409cad0ac Miscellaneous [#CLICKHOUSE-3091]. 2017-06-23 09:18:00 +03:00
Alexey Milovidov
7d732343eb Fixed error in prev. revision [#CLICKHOUSE-3091]. 2017-06-22 22:52:06 +03:00
Alexey Milovidov
425156e32c Raised up limit on max size of parts to merge [#CLICKHOUSE-3091]. 2017-06-22 21:29:40 +03:00
Alexey Milovidov
6eb06774d3 Addition to prev. revision [#CLICKHOUSE-3091]. 2017-06-22 19:29:15 +03:00