Commit Graph

530 Commits

Author SHA1 Message Date
Maksim Kita
c4ffa2160f Updated interfaces. Added documentation. 2021-01-27 16:25:27 +03:00
Maksim Kita
b0d3f32a36 Added DefaultValueExtractor 2021-01-27 16:25:27 +03:00
Maksim Kita
b11905f493 Fixed tests 2021-01-27 16:25:27 +03:00
Maksim Kita
7cb7d4dbce Fixed dicitionaries todo 2021-01-27 16:25:27 +03:00
Maksim Kita
498df53ebf Fixed style issues 2021-01-27 16:25:27 +03:00
Maksim Kita
77d2e00dd8 Updated DictionaryStructure 2021-01-27 16:25:27 +03:00
Maksim Kita
42d4fc1bbd Updated FlatDictionary 2021-01-27 16:25:27 +03:00
Maksim Kita
a45459e095 Fixed tests 2021-01-27 16:25:27 +03:00
Maksim Kita
357b0b95a9 Added Nullable support for ComplexDirectDictionary 2021-01-27 16:25:27 +03:00
Maksim Kita
25d6e18ec0 Added Nullable support for ComplexKeyHashedDictionary 2021-01-27 16:25:27 +03:00
Maksim Kita
6e51b2f60a Added Nullable support for RangeHashedDictionary 2021-01-27 16:25:27 +03:00
Maksim Kita
b745c64459 Added Nullable support for DirectDictionary 2021-01-27 16:25:27 +03:00
Maksim Kita
3e2d615e62 Added Nullable support for HashedDictionary 2021-01-27 16:25:27 +03:00
Maksim Kita
7ded8be0d5 Added Nullable support for FlatDictionary 2021-01-27 16:25:27 +03:00
Maksim Kita
b01027787e Fixed tests 2021-01-27 16:25:27 +03:00
Maksim Kita
164e55972b Fix style issue 2021-01-27 16:25:27 +03:00
Maksim Kita
791c7204d7 Fix style issues 2021-01-27 16:25:27 +03:00
Maksim Kita
8fdbde8642 Updated PolygonDictionary to new interface 2021-01-27 16:25:27 +03:00
Maksim Kita
0ed64d8ab0 Simplified getColumn implementation 2021-01-27 16:25:27 +03:00
Maksim Kita
6f7ad82160 Updated IPAddressDictionary to new interface 2021-01-27 16:25:26 +03:00
Maksim Kita
07fab85cc4 Updated SSDComplexKeyCacheDictionary to new interface 2021-01-27 16:25:26 +03:00
Maksim Kita
0d2e498ed4 Updated ComplexKeyCacheDictionary to new interface 2021-01-27 16:25:26 +03:00
Maksim Kita
b4896ee82b Updated ComplexKeyDirectDictionary to new interface 2021-01-27 16:25:26 +03:00
Maksim Kita
81f4bc7b4c Updated SSDCacheDictionary to new interface 2021-01-27 16:25:26 +03:00
Maksim Kita
6017d1a034 Updated CachedDictionary to new interface 2021-01-27 16:25:26 +03:00
Maksim Kita
cd6ec3234e Updated DirectDictionary to new interface 2021-01-27 16:25:26 +03:00
Maksim Kita
cc767d4f2e Updated HashedDictionary to new interface 2021-01-27 16:25:26 +03:00
Maksim Kita
d61e8c083b Updated RangeHashedDictionary to new interface 2021-01-27 16:25:26 +03:00
Maksim Kita
d92d843e20 Fixed compile issue 2021-01-27 16:25:26 +03:00
Maksim Kita
8bd98ae432 Remove previous interface enum 2021-01-27 16:25:26 +03:00
Maksim Kita
f24a8eadb2 Updated ComplexKeyHashed dictionary to new interface 2021-01-27 16:25:26 +03:00
Maksim Kita
d16a572eee Updated IDictionaryBase interface 2021-01-27 16:25:26 +03:00
Maksim Kita
7a2f6cd5b9 Dictionaries refactoring to new interface 2021-01-27 16:25:26 +03:00
Maksim Kita
e0dc6f9417 Dictionary better error message during attribute parsing 2021-01-27 00:50:23 +03:00
Maksim Kita
16eb7b01b6
Merge pull request #19571 from kitaisreal/create-simple-dictionary-id-expression-fix
Query CREATE DICTIONARY id expression fix
2021-01-26 12:43:49 +03:00
Maksim Kita
ab7f15c77e Query CREATE DICTIONARY id expression fix 2021-01-25 15:43:35 +03:00
kssenii
daab2c91bb Better 2021-01-21 21:15:11 +00:00
kssenii
c1702f34ee Add factories info into system.query_log 2021-01-21 15:46:37 +00:00
alexey-milovidov
7de745ce77
Merge pull request #18554 from kssenii/pg2ch
Add PostgreSQL table function, dictionary source, database engine
2021-01-16 23:55:05 +03:00
Azat Khuzhin
1b901b368f Add missing type check in dictHas for COMPLEX_KEY_SSD_CACHE layout 2021-01-16 12:33:36 +03:00
Alexey Milovidov
67f207d8ca More safe connection string 2021-01-16 00:18:51 +03:00
Alexey Milovidov
ba1921f380 Minor changes 2021-01-15 22:59:49 +03:00
Alexey Milovidov
a19e7edd14 Merge branch 'master' into kssenii-pg2ch 2021-01-15 17:33:19 +03:00
kssenii
38a9cba850 Fix 2021-01-11 10:55:38 +00:00
Alexey Milovidov
6eb5a5f4d9 Remove useless code 2021-01-10 03:28:59 +03:00
kssenii
0088d66d59 Hopefully better array conversions for insert query 2021-01-09 22:42:42 +00:00
Alexey Milovidov
e7a7f557d1 Fix Arcadia 2021-01-07 18:40:54 +03:00
Alexey Milovidov
8af19c3251 Fix Arcadia 2021-01-07 15:29:02 +03:00
Alexey Milovidov
60d4db421c Fix Arcadia 2021-01-07 06:45:12 +03:00
alexey-milovidov
72b142a00a
Merge branch 'master' into pg2ch 2021-01-06 23:18:59 +03:00
Nikita Mikhailov
cc794b7a83 Merge branch 'master' of github.com:ClickHouse/ClickHouse into parallel-parsing-input-format 2020-12-30 16:55:15 +03:00
Nikita Mikhailov
c5f92e5096 better formatfactory 2020-12-30 06:07:30 +03:00
Nikita Mikhailov
2b90b4e01d Merge branch 'master' of github.com:ClickHouse/ClickHouse into parallel-parsing-input-format 2020-12-29 22:47:06 +03:00
kssenii
c1eced8993 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg2ch 2020-12-29 15:09:53 +00:00
Yatsishin Ilya
011d2b4631 disable couple checks for now 2020-12-29 17:57:12 +03:00
Nikita Mikhaylov
6863dbd6a8
Merge pull request #18480 from vdimir/ip-dict-key-access
IP dict key access
2020-12-28 16:15:40 +03:00
kssenii
9b25890674 Generate ya.make, fix fast test 2020-12-28 12:54:52 +00:00
Nikita Mikhailov
c3288c3fbf Merge branch 'master' of github.com:ClickHouse/ClickHouse into parallel-parsing-input-format 2020-12-28 15:09:37 +03:00
kssenii
8f8920a7ee Add table cache, better drop table 2020-12-27 15:52:15 +00:00
kssenii
00a37404ca Add postgresql database engine 2020-12-27 12:26:29 +00:00
kssenii
d95e8e2d74 Better 2020-12-27 12:18:59 +00:00
kssenii
375e8e9736 Add postgres dictionary source 2020-12-27 12:18:09 +00:00
alexey-milovidov
5c459e74c9
Update IPAddressDictionary.cpp 2020-12-27 11:43:27 +03:00
vdimir
46791d4908 Do not throw logical error from IPAddressDictionary ctor 2020-12-26 19:16:57 +00:00
vdimir
1e3bd37380 Add option access_to_key_from_attributes to ip dictionary 2020-12-24 19:13:49 +00:00
alexey-milovidov
30e3900235
Merge pull request #18435 from vdimir/ip-dict-minor-fix
Raise an error if more than one key is provided to ip_dictionary
2020-12-24 20:16:07 +03:00
Yatsishin Ilya
ce1e2b18a3 Fix codespell warnings. Split style checks. Update style checks docker 2020-12-24 13:17:52 +03:00
vdimir
54448ad4ce Remove unnecessary IPAddressDictionary::has overload 2020-12-24 07:38:10 +00:00
vdimir
05d45fcf61 Raise an error if more than one key is provided to ip_dictionary 2020-12-23 16:58:54 +00:00
Nikita Mikhailov
dcfbe782c6 Merge branch 'master' of github.com:ClickHouse/ClickHouse into parallel-parsing-input-format 2020-12-23 05:20:22 +03:00
Denis Glazachev
da7aa25e01 Store copies instead of refs in ExternalQueryBuilder instances 2020-12-21 03:27:35 +04:00
Nikita Mikhaylov
e0addac6fc save changes 2020-12-15 00:56:46 +03:00
Azat Khuzhin
5b3ab48861 More forward declaration for generic headers
The following headers are pretty generic, so use forward declaration as
much as possible:
- Context.h
- Settings.h
- ConnectionTimeouts.h
(Also this shows that some missing some includes -- this has been fixed)

