Commit Graph

3999 Commits

Author SHA1 Message Date
Ivan Lezhankin
d1ead22073 Rename As<…> → as<…> 2019-03-11 16:22:51 +03:00
Ivan Lezhankin
1e9f7847dc Merge remote-tracking branch 'upstream/master' into iast-as 2019-03-11 16:11:22 +03:00
chertus
c089d5b88a CrossToInnerJoinVisitor before JoinToSubqueryTransformVisitor 2019-03-11 16:08:51 +03:00
Ivan Lezhankin
a7e838e328 Replace all other casts to method IAST::As<Derived>
Also remove some redundant methods like IsIdentifier() et. al.
2019-03-11 15:49:39 +03:00
chertus
04f5584d72 move JOIn convertions to InterpreterSelectQuery 2019-03-11 15:20:55 +03:00
chertus
09a3b24cbc join kind helpers 2019-03-11 14:14:09 +03:00
Nikita Vasilev
d171330599 Merge remote-tracking branch 'upstream/master' into nikvas0/bloom_filter_index 2019-03-11 13:06:09 +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
alexey-milovidov
6db73152d2
Hardening debug build (experimental) (#4632)
* Hardening debug build: more granular memory mappings and ASLR; add memory protection for mark cache and index

* Addition to prev. revision

* Addition to prev. revision

* Addition to prev. revision
2019-03-10 06:16:51 +03:00
Ivan Lezhankin
0e325c7a4a Replace const typeid_casts with As<Derived>() method invocations 2019-03-08 12:48:20 +03:00
Nikita Vasilev
a77d20e56d Merge remote-tracking branch 'upstream/master' into nikvas0/bloom_filter_index 2019-03-08 11:13:48 +03:00
Alexey Milovidov
356a5c54b8 Whitespaces 2019-03-08 06:23:34 +03:00
Alex Zatelepin
896b8b15f6 fix build 2019-03-07 23:52:25 +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
Nikita Vasilev
fcb82ba901 Merge remote-tracking branch 'upstream/master' into nikvas0/bloom_filter_index 2019-03-07 16:55:38 +03:00
Alexey Milovidov
58bfcba361 Merge branch 'master' into dictionaries-dont-check-is-modified-under-lock 2019-03-07 02:46:27 +03:00
alexey-milovidov
b72894d693
Merge pull request #4613 from zlobober/host_context
CHYT-67: introduce host context for using CH as a library.
2019-03-07 02:35:15 +03:00
alexey-milovidov
e2fde4f0d8
Merge pull request #4576 from BayoNet/DOCAPI-5203-direct-io-settings
DOCAPI-5203 direct i/o settings EN description
2019-03-06 21:34:35 +03:00
Maxim Akhmedov
9a56294fdf CHYT-67: introduce host context for using CH as a library. 2019-03-06 19:47:47 +03:00
Nikita Vasilev
c428d9a64c Merge remote-tracking branch 'upstream/master' into nikvas0/bloom_filter_index 2019-03-06 16:36:34 +03:00
alexey-milovidov
74f7ef390a
Merge pull request #4595 from 4ertus2/joins
Multiple JOINs multiple fixes
2019-03-06 02:55:05 +03:00
chertus
4f80afb158 fix gcc build 2019-03-05 19:34:10 +03:00
Alexey Milovidov
842a9708e9 ExternalDictionaries: don't lock when checking if a dictionary is modified 2019-03-05 19:06:40 +03:00
chertus
049d49333d undo last change 2019-03-05 18:21:52 +03:00
chertus
22f699c8a0 fix CrossToInnerJoin (empty where crash & where for one table wrong result) 2019-03-05 18:16:59 +03:00
chertus
72fe0115d1 move join convertions to InterpreterSelectQuery 2019-03-05 16:53:39 +03:00
chertus
ea4d3ec661 some multiple join fixes 2019-03-05 15:34:48 +03:00
alexey-milovidov
b311bfb11d
Merge pull request #4583 from yandex/fix-invalidate-query-for-clickhouse-dictionary-source
Fix invalidate query for clickhouse dictionary source
2019-03-05 01:27:22 +03:00
chertus
339047fc40 fix multiple joins asterisks qualification 2019-03-04 22:40:58 +03:00
alexey-milovidov
d2d4f4a237
Merge pull request #4579 from yandex/disable_compile_expressions
Disable compile expressions by default
2019-03-04 22:31:08 +03:00
Alexey Milovidov
2e7db37cde Fixed issue with update time of dictionaries after checking that the dictionary is not modified #4581 2019-03-04 22:13:05 +03:00
Alexey Milovidov
af5041532a Logging of internal queries 2019-03-04 21:28:42 +03:00
Alexey Milovidov
d019ac7ec5 Avoid std::terminate when invalidate_query returned wrong resultset #4580 2019-03-04 21:19:48 +03:00
alesapin
05f187c122 Disable compile expressions by default 2019-03-04 19:36:52 +03:00
Alexey Milovidov
c3a2e73f32 Fixed build 2019-03-04 18:53:51 +03:00
zhang2014
fb44b6692a rename setting name 2019-03-04 10:09:44 +08:00
zhang2014
b696ef34d2 Add max_execution_speed & min_execution_bytes_speed & max_execution_bytes_speed 2019-03-02 15:08:02 +08:00
alexey-milovidov
ee903886e6
Merge pull request #4387 from abyss7/CLICKHOUSE-4268
Improve push-down logic for joined statements
2019-03-02 04:19:50 +03:00
alexey-milovidov
695a2dc35f
Merge pull request #4552 from 4ertus2/bugs
Fix crash on JOIN with array or tuple
2019-03-01 18:49:22 +03:00
chertus
83503df56a fix crach on JOIN with array or tuple 2019-03-01 18:32:32 +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
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
BayoNet
455ca955e5 DOCAPI-5203: Added the descriptions for direct I/O settings for MergeTree merge and SELECT queries. 2019-02-28 14:20:27 +03:00
liangqian
6757b112d1 change Sream into Stream 2019-02-28 15:27:30 +08: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
Ivan Lezhankin
d66626a35a Revert "Move experimental join transformations to syntax analyzer"
This reverts commit 0e2316e0ac.
2019-02-27 16:35:43 +03:00
Ivan Lezhankin
2a604d075a Merge remote-tracking branch 'upstream/master' into CLICKHOUSE-4268 2019-02-27 15:08:36 +03:00
Nikita Vasilev
7a51928cad Merge remote-tracking branch 'upstream/master' into nikvas0/bloom_filter_index 2019-02-26 23:35:57 +03:00
Nikita Vasilev
d6f227ece7 fix build 2019-02-26 22:37:07 +03:00
Ivan Lezhankin
e9849ba8de Don't replace tables with compound names 2019-02-26 20:22:05 +03:00
chertus
d448d3e907 enable allow_experimental_multiple_joins_emulation and allow_experimental_cross_to_join_conversion by default 2019-02-26 20:00:33 +03:00
Ivan Lezhankin
7f130d2362 Don't replace aliased tables. 2019-02-26 17:12:25 +03:00
Ivan Lezhankin
09af5512b8 Implement push-down inside join-statement 2019-02-26 13:56:19 +03:00
Ivan Lezhankin
0e2316e0ac Move experimental join transformations to syntax analyzer 2019-02-26 13:18:12 +03:00
Ivan Lezhankin
c8eefb3927 Always modify subqueries if modifying inplace
to support push-down while analyzing.
2019-02-26 13:18:12 +03:00
Ivan Lezhankin
0a443399a0 Implement the debug query "ANALYZE"
that prints out the query after syntax analysis.
Should be helpful for tests.
2019-02-26 13:17:25 +03:00
Nikita Vasilev
4b04c4bdde improved read 2019-02-25 21:30:02 +03:00
Nikita Vasilev
ef0de1b53e refactoring 2019-02-25 21:23:21 +03:00
alexey-milovidov
864a81f1d5
Merge pull request #4502 from yandex/speedup-ddl-cleanup
Speedup ddl cleanup
2019-02-25 19:00:16 +03:00
Alexey Zatelepin
50dbfc8d50 clean distributed DDL queue in a separate thread [#CLICKHOUSE-3977] 2019-02-25 15:42:23 +03:00
alexey-milovidov
9d8b91b97a
Merge pull request #4483 from yandex/dont-create-part-log-if-not-defined
Do not create part_log if it is not defined in configuration file
2019-02-24 18:27:50 +03:00
alexey-milovidov
16225dff12
Merge pull request #4480 from 4ertus2/ast
Refactoring: simplify InDepthNodeVisitor
2019-02-24 02:32:42 +03:00
Nikita Vasilev
c61d5c84c8 UInt64 in bloom filter 2019-02-23 18:56:48 +03:00
Nikita Vasilev
635b34c442 better bloom filter 2019-02-23 17:46:40 +03:00
Nikita Vasilev
970f93d3c4 fix 2019-02-23 12:26:32 +03:00
Nikita Vasilev
81fdd13420 many columns 2019-02-22 22:59:40 +03:00
Alexey Zatelepin
46520e2887 protect zk variable with a mutex [#CLICKHOUSE-3977] 2019-02-22 22:41:33 +03:00
Alex Zatelepin
34346e37eb
Merge pull request #4472 from yandex/speedup-ddl-cleanup
Fix hangup on server shutdown if distributed DDLs were used.
2019-02-22 21:42:05 +03:00
chertus
14faa95c83 fix table functions & RequiredSourceColumnsVisitor 2019-02-22 20:08:10 +03:00
Alexey Milovidov
85c0ba1e70 Do not create part_log if it is not defined in configuration file 2019-02-22 19:10:14 +03:00
chertus
8bff0d74c0 minor changes 2019-02-22 18:45:47 +03:00
chertus
9e2aa47478 simplify InDepthNodeVisitor 2019-02-22 16:33:56 +03:00
Nikita Vasilev
9a28161414 fixed token extractor 2019-02-22 00:29:24 +03:00
chertus
a14d955e9e mJOIN: correct names for right table 2019-02-21 22:43:14 +03:00
chertus
642ad05473 minor refactoring 2019-02-21 22:38:12 +03:00
Alexey Zatelepin
73f852ae82 manually reset DDLWorker in shared context to prevent reference cycles 2019-02-21 19:41:27 +03:00
chertus
10b473bb24 mJOIN: correct names for left table columns 2019-02-21 15:45:31 +03:00
Vitaly Baranov
31039056f5
Merge pull request #4174 from vitlibar/add-protobuf-input-format
Add protobuf input format.
2019-02-21 00:59:13 +03:00
Nikita Vasilev
f66cef68ff fix in atom_map 2019-02-20 23:17:44 +03:00
Nikita Vasilev
ef55e93016 == 2019-02-20 22:27:23 +03:00
Nikita Vasilev
4e5bbc8176 fix 2019-02-20 20:17:31 +03:00
Nikita Vasilev
c35c671f4e key condition 2019-02-20 19:24:46 +03:00
chertus
f028691eaa Merge branch 'master' into joins 2019-02-20 18:48:47 +03:00
chertus
1f2a5f9a91 disable asterisks in mJOIN, add some tests 2019-02-20 18:28:53 +03:00
chertus
d45d980716 support column names without aliases (make special ones) 2019-02-20 16:22:01 +03:00
Nikita Vasilev
f7c091d497 utf8 + fixes 2019-02-20 15:48:50 +03:00
chertus
48ee3e83fa JoinToSubqueryTransform with short names 2019-02-20 15:12:36 +03:00
alesapin
432a802342 Merge branch 'master' into fix_long_http_queries_insert 2019-02-20 14:53:36 +03:00
Nikita Vasilev
3c3cc597ab added granule 2019-02-20 14:22:07 +03:00
alesapin
ef7beb1596 Fix bug with long http insert queries processing 2019-02-20 12:22:13 +03:00
Nikita Vasilev
10bc08b830 added StringBloomFilter 2019-02-20 12:02:19 +03:00
Vitaly Baranov
76aae5f5d0 Add support for settings 'format_schema' in a "INSERT INTO table FORMAT" query. 2019-02-20 05:32:29 +03:00
proller
e20c77e4c6 Add parquet support. Fixes, tests, ... 2019-02-19 23:51:44 +03:00
Alexey Milovidov
9c23486551 Fixed backward incompatibility of table function "remote" introduced with column comments 2019-02-19 20:02:51 +03:00
Alexey Milovidov
11fc35e098 Fixed accidential incompatibility due to wrong implementation of "send_logs_level" setting 2019-02-19 16:27:59 +03:00
alexey-milovidov
15b03f6e12
Merge pull request #4412 from 4ertus2/joins
Support aliases in JOIN ON section for right table columns
2019-02-18 18:31:01 +03:00
chertus
1fc6c60668 undo unneeded changes 2019-02-15 18:47:39 +03:00
chertus
b72d12d12e join on allow aliases for right table columns 2019-02-15 18:47:39 +03:00
chertus
dc1a0ed3f4 normalize JOIN ON section 2019-02-15 18:47:39 +03:00
chertus
33c3b5cdad some more refactoring 2019-02-15 18:47:39 +03:00
chertus
c6e541858e refactoring: do not match columns to tables twice 2019-02-15 18:47:39 +03:00
zhang2014
597ae0b937 ISSUES-4389 fix lambda function with predicate optimizer 2019-02-15 17:04:02 +08:00
alexey-milovidov
6d5bbd642a
Merge pull request #4401 from 4ertus2/ast
fix UB in TranslateQualifiedNamesMatcher
2019-02-14 21:48:30 +03:00
chertus
a2ff9391ad fix UB 2019-02-14 17:25:55 +03:00
alexey-milovidov
578b18af84
Merge pull request #4384 from yandex/fix-low-cardinality-with-rollup
Fix low cardinality with rollup
2019-02-13 21:29:16 +03:00
Nikolai Kochetov
cf40a1538b Fix size() and empty() for AggregationDataWithNullKey. #4223 2019-02-13 19:54:55 +03:00
alesapin
af4c4dc1e5 Fix old clients insert query processing with embedded data 2019-02-13 15:54:22 +03:00
Alexey Milovidov
6a16d27da4 Fixed bad error message #2418 2019-02-13 02:49:32 +03:00
alexey-milovidov
62f097eb66
Merge pull request #4348 from yandex/aggregate-function-state-in-field
Aggregate function state in field
2019-02-12 22:13:38 +03:00
alexey-milovidov
e49004be2e
Merge pull request #4351 from 4ertus2/joins
Simplify QueryNormalizer and fix for 4110
2019-02-12 21:36:56 +03:00
alexey-milovidov
e762f370a7
Merge pull request #4363 from 4ertus2/ast
Fix full/right join 'different number of columns'
2019-02-12 21:31:09 +03:00
alexey-milovidov
c1bf56c969
Merge pull request #4370 from nikvas0/nikvas0/index_setting
allow_experimental_data_skipping_indices setting
2019-02-12 21:19:55 +03:00
Nikita Vasilev
5279c7ff81 setting 2019-02-12 20:54:52 +03:00
chertus
93e0621a2c fix wrong query in push down test 2019-02-12 18:08:21 +03:00
chertus
aaf3813607 Merge branch 'master' into joins 2019-02-12 15:51:04 +03:00
chertus
3218f5003f fix full/right join different number of columns 2019-02-12 15:11:45 +03:00
chertus
805866e6b3 hotfix for wrong aliases issue-4110 2019-02-11 22:14:57 +03:00
chertus
958b538a01 minor improvement 2019-02-11 21:26:40 +03:00
alexey-milovidov
49165b1347
Merge pull request #4344 from yandex/forbid-temporary-tables-in-database
Forbid temporary tables in database
2019-02-11 19:51:56 +03:00
Nikolai Kochetov
0a6f75a1b6 Allow to execute subquery with scalar aggregate function state. 2019-02-11 18:50:52 +03:00
Nikolai Kochetov
c35439a5f0 Updated FieldVisitor. 2019-02-11 18:46:19 +03:00
Alexey Milovidov
7b312c6df2 Forbid to specify a database when creating a temporary table [#CLICKHOUSE-4294] 2019-02-11 17:46:09 +03:00
alesapin
55fc095c98 Fix big dates comparison with compile expressions (Date and DateTime are not signed types anymore). 2019-02-11 17:36:54 +03:00
chertus
1de1192aa8 move asterisks extraction to TranslateQualifiedNamesVisitor (before column names normalisation) 2019-02-11 17:19:09 +03:00
alexey-milovidov
81a184c47f
Merge pull request #4301 from yandex/input-data-in-perf-test
Fix perf-test input data and refactor two tests
2019-02-11 12:52:03 +03:00
Alexey Milovidov
0861af12a3 Fixed thread names 2019-02-11 00:15:14 +03:00
alexey-milovidov
0dd618b9ad
Merge pull request #4326 from yandex/duplicate-includes
Removed duplicate includes
2019-02-10 22:31:37 +03:00
alexey-milovidov
c6a01ccfb3
Merge pull request #4325 from yandex/k3box-arbitrary-const-expressions-in-limit
Add arbitrary const expressions in limit processing (cleanups)
2019-02-10 22:29:58 +03:00
Alexey Milovidov
d9ab923a2a Fixed typo 2019-02-10 21:14:23 +03:00
Alexey Milovidov
ba3cb83a84 Removed duplicate includes 2019-02-10 20:12:22 +03:00
Alexey Milovidov
58a6accee5 Updated test #4246 2019-02-10 19:55:12 +03:00
alexey-milovidov
09ee8816a1
Merge pull request #4323 from yandex/low-cardinality-production-ready
LowCardinality data type is production ready
2019-02-10 19:41:57 +03:00
Alexey Milovidov
d22b52b933 Allow constant expressions in LIMIT BY and TOP; fixed error #4246 2019-02-10 18:27:27 +03:00
Alexey Milovidov
c603d270f4 Cleanups #4246 2019-02-10 18:17:45 +03:00
alexey-milovidov
75c087bcf5
Merge branch 'master' into arbitrary-const-expressions-in-limit 2019-02-10 17:20:31 +03:00
Alexey Milovidov
12d4dc8592 Renamed setting #4198 2019-02-10 02:53:57 +03:00
alexey-milovidov
5853de4d2b
Merge pull request #4198 from edonin/master
Support of Nullable types in MySQL tables
2019-02-10 02:45:45 +03:00
Alexey Milovidov
0eee4d42cb LowCardinality data type is production ready 2019-02-10 00:55:51 +03:00
alexey-milovidov
9650c4a0da
Merge pull request #4286 from nikvas0/nikvas0/index_fix
Data Skipping Indices fix
2019-02-10 00:53:04 +03:00
alexey-milovidov
2777e54a57
Merge pull request #4287 from yandex/mutations-introspection
KILL MUTATION
2019-02-10 00:51:30 +03:00
alexey-milovidov
bb333643f0
Merge pull request #4307 from 4ertus2/joins
New portion of SyntaxAnalyzer refactoring
2019-02-09 01:04:46 +03:00
chertus
c24ba390b3 fix test 2019-02-08 20:21:28 +03:00
Alexey Milovidov
3d55e375ff Merge branch 'master' of github.com:yandex/ClickHouse 2019-02-08 19:54:15 +03:00
Alexey Milovidov
277484297a Aggregator: miscellaneous 2019-02-08 19:54:04 +03:00
chertus
668b220258 fix push down 2019-02-08 18:37:43 +03:00
alesapin
dc98b50f14 Fix HTTP insert 2019-02-08 16:24:24 +03:00
Alexey Milovidov
94d43c4cb2 Fixed error with dangling pointer on stack to ThreadStatus 2019-02-08 16:23:10 +03:00
chertus
6309377323 remove fix for JOIN ON columns in collectUsedColumns 2019-02-08 14:14:48 +03:00
Nikita Vasilev
cecbd5d0ac Merge remote-tracking branch 'upstream/master' into nikvas0/index_fix 2019-02-08 00:17:35 +03:00
chertus
db9a2060bf get rid of custom JOIN ON names qualification 2019-02-07 22:18:40 +03:00
alesapin
b0a77ff3f7 Allow to insert from any format 2019-02-07 16:58:36 +03:00
Alexey Zatelepin
398a617bfd don't throw exceptions when a query can't be killed (e.g. ALTER queries)
Instead report it in the KILL QUERY results
2019-02-07 16:53:06 +03:00
Emmanuel Donin de Rosière
cde57600d9 Support of Nullable types in MySQL function
Add setting 'external_tables_use_nulls'
2019-02-07 14:43:18 +01:00
alesapin
48bd750856 Fix perf-test input data and refactor two tests 2019-02-07 16:18:04 +03:00
Alexey Milovidov
596234e55c System logs: simplification 2019-02-06 21:33:29 +03:00
alexey-milovidov
2686f64233
Merge pull request #4128 from yandex/unified-sets
Unified sets
2019-02-06 20:40:11 +03:00
chertus
3fd3884b32 one more minor refactoring 2019-02-06 19:44:47 +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
chertus
9a8db441c3 some mote ExpressionAnalyzer refactoring 2019-02-06 17:48:05 +03:00
Alexey Zatelepin
3ec6f508f1 Merge branch 'master' into mutations-introspection
Conflicts:
	dbms/src/Interpreters/InterpreterKillQueryQuery.cpp
2019-02-06 15:22:48 +03:00
Nikita Vasilev
6ef6536460 Merge remote-tracking branch 'upstream/master' into nikvas0/index_fix 2019-02-06 14:23:35 +03:00
Nikita Vasilev
9eaabcbf3f Merge remote-tracking branch 'upstream/master' into nikvas0/index_fix 2019-02-05 22:19:47 +03:00
alexey-milovidov
fda5aa31c2
Merge pull request #4279 from 4ertus2/joins
hotfix for duplicates in JOIN ON
2019-02-05 22:07:10 +03:00
Alexey Zatelepin
1bf4174ec1 check readonly when executing KILL QUERY [#CLICKHOUSE-3912] 2019-02-05 21:09:16 +03:00
Alexey Zatelepin
4b4539139b use enum for KILL query type [#CLICKHOUSE-3912] 2019-02-05 21:09:16 +03:00
Alexey Zatelepin
d482f3e5d0 return CancellationCode from killMutation [#CLICKHOUSE-3912] 2019-02-05 21:09:15 +03:00
Alexey Zatelepin
059c1b3589 write part_log.partition_id everywhere 2019-02-05 21:09:15 +03:00
Alexey Zatelepin
59bbd8c8dc refactor InterpreterKillQuery a bit [#CLICKHOUSE-3912] 2019-02-05 21:08:55 +03:00
Alexey Zatelepin
67be566325 KILL MUTATION skeleton [#CLICKHOUSE-3912] 2019-02-05 21:08:41 +03:00
chertus
396d4fb921 hotfix for duplicates in JOIN ON #4271 2019-02-05 19:58:57 +03: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
Nikita Vasilev
87a80a4361 fixed create as 2019-02-05 16:52:45 +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
91c63c201c Delete commented code. 2019-02-05 13:55:08 +03:00
Nikolai Kochetov
df3ec47e1d Implemented sets using ColumnsHashing. 2019-02-05 13:55:08 +03:00
Nikolai Kochetov
3afc0c8108 Disable prev key optimization for string keys. 2019-02-05 13:55:08 +03:00
Nikolai Kochetov
264da7f9d3 Implemented sets using ColumnsHashing. 2019-02-05 13:55:15 +03:00
Nikolai Kochetov
10b49f3a74 Removed old key getters from Join. 2019-02-05 13:55:08 +03:00
Nikolai Kochetov
8db4116464 Update HashMethodHashed. 2019-02-05 13:55:08 +03:00
Alexey Milovidov
29c3195742 Removed bad code; fixed error 2019-02-05 02:18:04 +03:00
alexey-milovidov
23ad22b8a1
Merge pull request #4254 from yandex/fix-system-log-create-on-shutdown
Fixed weird behaviour of system logs
2019-02-05 00:11:36 +03:00
alexey-milovidov
f2c95bf243
Merge pull request #4266 from 4ertus2/cross
CROSS to INNER JOIN (analyze expressions)
2019-02-05 00:10:51 +03:00
Alexey Milovidov
f4ee9f4db8 Merge branch 'master' of github.com:yandex/ClickHouse into fix-system-log-create-on-shutdown 2019-02-04 22:02:10 +03:00
alexey-milovidov
143f14cd64
Merge pull request #4261 from yandex/fix-bad-query-id-in-log
Fixed bad code for printing query_id in text logs
2019-02-04 22:01:09 +03:00
chertus
27ba299c95 CROSS to INNER JOIN (analyze expressions) 2019-02-04 21:45:31 +03:00
Alexey Milovidov
5fcc02bab2 Fixed bad code for printing query_id in text logs 2019-02-04 18:39:08 +03:00
alexey-milovidov
39f8eb571f
Merge pull request #4213 from nvartolomei/nv/http-cancel
Cancel http read only queries if client socket goes away
2019-02-04 17:33:47 +03:00
Alexey Milovidov
a4d1cacea8 Fixed weird behaviour of system logs [#CLICKHOUSE-4275] 2019-02-04 17:08:39 +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
Vitaliy Karnienko
d9da430982 add arbitrary const expressions in limit processing 2019-02-03 21:31:17 +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
14f208b9a3
Merge pull request #4239 from danlark1/master
produce hints for typo functions and types
2019-02-02 20:42:35 +03:00
alexey-milovidov
7e5786a2e2
Merge pull request #4236 from kvinty/kvinty-pdqsort
Use pdqsort instead of std::sort in ORDER BY
2019-02-02 17:58:10 +03:00
Danila Kutenin
5e62a0825a produce hints for typo functions and types 2019-02-02 17:54:50 +03:00
alexey-milovidov
e3b32ec679
Merge pull request #4231 from fandyushin/queryid
Added Query-Id to http response header
2019-02-02 17:38:13 +03:00
Mihail Fandyushin
7b51139a80 fixed review notes; remove nullptr 2019-02-02 17:35:35 +03:00
Evgenii Pravda
67d26f6528 Use pdqsort instead of std::sort in ORDER BY 2019-02-02 16:52:20 +03:00
alexey-milovidov
fdfb60318c
Merge pull request #4193 from 4ertus2/ast
Refactoring: extract SubqueryForSet to own files
2019-02-02 15:28:31 +03:00
Mihail Fandyushin
7294b8adf2 Added Query-Id to http response header 2019-02-02 15:24:26 +03:00
Nicolae Vartolomei
3fdc04428e
Cancel http read only queries if client socket goes away
To check the socket status, try to read one byte from socket in a
non-blocking way:
      0 - client closed the connection
   >= 1 - client send more data, we are ignoring this case for now
timeout - normal case, client is waiting for response
    ... - socket broken?

Dirty, but should do the job. Limiting to readonly queries as I don't
want to mess with alter queries / insert select and others.
2019-02-02 12:14:52 +00:00
alexey-milovidov
297c2511c7
Merge pull request #4229 from nvartolomei/nv/typos
Make START REPLICATED SENDS command start replicated sends
2019-02-02 14:44:51 +03:00
Nicolae Vartolomei
f110d377d2
Fix typo in const name 2019-02-02 11:28:43 +00:00
Nicolae Vartolomei
5a8ebba4e1
Fix typo which prevents to start replicated sends 2019-02-02 11:27:27 +00:00
alexey-milovidov
25502718ae
Merge pull request #4221 from 4ertus2/cross
CROSS JOIN to INNER JOIN converter
2019-02-02 14:27:05 +03:00
chertus
f731702de0 rewrite COMMA JOIN too 2019-02-01 20:22:28 +03:00
chertus
170c108a59 CROSS JOIN to INNER JOIN converter 2019-02-01 19:36:40 +03:00
chertus
52de2cd927 hotfix for allow_experimental_multiple_joins_emulation 2019-02-01 17:26:36 +03:00
Nikolai Kochetov
6a729e59ba Merged with master. 2019-02-01 11:36:57 +03:00
Nikolai Kochetov
d143a78419 Refactor ColumnsHashing 2019-02-01 11:23:38 +03:00
alexey-milovidov
bd62e2d85d
Merge pull request #4184 from 4ertus2/joins
Fix JOIN with duplicates [issue-4108]
2019-02-01 01:35:37 +03:00
chertus
26b2526a3b fix right & full join with dups (complex join on still affected) 2019-01-31 21:10:16 +03:00
zhang2014
cac52f8312 ISSUES-3885 remove useless methods 2019-01-31 07:23:22 +08:00
chertus
866c2b2e78 move required right keys calculation to Join.cpp 2019-01-30 18:51:39 +03:00
proller
0e863fff1e Fix rethrowing exception #4188 2019-01-30 17:06:42 +03:00
chertus
d6450bc488 Refactoring: extract SubqueryForSet to own files 2019-01-30 15:01:00 +03:00
proller
1cfec66165 Merge remote-tracking branch 'upstream/master' into fix14 2019-01-30 13:01:45 +03:00
proller
dc34e8998c Better fix 2019-01-30 13:01:01 +03: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
Nikita Vasilev
c12b03d350 Merge remote-tracking branch 'upstream/master' into nikvas0/index 2019-01-29 23:00:12 +03:00
alexey-milovidov
fd5ab9ed2e
Merge pull request #4055 from yandex/fix-group-by-array-low-cardibality-arguments
Fix group by array low cardinality arguments
2019-01-29 21:32:45 +03:00
proller
4942e024b1 4177 4156 : Fix crash on dictionary reload if dictionary not available 2019-01-29 19:36:50 +03:00
Nikolai Kochetov
21242ad658 Added tests. Restored recursiveRemoveLowCardinality interface. 2019-01-29 18:44:02 +03:00
chertus
9c6f71bb7e fix inner and left join with duplicates [issue-4108] 2019-01-29 15:38:53 +03:00
Nikolai Kochetov
2c2932e185 Merged with master 2019-01-29 15:25:19 +03:00
Nikolai Kochetov
5d29562302 Fix build. 2019-01-29 13:56:44 +03:00
proller
343b31af66 More link with Threads::Threads 2019-01-28 21:21:20 +03:00
proller
2ab3138eb6 Merge remote-tracking branch 'upstream/master' into fix10 2019-01-28 17:01:06 +03:00
proller
2eee2d97df Update contrib/libmetrohash 2019-01-28 17:00:50 +03:00
Alexey Milovidov
4e3d9a0f15 Merge branch 'master' of github.com:yandex/ClickHouse into global-thread-pool 2019-01-28 14:20:24 +03:00
Nikita Vasilev
b2915bc844 Merge remote-tracking branch 'upstream/master' into nikvas0/index 2019-01-26 09:27:32 +03:00
Alexey Milovidov
253ac93459 Addition to prev. revision #4150 2019-01-25 21:44:30 +03:00
chertus
9539467b59 hotfix 2019-01-25 18:48:53 +03:00
chertus
091efcda95 add IdentifierSemantic and PredicateExpressionsOptimizer refactoring 2019-01-25 18:42:24 +03:00
Alexey Milovidov
468f8b4cfb Addition to prev. revision #4150 2019-01-25 17:08:01 +03:00
Alexey Milovidov
65f8e4d4a8 Merge branch 'master' into global-thread-pool 2019-01-25 16:33:50 +03:00
chertus
a0fafefc96 minor change - add Aliases.h 2019-01-25 14:43:19 +03:00
alexey-milovidov
20970154d8
Merge pull request #4141 from 4ertus2/ast
JOIN with USING: do not duplicate columns
2019-01-25 03:22:43 +03:00
Alexey Milovidov
854817c232 Fixed -Wshadow-field #4005 2019-01-24 22:37:32 +03:00
alexey-milovidov
f96b8e4ed6
Merge pull request #4005 from vitlibar/add-protobuf-output-format
Add protobuf output format
2019-01-24 22:05:23 +03:00
alexey-milovidov
18f1266dab
Merge pull request #4099 from yandex/mutations-fix-in
Get rid of IAST::range
2019-01-24 20:29:13 +03:00
Alexey Milovidov
0e59fe0b46 Renamed setting and variables #3973 2019-01-24 20:12:05 +03:00
chertus
ccd9bd0877 fix build 2019-01-24 18:06:15 +03:00
Nikolai Kochetov
f7b9059dad Merged with master 2019-01-24 18:06:11 +03:00
Nikolai Kochetov
5f1007a8df Refactor Join. 2019-01-24 17:56:04 +03:00
chertus
cbbf04204b JOIN with USING: do not duplicate columns 2019-01-24 17:22:58 +03:00
alexey-milovidov
f13d094a4e
Merge pull request #3973 from amosbird/join_overwrite
Add join_overwrite settings for StorageJoin.
2019-01-24 02:05:13 +03:00
Vitaly Baranov
67fca7e029 Add support for settings 'format_schema' in an output query.
This fixes syntax error when executing 'SELECT ... FORMAT ... SETTINGS format_schema=...'
2019-01-23 22:23:37 +03:00