Commit Graph

4118 Commits

Author SHA1 Message Date
sundy-li
38d4d2937e Support more AlterType in distribute DDL 2019-06-12 18:50:50 +08:00
Ivan Lezhankin
97558c1b41 Merge remote-tracking branch 'upstream/master' into issue-5286 2019-06-10 14:15:14 +03:00
Alexander Tretiakov
dec0430327 check for trash 2019-06-05 23:04:17 +02:00
Alexander Tretiakov
8d91419a25 fix 2019-06-05 17:07:50 +03:00
Alexander Tretiakov
905856f02d merge 2019-06-05 17:02:13 +03:00
Orivej Desh
5ec179377a DEVTOOLS-5170 Delete Y_IGNORE markers (#5533)
They have been superseded by a new include resolution configuration that lives
outside clickhouse source tree.
2019-06-05 14:52:39 +03:00
Alexander Tretiakov
d97c2ccdc8 support complex datatype 2019-06-04 21:15:32 +03:00
Alexander Tretiakov
2f1a03dac0 merge 2019-06-04 21:08:08 +03:00
Ivan Lezhankin
b311984879 Merge remote-tracking branch 'upstream/master' into issue-5286 2019-06-03 17:19:09 +03:00
Konstantin Podshumok
633f2f2664 limit remote timeouts to max_execution_time for SelectStreamFactory 2019-06-02 12:43:20 +03:00
Konstantin Podshumok
d52be42c37 use new timeouts in ClusterProxy 2019-06-02 12:43:20 +03:00
Konstantin Podshumok
bebd19135a remove connections_with_failover_max_tries and getSaturated(settings.max_execution_time) from Cluster 2019-06-02 12:43:20 +03:00
alexey-milovidov
086572b604
Merge pull request #5503 from 4ertus2/bugs
Fix union all supertype column
2019-06-02 06:18:33 +03:00
alesapin
117c9edda7
Merge pull request #5489 from azat-archive/DDLWorker-fix
Skip ZNONODE during DDL query processing
2019-05-31 18:34:47 +03:00
chertus
28c1a60eb7 fix union all supertype column 2019-05-31 15:36:44 +03:00
Azat Khuzhin
eb5f46fb07
Skip ZNONODE during DDL query processing
Right now if another node removes the znode in task_queue, the one that
did not process it, but already get list of children, will terminated
the DDLWorker thread, and this is very unconvinient because you do not
have any sane way to know is DDLWorker still running or not (except for
timed out DDL queries or via debugger), and the clickhouse-server it
self do not fail either.

Fixes: #5064
2019-05-30 20:25:29 +03:00
Olga Khvostikova
2fc3ce7f5d
Merge branch 'master' into low-cardinality 2019-05-30 16:31:40 +03:00
proller
a813a001e2
Allow to use internal compiler with system includes (fix compile for freebsd) (#5447)
* Allow to use internal compiler with system includes (fix compile for freebsd)
* Fix macos build
2019-05-30 15:58:15 +03:00
stavrolia
60459bbb87 Yet another fix 2019-05-29 20:49:35 +03:00
stavrolia
605de8c36c Fixed 2019-05-29 17:59:11 +03:00
zhang2014
80788cd7a8 Rename system sync distributed to system flush distributed 2019-05-29 10:43:52 +08:00
zhang2014
1a33840964 fix review 2019-05-29 10:43:52 +08:00
zhang2014
c44f608868 support replicas system queries for distributed 2019-05-29 10:43:52 +08:00
stavrolia
3edf296aa3 Change error message 2019-05-28 22:09:40 +03:00
stavrolia
0a5fb04b56 One more fixed 2019-05-28 21:32:14 +03:00
stavrolia
aa0e227288 Fixed 2019-05-28 21:08:47 +03:00
stavrolia
976815660f Fix improvement of check 2019-05-28 20:28:17 +03:00
stavrolia
a91e72eb39 Improve check 2019-05-28 19:45:27 +03:00
stavrolia
4cd595b450 Add setting allow suspicious types for low cardinality with long message about error (fixed #4965) 2019-05-28 19:10:55 +03:00
Alexander Tretiakov
212731b3e2 merge 2019-05-26 01:45:15 +03:00
alexey-milovidov
461c4919d3
Merge pull request #5116 from PerformanceVision/send_header
Send a X-ClickHouse summary on the header for HTTP client with number of rows inserted
2019-05-25 20:20:35 +03:00
Alexey Milovidov
207d2048c6 Added forward declarations 2019-05-25 17:15:22 +03:00
Alexey Milovidov
b94f2be154 Merge branch 'mysql' of https://github.com/yurriy/ClickHouse into yurriy-mysql 2019-05-25 17:14:57 +03:00
Alexander Tretiakov
946fa5b47e fix style and add tests 2019-05-25 16:43:52 +03:00
alexey-milovidov
bffe621d94
Merge pull request #5407 from kvap/all-columns-required-in-limit-by
Mark all input columns in LIMIT BY as required output
2019-05-25 15:13:01 +03:00
alexey-milovidov
9e24c8d19a
Merge pull request #5396 from 4ertus2/ast
Support IN in CrossToInnerJoin push down predicates
2019-05-25 14:07:45 +03:00
alexey-milovidov
661d661d57
Update CrossToInnerJoinVisitor.cpp 2019-05-25 14:05:12 +03:00
proller
6c1cb02172 CLICKHOUSE-4523 Fix "Column '0' already exists" in SELECT .. PREWHERE on column with DEFAULT (#5397)
* CLICKHOUSE-4523 Fix "Column '0' already exists" in SELECT .. PREWHERE on column with DEFAULT

* fix style

* Fix build

* Update iostream_debug_helpers.cpp

* Update evaluateMissingDefaults.cpp
2019-05-25 14:03:12 +03:00
alexey-milovidov
1d98441c34
Update ExpressionAnalyzer.cpp 2019-05-25 13:51:48 +03:00
chertus
9eca696e82 actualize isNumber for Decimal 2019-05-24 15:11:03 +03:00
Constantin S. Pan
cbc0f56af1 Mark all input columns in LIMIT BY as required output
The query analyzer only marks the actual arguments of LIMIT BY as required
output for the LimitBy step in the pipeline. This is fine, unless the query is
distributed, in which case the first stage might remove a column that is used
at the second stage (e.g. for ORDER BY) but is not part of the final select.

Prevent removal of any columns in LimitBy by marking all input columns as
required output.
2019-05-24 09:53:09 +01:00
chertus
333c9aeecc support IN in CrossToInnerJoin push down 2019-05-23 19:01:17 +03:00
Ivan Lezhankin
800854119e Add buffer callback to fill in virtual columns 2019-05-23 14:15:18 +03:00
Alexander Tretiakov
9099f1810b merge 2019-05-22 17:41:35 +03:00
Ivan Lezhankin
cf39c4cc47 Embed virtual columns into IStorage 2019-05-21 14:24:32 +03:00
Guillaume Tassery
938d6d7f24 coding style 2019-05-21 11:06:36 +07:00
chertus
187311add0 add decimal to decimal convertion in IN 2019-05-20 18:51:54 +03:00
Guillaume Tassery
77b7158cd8 Progress rename for total_rows and write_[rows|bytes] 2019-05-20 18:37:41 +07:00
Alexander Tretiakov
f6812bbb1a fix style 2019-05-19 02:57:26 +03:00
Alexander Tretiakov
c661f5c0a1 new 2019-05-19 00:07:23 +03:00
Ivan Lezhankin
0821d62516 Merge ITableDeclaration into IStorage.
Also a couple of massive include-refactorings with better forwarding
2019-05-17 17:34:25 +03:00
Yuriy
0cd3094240 fixed stack buffer overflow 2019-05-16 20:15:43 +03:00
Yuriy
a51c293ec6 merged 'origin/master' into mysql 2019-05-16 14:19:05 +03:00
Yuriy
ff4937859e added MySQL wire protocol presentational format 2019-05-16 06:34:04 +03:00
chertus
b166791176 batched version of RowRefList 2019-05-14 17:40:43 +03:00
chertus
6200d20dc2 RowRefList refactoring 2019-05-14 17:39:03 +03:00
chertus
20e7de7cce fix perf regression: do not add right join key to result if possible 2019-05-13 21:58:15 +03:00
Guillaume Tassery
1ae8948177 Merge branch 'master' of https://github.com/yandex/ClickHouse into send_header 2019-05-13 13:35:12 +07:00
alexey-milovidov
001e4bfe76
Merge pull request #5209 from PerformanceVision/rename_mv
Support rename operation for MaterializeView storage
2019-05-09 23:10:41 +03:00
alexey-milovidov
a1cb9a2d67
Merge pull request #5152 from janplus/bug-null-in
Fix null problem in FunctionIn
2019-05-09 19:22:41 +03:00
Guillaume Tassery
c8bf190f84 add unsafe function member for (add|remove)dependency for calling manually the context locking 2019-05-09 13:12:02 +07:00
chertus
4969ad2f98 correct comment & some renames 2019-05-08 13:53:45 +03:00
chertus
74feef7e53 Join.h refactoring: remove unneeded specialisations 2019-05-07 21:21:44 +03:00
吴健
84ee8cec93 Add function ignoreExceptNull to meet nullable functionIn's requirement for optimization of analyse. 2019-05-07 13:20:23 +08:00
Guillaume Tassery
6dcaadc620 Merge remote-tracking branch 'upstream/master' into send_header 2019-05-06 17:18:41 +07:00
Guillaume Tassery
55842dce10 code style 2019-05-06 13:57:48 +07:00
zhang2014
359e4c33bd try fix push require columns with join 2019-05-05 19:12:07 +08:00
Alexey Milovidov
a6ca9f266f Removed huge chunk of bad code 2019-05-03 05:00:57 +03:00
Alexey Milovidov
270a31abb5 Rename method for consistency 2019-05-02 19:07:23 +03:00
alexey-milovidov
d4b4a9425b
Merge pull request #5154 from yandex/fix-low-cardinality-keys-in-set-index
LowCardinality keys in set index
2019-05-01 20:19:04 +03:00
Nikolai Kochetov
6a3966cd08
Update PreparedSets.h 2019-04-30 17:46:17 +03:00
Vitaly Baranov
19259ab5e3 Get rid of thread_local in SettingsConstraints.cpp 2019-04-30 17:09:10 +03:00
Nikolai Kochetov
6b2656b02c Remove LowCardinality from types in PreparedSetKey. #5031 2019-04-30 13:34:12 +03:00
alexey-milovidov
0a34e05130
Merge pull request #5138 from CurtizJ/limit-by-offset
Added support of LIMIT n, m BY clause.
2019-04-30 00:17:29 +03:00
CurtizJ
7766f5c0c3 added offset for limit by 2019-04-29 16:12:39 +03:00
alexey-milovidov
0a88bcbb48
Merge pull request #5129 from kvinty/msd-radix-sort
[WIP] Add MSD radix sort
2019-04-29 04:50:27 +03:00
Evgenii Pravda
91ccf2ab20 Fixes 2019-04-27 20:52:43 +03:00
Vitaly Baranov
7801671225 Use shared_ptr to avoid copying SettingsConstraints 2019-04-27 01:09:16 +03:00
Vitaly Baranov
7e3c8d6022 Implement new constraints: "min" and "readonly". 2019-04-27 01:09:16 +03:00
Evgenii Pravda
568ef78803 Add MSD radix sort 2019-04-27 01:07:32 +03:00
Vitaly Baranov
77e7838c30 Implemented iterators in the SettingsCollection template class 2019-04-26 19:11:05 +03:00
Vitaly Baranov
d43e7a8960 Implement max constraints for number settings. 2019-04-26 19:11:05 +03:00
Vitaly Baranov
8277e9d8f1 Refactoring of Settings based on new template class SettingsCollection.
Add new class SettingsConstraints.
2019-04-26 19:11:05 +03:00
Guillaume Tassery
7b1be6efc4 Clode cleaning and add test for X-ClickHouse-Summary header 2019-04-26 10:46:52 +07:00
Guillaume Tassery
ced71ac9fd Send how many rows and bytes were written during the query 2019-04-25 18:25:49 +07:00
Alexey Milovidov
661c840fbe Code cleanups after #4439 2019-04-25 04:16:26 +03:00
Alexey Milovidov
b52f1257a9 Removed useless include 2019-04-23 19:48:46 +03:00
Alexey Milovidov
58d7d1e451 Resolved some of PVS-Studio warnings 2019-04-22 19:07:09 +03:00
Ivan
118bea2be6
Enable predicate push-down optimization by default. (#4846)
* Enable predicate push-down optimization by default.
* Forbid push-downs for some JOIN cases.
* Fix existing tests
* Forbid optimization if a select query has ARRAY JOIN on any side.
2019-04-18 13:39:25 +03:00
Vitaly Baranov
345ae9aaa5
Merge pull request #5037 from vitlibar/fix-ubsan-errors
Fix ubsan errors
2019-04-17 23:39:01 +03:00
Vitaly Baranov
58a9105038 Fix ubsan error "outside the range of representable values" in convertFieldToType.cpp 2019-04-17 19:10:40 +03:00
alexey-milovidov
7b201a9491
Merge pull request #4986 from 4ertus2/ast
Partially fix distributed_product_mode=local columns access
2019-04-17 17:59:01 +03:00
Artem Zuikov
29c92372a2
Merge pull request #4993 from 4ertus2/asof
Radix sort for ASOF JOIN
2019-04-16 21:31:21 +03:00
alexey-milovidov
76b6d43a53
Merge pull request #5001 from 4ertus2/bugs
Fix select distinct with join
2019-04-16 20:08:15 +03:00
chertus
041f299979 Merge branch 'master' into bugs 2019-04-16 15:48:56 +03:00
chertus
a519e7f01a Merge branch 'master' into asof 2019-04-16 15:48:28 +03:00
Vitaly Baranov
39c71075fa Don't wait for the reloading when it's been doing in another thread. 2019-04-16 14:40:36 +03:00
Vitaly Baranov
6d96443440 Resolve correctly when dictionary depends on dictionary 2019-04-15 20:40:45 +03:00
chertus
7697b18b07 enable RadixSort for ASOF JOIN over UInt32 2019-04-15 17:09:39 +03:00
chertus
9c80466230 add comment 2019-04-15 14:22:51 +03:00
alesapin
8cd18c0723
Merge pull request #4991 from yandex/fix_ddl_on_relicated_table
Do not send queries received from DDLWorker to leader replica
2019-04-15 13:07:55 +03:00
Anton Popov
7f93f9ad2f TTL for columns and tables (#4212)
Add TTL for columns and tables.
2019-04-15 12:30:45 +03:00
Danila Kutenin
b81e0f51f1 fix compilation in clickhouse 2019-04-14 13:37:25 +03:00
chertus
950f8a7042 fix distinct with join 2019-04-12 20:04:38 +03:00
chertus
4192deb5ad radix sort for asof join 2019-04-12 15:48:00 +03:00
alesapin
f47e3292e1 Do not send queries to leader replica received from DDLWorker 2019-04-12 14:06:05 +03:00
chertus
4707200f83 partially fix distributed_product_mode=local 2019-04-11 22:29:28 +03:00
alexey-milovidov
d083976b88
Merge pull request #4952 from 4ertus2/ast
Rewrite ASTSelectQuery (consistent children)
2019-04-11 13:38:44 +03:00
alexey-milovidov
7e7b458eb9
Merge pull request #4938 from 4ertus2/joins
Fix unexpected error in case of JOIN + ARRAY JOIN
2019-04-11 13:35:31 +03:00
chertus
ee6c83a2f7 global join: fix wrong name qualification (save replaced table name as alias) 2019-04-10 20:41:19 +03:00
chertus
e53a50e01a fix pushdown & build 2019-04-09 19:49:52 +03:00
chertus
9329410012 fix use after move 2019-04-09 17:59:06 +03:00
chertus
82dc1fb1db rewrite ASTSelectQuery (consistent children) 2019-04-09 17:22:35 +03:00
chertus
58d24c0840 join + array join: fix unexpected error 2019-04-08 15:35:26 +03:00
Artem Zuikov
cbb0404d19
Merge pull request #4924 from Gladdy/martijn-asof-speedup
Significant speedup of ASOF join
2019-04-06 21:38:46 +03:00
alexey-milovidov
04a163b952
Merge pull request #4922 from yandex/fix-issue-4919
Fix types for aggregate functions with low cardinality arguments.
2019-04-06 18:07:25 +03:00
Alexey Milovidov
07334ebad4 Fixed race condition in DNSCacheUpdater 2019-04-06 04:09:15 +03:00
Alexey Milovidov
571bc7065a Removed unused code related to MemoryTracker 2019-04-06 01:35:56 +03:00
Martijn Bakker
0848f53bed move the sorted atomic bool first in the class 2019-04-05 21:22:57 +01:00
Martijn Bakker
442c001fd5 fix style 2019-04-05 19:05:24 +01:00
Martijn Bakker
f96a7e401e remove the list lookup and prevent the global lock 2019-04-05 18:59:48 +01:00
Nikolai Kochetov
523c8e5ec1 Remove LowCardinality from aggregate function argument types. #4919 2019-04-05 19:52:31 +03:00
chertus
aae1e56214 fix typo 2019-04-05 15:57:08 +03:00
chertus
f50a0778fb fix missing column error message 2019-04-05 15:50:14 +03:00
chertus
e578020bd3 safe tables order in select * with multiple joins 2019-04-04 15:14:10 +03:00
chertus
6b49900e1a Asterisks for multiple joins CLICKHOUSE-4372 2019-04-03 19:06:05 +03:00
chertus
d5ffbd9b6d fix multithreaded ASOF JOIN crash 2019-04-02 21:50:35 +03:00
chertus
04efcf2bdc asof refactoring (searching for the crash reason) 2019-04-02 19:22:14 +03:00
chertus
886e6883e6 fix clang-7 build 2019-04-01 21:37:52 +03:00
chertus
9ed4ac7e82 get rid of macro in AsofRowRefs 2019-04-01 19:44:15 +03:00
Artem Zuikov
b6b9be7b8f
Merge pull request #4867 from Gladdy/martijn-asof-working-bt
Return the correct timestamp for the right-hand table of the ASOF join
2019-04-01 15:36:27 +03:00
Artem Zuikov
019c6ca591
Merge pull request #4794 from zhang2014/fix/crash_when_predicate
fix crash when predicate optimzer & join on
2019-04-01 15:09:50 +03:00
Martijn Bakker
d4ec3bbf70 fix style 2019-04-01 11:35:37 +01:00
Martijn Bakker
a64b8afc7e cleanup 2019-04-01 00:09:00 +01:00
Martijn Bakker
27776ca929 fix up wrong assumption that the sample_block_with_keys has same ordering as key_names_right 2019-03-31 22:56:37 +01:00
Martijn Bakker
7ea03f6fa7 appears to work and get the correct timestamps 2019-03-31 22:14:43 +01:00
Martijn Bakker
4a7393cfc6 include the asof column in the block stored. overall not working yet but at least doesnt crash anymore 2019-03-31 20:03:57 +01:00
chertus
11997ed772 fix build 2019-03-31 13:56:54 +03:00
Martijn Bakker
4709b744bb address the code review issues 2019-03-30 21:30:21 +00:00
Martijn Bakker
3ac66dfdb6 set default asof type value 2019-03-30 13:09:03 +00:00
Martijn Bakker
20e5fb61c4 fix style 2019-03-30 13:02:30 +00:00
Martijn Bakker
4a94545882 add test for multiple supported asof types 2019-03-30 12:52:48 +00:00
Martijn Bakker
7c5febb6aa Merge branch 'master' into martijn-asof-nomap 2019-03-30 02:02:48 +00:00
Martijn Bakker
389f108807 working multi type asof join columns 2019-03-30 01:32:08 +00:00
alexey-milovidov
0dee8cf79c
Merge pull request #4855 from 4ertus2/joins
Fix crash when joining nulluble vs not nullable
2019-03-30 02:15:50 +03:00
Martijn Bakker
89515861df asof join without using std::map, but still only on u32 2019-03-29 21:20:23 +00:00
Ivan
957d23267b
Minimal implementation of row-level security CLICKHOUSE-4315 (#4792)
For detailed description see the related PR
2019-03-29 23:31:06 +03:00
alexey-milovidov
cb486da9cd
Merge pull request #4852 from zhang2014/improvement/const_interpreter
Const context for insert interpreter
2019-03-29 21:42:35 +03:00
chertus
6bdbf75e30 fix crash when joining nulluble vs not nullable 2019-03-29 21:07:22 +03:00
zhang2014
aab314f154 const insert interpreter 2019-03-29 23:47:16 +08:00