And split ConnectionTimeouts.h into ConnectionTimeoutsContext.h (since
module part cannot be added for it, due to recursive build dependencies
that will be introduced)

Also remove Settings from the RemoteBlockInputStream/RemoteQueryExecutor
and just pass the context, since settings was passed only in speicifc
places, that can allow making a copy of Context (i.e. Copier).

Approx results (How much units will be recompiled after changing file X?):

- ConnectionTimeouts.h
  - mainline: 100

- Context.h:
  - mainline: ~800
  - patched:  415

- Settings.h:
  - mainline: 900-1K
  - patched:  440 (most of them because of the Context.h)
2020-12-12 17:43:10 +03:00
Alexey Milovidov
4ecfe8fef4 Remove unused headers 2020-12-08 02:10:22 +03:00
alexey-milovidov
4df1983d64
Merge pull request #17571 from vdimir/ip-dict-accept-alias
IP dictionary works with aliased types `IPv4` and `IPv6` (close #6804)
2020-12-07 02:19:32 +03:00
Ivan
315ff4f0d9
ANTLR4 Grammar for ClickHouse and new parser (#11298) 2020-12-04 05:15:44 +03:00
vdimir
5f330a9366
IP dictionary works with aliased types IPv4 and IPv6 (close #6804) 2020-11-28 23:12:19 +03:00
Nikolai Kochetov
729272391f
Merge branch 'master' into ip-dict-no-trie 2020-11-25 23:07:19 +03:00
Nikolai Kochetov
eec131df86
Update registerDictionaries.cpp 2020-11-25 16:27:10 +03:00
Nikita Mikhaylov
6787f98476
Merge pull request #14958 from nikitamikhaylov/refactor_cache_dictionary
Refactor cache dictionary
2020-11-24 14:55:02 +03:00
vdimir
52bc290616
Regenerate ya.make, add format null to ip_trie.xml 2020-11-24 11:20:11 +03:00
tavplubix
5cc9cb01cd
Merge pull request #16751 from amosbird/globalcontext
Make global_context consistent.
2020-11-22 18:46:17 +03:00
vdimir
a277a5bb16
Rename TrieDictionary -> IPAddressDictionary 2020-11-21 21:38:10 +03:00
vdimir
e2fac19686
Remove libbtrie 2020-11-21 21:31:15 +03:00
vdimir
7adbc5a0c6
Fix ip dict build 2020-11-21 20:39:16 +03:00
vdimir
77ffd25cc0
Fixes for IP dictionary
More meaningful parse errors

Code style fixes, more comments

Fix bytes_allocated calculation
2020-11-21 17:56:58 +03:00
Nikolai Kochetov
bac1def5f9
Merge pull request #17134 from abyss7/tcp-port
Implement tcpPort() function for tests
2020-11-20 20:32:55 +03:00
Amos Bird
1d9d586e20
Make global_context consistent. 2020-11-20 18:23:14 +08:00
vdimir
36544a45b7
Merge remote-tracking branch 'upstream/master' into ip-dict-no-trie 2020-11-19 18:56:24 +03:00
alexey-milovidov
29bfb5a518
Merge pull request #16997 from vdimir/source-clickhouse-usability
source(clickhouse(...)) usability
2020-11-19 07:37:00 +03:00
Ivan Lezhankin
17977e4c4b Use global context for gtests 2020-11-18 21:24:58 +03:00
Ivan Lezhankin
f43f61a10b Another gtest fix 2020-11-18 19:19:39 +03:00
Ivan Lezhankin
ca0740d333 Fix gtest for dictionaries 2020-11-18 17:58:55 +03:00
nikitamikhaylov
36a00ffb1e fix build 2020-11-18 17:28:38 +03:00
nikitamikhaylov
9a0fd70edc better code 2020-11-18 16:58:28 +03:00
nikitamikhaylov
13e711b27e rename back config 2020-11-18 16:38:14 +03:00
Ivan Lezhankin
fdd1c182ab Merge remote-tracking branch 'upstream/master' into tcp-port 2020-11-18 16:22:00 +03:00
nikitamikhaylov
9c6b896928 style + flaky test fix 2020-11-17 17:36:04 +03:00
nikitamikhaylov
4345f2987d better 2020-11-17 16:59:13 +03:00
nikitamikhaylov
20ae82b24b remote nolint 2020-11-17 16:59:13 +03:00
nikitamikhaylov
e604d37067 better 2020-11-17 16:59:13 +03:00
nikitamikhaylov
f596d95b4b better states for cells 2020-11-17 16:59:13 +03:00
nikitamikhaylov
80e77b6a61 better 2020-11-17 16:59:13 +03:00
nikitamikhaylov
31b1f644c1 better 2020-11-17 16:59:13 +03:00
nikitamikhaylov
0f5e980d85 style 2020-11-17 16:59:12 +03:00
nikitamikhaylov
321fb090f1 return back to handwritten cache 2020-11-17 16:59:12 +03:00
nikitamikhaylov
fbd0d14dd6 save 2020-11-17 16:59:12 +03:00
nikitamikhaylov
10adac00f4 avoid race on read/write to the cache of defaults 2020-11-17 16:59:12 +03:00
nikitamikhaylov
9b46b53fa3 better defaults 2020-11-17 16:59:12 +03:00
nikitamikhaylov
028fc00166 fix tests 2020-11-17 16:59:12 +03:00
nikitamikhaylov
d52e72d66c type_id cast 2020-11-17 16:59:12 +03:00
nikitamikhaylov
3df6e457f7 style 2020-11-17 16:59:12 +03:00
nikitamikhaylov
720d3a411f skip unused keys 2020-11-17 16:59:12 +03:00
nikitamikhaylov
82c6467a5d better 2020-11-17 16:59:12 +03:00
nikitamikhaylov
02b2b38716 add normal parent 2020-11-17 16:59:12 +03:00
nikitamikhaylov
0d1a8ea2a1 first try 2020-11-17 16:59:12 +03:00
Ivan Lezhankin
f897f7c93f Refactor IFunction to execute with const arguments 2020-11-17 16:24:45 +03:00
Ivan Lezhankin
1787cd89a7 Implement tcpPort() function literal 2020-11-17 16:24:13 +03:00
Alexey Milovidov
24f4fa6edf Follow Arcadia ya.make rules 2020-11-17 00:16:50 +03:00
vdimir
428f42053b
Merge remote-tracking branch 'upstream/master' into source-clickhouse-usability 2020-11-16 22:34:28 +03:00
Alexey Milovidov
3df04ce0c2 Follow Arcadia ya.make rules 2020-11-16 21:24:58 +03:00
vdimir
6dcb38db3f
Minor changes in IP dictionary 2020-11-16 21:08:31 +03:00
vdimir
608adc77ca
Remove non-unique entries in ip_dict 2020-11-16 10:43:55 +03:00
vdimir
9eb3a0140d
Add 96 bits to mapped IPv4 in ip_dict loading procedure 2020-11-15 20:09:28 +03:00
vdimir
5e0e22301b
Slightly improve ip_dict loading performance, handle v4 to v6 masks in prepossessing, add more tests 2020-11-15 18:55:34 +03:00
vdimir
8b91e0984c
SSE version of matchIPv6Subnet for ip_dict 2020-11-14 23:38:34 +03:00
vdimir
3c6104855d
Fix mask comparison for ip dict, add tests 2020-11-14 23:29:58 +03:00
vdimir
ca8e4b1607
Minor fixes of ip dict 2020-11-14 20:03:13 +03:00
vdimir
cd3cc329a1
Remove redundant anon namespace in ClickHouseDictionarySource.cpp 2020-11-14 18:23:48 +03:00
vdimir
1dce20e5da
Default host, port and user parameters for source(clickhouse(...)) 2020-11-14 16:44:45 +03:00
vdimir
7c19ad5ac7
Fix mappedIPv4ToBinary, add test reference for ip_dict 2020-11-12 10:37:27 +03:00
vdimir
dbec289c9a
[wip] rewrite ip_dict data struct, fix bugs, add tests 2020-11-12 00:58:30 +03:00
Alexander Tokmakov
5cdfcfb307 remove other stringstreams 2020-11-09 22:12:44 +03:00
vdimir
13685e83df
Exact ip records comparison for getBlockInputStream 2020-11-08 23:50:49 +03:00
vdimir
c306902fdf
Fix ip subnet comparison 2020-11-08 23:21:13 +03:00
vdimir
a67f5b780f
Use sorted ip array instead of trie in TrieDictionary 2020-11-08 19:19:04 +03:00
Alexey Milovidov
dba57529f8 Merge branch 'master' of github.com:yandex/ClickHouse into fix-stringstream 2020-11-07 22:03:38 +03:00
Alexey Milovidov
fd84d16387 Fix "server failed to start" error 2020-11-07 03:14:53 +03:00
Alexey Milovidov
c4398952da Addition to prev. revision 2020-11-06 20:40:11 +03:00
Alexey Milovidov
b56486510f Improve Arcadia 2020-11-05 12:55:01 +03:00
alesapin
94ae5aed73
Merge pull request #16550 from ClickHouse/remove_wrong_assertion
Remove wrong assertion from SSDComplexKeyCacheDictionary
2020-10-30 22:45:48 +03:00
alesapin
182f9fbdca Remove wrong assertion from SSDComplexKeyCacheDictionary 2020-10-30 12:36:46 +03:00
Maxim Akhmedov
3627fabfb9 Remove -g0 form Arcadia build settings. 2020-10-29 17:37:23 +03:00
Ivan
1d170f5745
ASTTableIdentifier Part #1: improve internal representation of ASTIdentifier name (#16149)
* Use only |name_parts| as primary name source

* Restore legacy logic for table restoration

* Fix build

* Fix tests

* Add pytest server config

* Fix tests

* Fixes due to review
2020-10-24 21:46:10 +03:00
alesapin
76a501d7c5 Merge branch 'master' into simplify-init-script 2020-10-19 10:56:40 +03:00
alesapin
07c12116e2
Merge pull request #16007 from CurtizJ/fix-complex-key-direct
Allow to use direct layout for dictionaries with complex keys
2020-10-16 10:03:10 +03:00
Nikita Mikhaylov
6512d84b31
Merge pull request #15985 from CurtizJ/redis-cached-dict
Add support of cache layout for Redis dictionaries with complex key
2020-10-15 22:35:36 +03:00
Anton Popov
9c9ad2cc85
Merge branch 'master' into fix-complex-key-direct 2020-10-15 18:53:59 +03:00
Nikolai Kochetov
963ce315b2
Merge pull request #15454 from azat/dict-prealloc
Speedup hashed/sparse_hashed dictionary loading by preallocating the hash table
2020-10-15 15:03:53 +03:00
Anton Popov
424dd3147c allow to use direct layout for dictionaries with complex keys 2020-10-15 14:59:41 +03:00