Commit Graph

171 Commits

Author SHA1 Message Date
Andrey Mironov
e7c435c27e dbms: fix typo and absent support of Float64 for MongoDB dictionaries [#METR-18946] 2015-12-09 15:30:45 +03:00
Andrey Mironov
479f1fc346 dbms: fix typo and absent support of Float64 for MySQL dictionaries [#METR-18946] 2015-12-07 19:30:26 +03:00
Andrey Mironov
1ca3d930da dbms: do not allocate memory for default strings in cache dictionaries [#METR-17328] 2015-11-30 20:55:42 +03:00
Andrey Mironov
699e5480f6 dbms: use ArenaWithFreeLists for strings in cache dictionary [#METR-17328] 2015-11-24 15:47:51 +03:00
Andrey Mironov
7159c57280 dbms: fix error with ternary operator having priority lower than binary + [#METR-17328] 2015-11-24 14:28:29 +03:00
Andrey Mironov
ee21853933 dbms: MongoDBDictionarySource now can use complex keys[#METR-17328] 2015-11-24 14:28:29 +03:00
Alexey Milovidov
d7c24b8203 dbms: fixed build [#METR-2944]. 2015-11-21 06:20:31 +03:00
Andrey Mironov
715d2f6ce5 dbms: add key description to system.dictionaries[#METR-17328] 2015-11-20 19:20:54 +03:00
Andrey Mironov
aece1d21f8 dbms: improve dictGet functions for constant defaults [#METR-17328], [#METR-18520] 2015-11-20 18:53:23 +03:00
Andrey Mironov
6c8c0e03cb dbms: slightly refactor most dictionaries, add dictHas function for all dictionaries supporting dictGet*OrDefault. [#METR-17328], [#METR-18520] 2015-11-19 16:15:02 +03:00
Andrey Mironov
6d42868283 dbms: ClickHouseDictionarySource: check that key is present before dereferencing [#METR-18945] 2015-11-19 09:50:05 +03:00
Alexey Milovidov
8255d76754 dbms: added missing include [#METR-18945]. 2015-11-19 00:35:24 +03:00
Andrey Mironov
e4ecbf42b1 dbms: fix cache-type dictionary memory effect on default values [#METR-17382] 2015-11-18 17:06:53 +03:00
Andrey Mironov
8feafa0da2 dbms: add dictGet*OrDefault for all new dictionaries [#METR-17382] 2015-11-18 16:31:29 +03:00
Andrey Mironov
4f1caeb0e4 dbms: SmallObjectPool for ComplexKeyCacheDictionary [#METR-17382] 2015-11-18 14:53:15 +03:00
Andrey Mironov
2e8cc93664 dbms: ArenaWithFreeLists basic implementation. [#METR-17382] 2015-11-17 19:09:43 +03:00
Andrey Mironov
b6930dafa1 dbms: support loading composite keys in MySQLDictionarySource [#METR-17328] 2015-11-16 20:49:39 +03:00
Andrey Mironov
0fd1fc9cdc dbms: add ComplexKeyCacheDictionary, not yet complete [#METR-17328]
Requires a way of deallocating keys in memory Arena (a new type of arena, actually), MySQLDictionarySource not yet capable of requesting complex keys.
2015-11-16 20:49:39 +03:00
Andrey Mironov
7798c45b5b dbms: rename validateKeyColumns to validateKeyTypes [#METR-17328] 2015-11-16 20:49:39 +03:00
Andrey Mironov
078cc8dbb4 dbms: significantly simplify ComplexKeyDictionary code and length [#METR-17328]
Add commentary about dictGet*OrDefault to FlatDictionary.
2015-11-13 17:01:30 +03:00
Andrey Mironov
c0ba6bedcb dbms:rename ComplexKeyDictionary to ComplexKeyHashedDictionary [#METR-17328] 2015-11-13 14:21:40 +03:00
Andrey Mironov
a863b2b0a4 dbms: take ComplexKeyDictionary::keys_pool size into account when determining bytes_allocated [#METR-17328] 2015-11-13 14:08:25 +03:00
Andrey Mironov
5c641ffc78 dbms: dictGet* functions for complex_key dictionary. No dictGet*OrDefault variants yet [#METR-17328] 2015-11-13 04:44:41 +03:00
Andrey Mironov
701bed3fae dbms: add ComplexKeyDictionary, no fetching of values yet [#METR-17328] 2015-11-12 19:29:07 +03:00
Andrey Mironov
2642f2fec4 dbms: add parsing of complex key definitions [#METR-17328] 2015-11-12 19:29:06 +03:00
Andrey Mironov
32614f5206 dbms: dictGetOrDefault for all types, explicit StringRef(string) [#METR-18520] 2015-11-10 12:29:30 +03:00
Andrey Mironov
f8e5fed856 dbms: dictGetStringOrDefault, other functions on the way [#METR-18520] 2015-11-06 17:54:04 +03:00
Andrey Mironov
4355b32890 dbms: external dictionaries: store null_values in sample_block, use them instead of IColumn::insertDefault for MySQL and MongoDB [#METR-17854] 2015-10-13 18:38:22 +03:00
Pavel Kartavyy
c469b726c1 Merge 2015-10-13 15:38:38 +03:00
Andrey Mironov
1657e38c97 dbms: prefer static version of boost_regex, add support for loading specific ids with MongoDBDictionarySource [#METR-17854] 2015-10-13 15:17:09 +03:00
Andrey Mironov
a36436a64b Revert "dbms: temporarily disabled MongoDB dictionary source (to enable automatic builds) [#METR-17854]."
This reverts commit 7060e5a7c839040ff23aebd160e0a1d088778fa7.
2015-10-13 13:20:48 +03:00
Andrey Mironov
7c64c3dc30 Merge 2015-10-12 13:23:31 +03:00
Andrey Mironov
e28dca4d4d dbms: add MongoDBBlockInputStream commentary [#METR-17854] 2015-10-12 13:22:16 +03:00
Alexey Milovidov
bb283e6602 dbms: added support for different numeric types in function has [#METR-18382]. 2015-10-12 10:05:54 +03:00
Alexey Milovidov
62061c3969 dbms: temporarily disabled MongoDB dictionary source (to enable automatic builds) [#METR-17854]. 2015-10-11 04:08:39 +03:00
Alexey Milovidov
3733ac9ead dbms: fixed comment [#METR-17854]. 2015-10-09 23:21:20 +03:00
Andrey Mironov
8e4f30fff0 dbms: MongoDB dictionary source draft (actually it works, but there are some improvements to be made) [#METR-17854] 2015-10-09 17:51:31 +03:00
Pavel Kartavyy
2163af290a Merge 2015-10-08 16:21:23 +03:00
Alexey Milovidov
9facd5bc56 Removed link-time dependency [#METR-17973]. 2015-10-05 10:04:42 +03:00
Alexey Milovidov
fefd3791f1 Moved files [#METR-17973]. 2015-10-05 03:33:43 +03:00
Pavel Kartavyy
269b4b8155 Merge 2015-09-30 16:55:20 +03:00
Alexey Milovidov
1f6def094f dbms: fixed build [#METR-18202]. 2015-09-29 22:19:54 +03:00
Pavel Kartavyy
d1bd09246d gcc-4.9.2: compilation fix 2015-09-23 18:03:08 +03:00
Andrey Mironov
aa68fd2aec dbms: add expression support for id, range_min and range_max [#METR-17888]
Fix type-checking of range_hashed dictionary with mysql as a source.
Parenthesise all expressions to avoid errors.
2015-09-08 12:38:44 +03:00
Andrey Mironov
9d406de8c9 dbms: add dictionary name to messages of most exceptions occurring during their creation [#METR-17487] 2015-08-19 16:19:37 +03:00
Alexey Milovidov
18ed0b2829 dbms: external dictionaries: fixed errors [#METR-17508]. 2015-08-12 07:21:10 +03:00
Alexey Milovidov
dea3c8b8a4 dbms: external dictionaries: fixed bunch of errors; added optional parameter 'dont_check_update_time' for MySQL dictionary source [#METR-17508]. 2015-08-12 06:57:32 +03:00
Alexey Milovidov
f39ad593f5 dbms: added optional property 'require_nonempty' for external dictionaries [#METR-17508]. 2015-08-12 00:32:27 +03:00
Alexey Milovidov
8d8fa9d0fd dbms: more logging in MySQLDictionarySource [#METR-17508]. 2015-08-12 00:29:44 +03:00
Andrey Mironov
bb136fb496 dbms: RangeHashedDictionary: fix constructor fomartting 2015-07-17 18:56:34 +03:00
Alexey Milovidov
c0e029bb1b dbms: renamed ColumnWithNameAndType to ColumnWithTypeAndName for clarification [#METR-2944]. 2015-07-17 04:27:35 +03:00
Andrey Mironov
2af56fe772 dbms: implement dictGet* functions for RangeHashedDictionary. [#METR-17111 2015-07-14 16:06:25 +03:00
Andrey Mironov
f92714712f dbms: extract IDictionaryBase, fix devirtualization. [#METR-17111] 2015-07-13 20:11:17 +03:00
Andrey Mironov
c4440ad829 dbms: RangeHashedDictionary implementation [#METR-17111] 2015-07-13 19:18:28 +03:00
Andrey Mironov
8ea2990e7d dbms: ExternalDictionaries: remove most invididual getters 2015-07-10 17:43:49 +03:00
Andrey Mironov
4fca014e1b dbms: reload initially failed dictionaries with exponential backoff [#METR-16702] 2015-06-09 19:18:49 +03:00
Alexey Milovidov
c94bd2fc09 dbms: removed useless code [#METR-16739]. 2015-06-08 23:22:02 +03:00
Alexey Milovidov
0984363b9c dbms: removed passing DataTypeFactory everywhere [#METR-16545]. 2015-05-28 06:49:28 +03:00
Andrey Mironov
7f38ad390e dbms: allow specifying expressions for dictionary attributes [#METR-16432] 2015-05-26 18:09:53 +03:00
Andrey Mironov
afa79bfcda dbms: add parsing of expression to DictionaryStructure [#METR-16432] 2015-05-26 15:24:31 +03:00
Andrey Mironov
f465feeb28 dbms: DictionarySource::loadIds pass ids by reference to const.
Allow specifying "where" for MySQL and ClickHouse dictionary sources [#METR-16432]
2015-05-22 16:25:59 +03:00
Andrey Mironov
095fd54ae8 dbms: correctly handle injective dictGet* functions during ExpressionAnalyzer's optimizations. 2015-05-13 19:11:24 +03:00
Andrey Mironov
2c58c9ea50 dbms: add system.dictionaries.query_count field [#METR-
15569]
2015-05-08 15:31:34 +03:00
Alexey Milovidov
114b3de689 dbms: cut dependencies [#METR-2944]. 2015-04-16 09:12:35 +03:00
Andrey Mironov
8bc12dbbe4 dbms: system.dictionaries: add brief source description. [#METR-15569] 2015-03-25 13:10:35 +03:00
Andrey Mironov
6b605d10bb dbms: correct load factor for FlatDictionary (based on capacity, not size). [#METR-15569] 2015-03-25 13:10:35 +03:00
Andrey Mironov
e25783995c dbms: system.dictionaries: hit-rate, element count and load-factor. [#METR-15569] 2015-03-24 20:04:03 +03:00
Andrey Mironov
ca6f081dea dbms: system.dictionaries: provide attribute names and types[#METR-13298] 2015-03-24 20:04:03 +03:00
Andrey Mironov
f38d552844 dbms: simplify return value of IDictionary::getTypeName [#METR-13298] 2015-03-24 15:26:19 +03:00
Andrey Mironov
57e13e7d2a dbms: CacheDictionary: do not decrease bytes_allocated by 1 erroneously[#METR-13298] 2015-03-24 15:21:52 +03:00
Andrey Mironov
a892434ffa dbms: CacheDictionary: correctly decrease bytes_allocated on adding default strings. [#METR-13298] 2015-03-24 15:17:18 +03:00
Andrey Mironov
51e1ad0591 dbms: show bytes_allocated in system.dictionaries for all types of dictionaries. [#METR-13298] 2015-03-24 15:12:48 +03:00
Andrey Mironov
4b259dfc01 dbms: IDictionary::getBytesAllocated 2015-03-24 14:30:16 +03:00
Andrey Mironov
cf315e35ef dbms: support non-expiring cache lines in CacheDictionary. [#METR-13298] 2015-03-23 17:30:43 +03:00
Andrey Mironov
006360b75a dbms: dictionaries: more meaningful exception message on null_value parsing error. [#METR-13298] 2015-03-23 17:30:43 +03:00
Andrey Mironov
f321a422b7 dbms: FlatDictionary: fix off-by-one error on resize. [#METR-13298] 2015-03-23 17:30:43 +03:00
Andrey Mironov
33f41657df dbms: improve structure and speed of MySQLBlockInputStream. [#METR-13298] 2015-03-23 17:30:43 +03:00
Andrey Mironov
b81ef372d3 dbms: ColumnVector: add insert(T) function to avoid Field instantiation. [#METR-13298] 2015-03-23 17:30:43 +03:00
Andrey Mironov
17da36aba2 dbms: allow using Date and DateTime with dictionaries. [#METR-13298] 2015-03-20 18:45:36 +03:00
Andrey Mironov
ba0fcc32f9 dbms: MySQLDictionarySource: safely handle empty response. [#METR-13298] 2015-03-20 18:45:36 +03:00
Andrey Mironov
1e1a26b76f dbms: fix typo in ClickHouseDictionarySource, specify database explicitly. [#METR-13298] 2015-03-18 17:20:07 +03:00
Andrey Mironov
3b3f5b17c4 dbms: fix thread-unsafety: retain mysqlxx::Pool::Entry for the whole duration of a query. [#METR-13298] 2015-03-18 15:20:54 +03:00
Andrey Mironov
7196d9c987 dbms: fix usage of moved-from variable, drain mysqlxx query result completely. [#METR-13298] 2015-03-18 12:58:58 +03:00
Andrey Mironov
c880ae8abb dbms: CacheDictionary: store values for missing ids explicitly. Store exceptions for more user-friendly error messages [#METR-13298] 2015-03-06 19:13:59 +03:00
Andrey Mironov
a032d7affb dbms: dictionary sources: escape column and table names; adjust max connections; MySQL support for CacheDictionary [#METR-13298] 2015-03-04 12:36:36 +03:00
Andrey Mironov
f479939760 dbms: less macro code [#METR-13298] 2015-03-02 16:16:26 +03:00
Andrey Mironov
c20d5338f0 dbms: StringRef operator std::string made explicit 2015-02-27 17:28:19 +03:00
Andrey Mironov
9d7fd21463 dbms:drastically improve performance by caching current time [#METR-13298] 2015-02-27 16:12:30 +03:00
Andrey Mironov
3f34c733dd dbms: refactor FlatDictionary to use tuple and less macro-code[#METR-13298] 2015-02-27 16:12:30 +03:00
Andrey Mironov
20eb5013a4 dbms: cache dictionary revamp [#METR-13298] 2015-02-26 17:53:45 +03:00
Andrey Mironov
e175883dd3 dbms: remove redundant checks in FunctionDictIsIn. [#METR-13298] 2015-02-20 13:57:38 +03:00
Andrey Mironov
cf8a927150 dbms: invert the way multiple values are acquired from the dictionary [#METR-13298] 2015-02-19 18:28:24 +03:00
Alexey Milovidov
e09225d230 Addition to prev. revision [#METR-2807]. 2015-02-11 00:14:11 +03:00
Alexey Milovidov
a9eb28c07d Using std::make_unique [#METR-2807]. 2015-02-11 00:10:58 +03:00
Andrey Mironov
984aa5c4b5 dbms: extract external dictionaries management to a separate type [#METR-13298] 2015-02-10 20:40:40 +03:00
Andrey Mironov
168e1cd98d dbms: post-review corrections [#METR-13298]
add dummy CacheDictionary (could not commit without it)
2015-02-10 17:50:52 +03:00
Andrey Mironov
176189a55e dbms: remove const on IDictionary::getSource return type, add commentaries 2015-02-10 17:50:52 +03:00
Andrey Mironov
c594ffa066 dbms: failover support for MysqlDictionarySource [#METR-13298];
return current time for tables with Update_time = null
2015-02-05 21:51:19 +03:00
Andrey Mironov
d0d7d9e4f7 dbms: return local server support to ClickhouseDictionarySource [#METR-13298] 2015-02-05 16:44:39 +03:00
Andrey Mironov
835c8a317e dbms: prohibit local clickhouse as a dictionary source [#METR-13298] 2015-02-04 19:10:27 +03:00