Alexander Tokmakov
2b566c5bdf
basic check for dependencies on drop table
2021-11-01 22:20:18 +03:00
Vitaly Baranov
3ed7f8f0b3
Move access-rights' source files needed for parser to a separate target.
2021-11-01 19:13:49 +03:00
Nikolay Degterinsky
d76976e272
Merge branch 'master' into query_parameters
2021-10-18 17:34:20 +03:00
Maksim Kita
83879415b4
Fixed tests
2021-10-14 22:12:06 +03:00
Maksim Kita
c1f04452de
AddDefaultDatabaseVisitor support dictGet
2021-10-14 16:31:32 +03:00
Nikolay Degterinsky
63faf0212d
Merge branch 'master' into query_parameters
2021-10-13 23:55:09 +03:00
tavplubix
7742b96497
Remove metadata leftovers on drop database ( #30054 )
...
* remove metadata leftovers on drop database
* Update InterpreterDropQuery.cpp
* Update DatabaseCatalog.cpp
2021-10-13 13:34:18 +03:00
Nikolay Degterinsky
49c1a52f34
Merge branch 'master' into query_parameters
2021-10-13 03:04:40 +03:00
feng lv
ee1fd495ea
remove redundant dot in exception message
2021-10-12 05:30:35 +00:00
Nikolay Degterinsky
e03bf0c526
Merge branch 'master' into query_parameters
2021-10-04 17:23:17 +03:00
Alexey Milovidov
fe6b7c77c7
Rename "common" to "base"
2021-10-02 10:13:14 +03:00
Nikolay Degterinsky
7f3d395bf3
Merge branch 'master' into query_parameters
2021-09-30 02:01:33 +03:00
Alexey Milovidov
a2c2b3a866
Whitespaces
2021-09-25 02:12:26 +03:00
Alexey Milovidov
3284b2c8de
Fix typo in comment
2021-09-25 02:10:10 +03:00
Nikolay Degterinsky
1b1d90deb8
Merge branch 'master' into query_parameters
2021-09-22 13:53:56 +03:00
Nikolay Degterinsky
22f59e1714
Add support for table and database query parameters
2021-09-07 01:19:02 +03:00
Alexander Tokmakov
024a24aaf7
better code, moar logging
2021-09-02 12:19:37 +03:00
Alexander Tokmakov
c8d8f0a38c
fix
2021-08-31 15:07:00 +03:00
Alexander Tokmakov
b387f05d9c
resolve table dependencies on metadata loading
2021-08-30 22:29:22 +03:00
Amos Bird
de9e591619
Fast load by delaying table startup
2021-08-30 10:15:32 +08:00
Amos Bird
0169fce78e
Projection bug fixes and refactoring.
2021-08-26 19:09:31 +08:00
Denny Crane
df3ba20642
Update InterpreterCreateQuery.cpp
...
Fix setting name "allow_experimental_database_materialized_postgresql"
2021-08-18 12:05:43 -03:00
tavplubix
d8375a88ec
Update InterpreterCreateQuery.cpp
2021-08-10 12:42:01 +03:00
Alexander Tokmakov
8e1e53fb68
fix
2021-08-05 14:14:50 +03:00
mergify[bot]
dc57254982
Merge branch 'master' into improve_create_or_replace
2021-08-03 11:39:07 +00:00
Alexander Tokmakov
42a8bb6872
fix assertions in Replicated database
2021-08-02 16:19:11 +03:00
kssenii
58b3a3f3fc
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into versioning
2021-07-29 19:56:27 +00:00
Alexander Tokmakov
a7e644f774
support old name
2021-07-26 21:24:32 +03:00
Alexander Tokmakov
63ab38ee09
rename MaterializeMySQL to MaterializedMySQL
2021-07-26 21:17:28 +03:00
Alexander Tokmakov
c0bbe67cc9
fix
2021-07-06 13:26:03 +03:00
Alexander Tokmakov
5e44fa32b4
Merge branch 'master' into improve_create_or_replace
2021-07-06 11:50:43 +03:00
Alexander Tokmakov
aa3f0b2032
fix
2021-07-02 19:39:55 +03:00
Alexander Tokmakov
d9a77e3a1a
improve CREATE OR REPLACE query
2021-07-01 16:21:38 +03:00
kssenii
9d5847a1a8
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica
2021-06-29 21:30:31 +00:00
Maksim Kita
352e1f27ff
Update using Map datatyle in system log tables before merge
2021-06-28 14:42:21 +03:00
Maksim Kita
294b937a39
Merge branch 'system-query-log-map-type-merge' into system-querylog-map-continue
2021-06-28 11:27:59 +03:00
kssenii
c3a2fc0584
Review fixes
2021-06-27 19:17:17 +00:00
kssenii
3d90f0710c
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica
2021-06-26 22:04:47 +00:00
Maksim Kita
008adabec2
Support REPLACE DICTIONARY, CREATE OR REPLACE DICTIONARY queries
2021-06-26 14:28:13 +03:00
Mike Kot
4c391f8e99
SYSTEM RESTORE REPLICA replica [ON CLUSTER cluster] ( #13652 )
...
* initial commit: add setting and stub
* typo
* added test stub
* fix
* wip merging new integration test and code proto
* adding steps interpreters
* adding firstly proposed solution (moving parts etc)
* added checking zookeeper path existence
* fixing the include
* fixing and sorting includes
* fixing outdated struct
* fix the name
* added ast ptr as level of indirection
* fix ref
* updating the changes
* working on test stub
* fix iterator -> reference
* revert rocksdb submodule update
* fixed show privileges test
* updated the test stub
* replaced rand() with thread_local_rng(), updated the tests
updated the test
fixed test config path
test fix
removed error messages
fixed the test
updated the test
fixed string literal
fixed literal
typo: =
* fixed the empty replica error message
* updated the test and the code with logs
* updated the possible test cases, updated
* added the code/test milestone comments
* updated the test (added more testcases)
* replaced native assert with CH one
* individual replicas recursive delete fix
* updated the AS db.name AST
* two small logging fixes
* manually generated AST fixes
* Updated the test, added the possible algo change
* Some thoughts about optimizing the solution:
ALTER MOVE PARTITION .. TO TABLE -> move to detached/ + ALTER ... ATTACH
* fix
* Removed the replica sync in test as it's invalid
* Some test tweaks
* tmp
* Rewrote the algo by using the executeQuery instead of
hand-crafting the ASTPtr.
Two questions still active.
* tr: logging active parts
* Extracted the parts moving algo into a separate helper function
* Fixed the test data and the queries slightly
* Replaced query to system.parts to direct invocation,
started building the test that breaks on various parts.
* Added the case for tables when at least one replica is alive
* Updated the test to test replicas restoration by detaching/attaching
* Altered the test to check restoration without replica restart
* Added the tables swap in the start if the server failed last time
* Hotfix when only /replicas/replica... path was deleted
* Restore ZK paths while creating a replicated MergeTree table
* Updated the docs, fixed the algo for individual replicas restoration case
* Initial parts table storage fix, tests sync fix
* Reverted individual replica restoration to general algo
* Slightly optimised getDataParts
* Trying another solution with parts detaching
* Rewrote algo without any steps, added ON CLUSTER support
* Attaching parts from other replica on restoration
* Getting part checksums from ZK
* Removed ON CLUSTER, finished working solution
* Multiple small changes after review
* Fixing parallel test
* Supporting rewritten form on cluster
* Test fix
* Moar logging
* Using source replica as checksum provider
* improve test, remove some code from parser
* Trying solution with move to detached + forget
* Moving all parts (not only Committed) to detached
* Edited docs for RESTORE REPLICA
* Re-merging
* minor fixes
Co-authored-by: Alexander Tokmakov <avtokmakov@yandex-team.ru>
2021-06-20 11:24:43 +03:00
hexiaoting
21028ea936
Add more type checks
2021-06-15 16:40:34 +08:00
hexiaoting
4608d1ebde
Fix error
2021-06-08 12:30:40 +08:00
Alexey Milovidov
17962459f5
Merge branch 'master' into issue-16775
2021-06-06 02:18:28 +03:00
hexiaoting
02f52bfbf2
Add type check when create materialized view with to table
2021-06-03 13:30:24 +08:00
kssenii
12ea45e956
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica
2021-06-01 17:43:34 +00:00
kssenii
7453d0ce58
Fxi checks
2021-06-01 08:45:04 +00:00
kssenii
32095a2b74
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into versioning
2021-06-01 08:01:06 +00:00
Vxider
3a5b0632c9
Merged with master
2021-06-01 07:39:42 +00:00
kssenii
e510c3839e
More correct
2021-05-31 22:09:54 +00:00
Alexey Milovidov
4187aa444b
Fix typo. Remove "allow_experimental_bigint_types" setting.
2021-05-31 22:21:28 +03:00
Nikolai Kochetov
afc1fe7f3d
Make ContextPtr const by default.
2021-05-31 17:49:02 +03:00
Vxider
ac0468d389
Merged with master
2021-05-28 09:14:55 +00:00
Vxider
ad05f4f303
Merged with master
2021-05-28 07:36:19 +00:00
kssenii
e56b10f07c
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica
2021-05-26 21:55:10 +00:00
Alexey Milovidov
d32819f068
Mark false positives for PVS-Studio
2021-05-24 06:59:12 +03:00
Alexey Milovidov
54f0591aa5
Allow to ATTACH a table with experimental codecs
2021-05-24 06:47:00 +03:00
Alexey Milovidov
ff7b5d34bb
Mark false positives for PVS-Studio
2021-05-24 02:56:03 +03:00
alexey-milovidov
1ed30f7246
Merge branch 'master' into issue-16775
2021-05-22 17:14:23 +03:00
Nikita Vasilev
6102ea643a
Merge remote-tracking branch 'upstream/master' into nikvas0/simple_optimizations
2021-05-16 19:51:41 +03:00
kssenii
0955e5f0be
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica
2021-05-12 15:11:15 +00:00
Nikolai Kochetov
a1ba67e029
Merge pull request #20202 from amosbird/projection
...
Projections
2021-05-12 09:38:07 +03:00
Amos Bird
264cff6415
Projections
...
TODO (suggested by Nikolai)
1. Build query plan fro current query (inside storage::read) up to WithMergableState
2. Check, that plan is simple enough: Aggregating - Expression - Filter - ReadFromStorage (or simplier)
3. Check, that filter is the same as filter in projection, and also expression calculates the same aggregation keys as in projection
4. Return WithMergableState if projection applies
3 will be easier to do with ActionsDAG, cause it sees all functions, and dependencies are direct (but it is possible with ExpressionActions also)
Also need to figure out how prewhere works for projections, and
row_filter_policies.
wip
2021-05-11 18:12:23 +08:00
Nikita Vasilev
af9f811ab5
Merge remote-tracking branch 'upstream/master' into nikvas0/simple_optimizations
2021-05-10 22:08:58 +03:00
Azat Khuzhin
80f4059deb
Drop unused getDictionaryConfigurationFromAST.h
2021-05-09 14:25:45 +03:00
hexiaoting
a1d521902c
Merge remote-tracking branch 'origin/master' into dev-continue-sundyli
2021-05-07 14:22:53 +08:00
fibersel
cb53bbb7b0
add experimental codecs flag, add integration test for experimental codecs
2021-05-06 14:57:22 +03:00
kssenii
7643d84095
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica
2021-04-30 22:02:51 +00:00
Nikita Vasilev
0ec2726bf3
Merge remote-tracking branch 'upstream/master' into nikvas0/simple_optimizations
2021-04-26 17:33:32 +03:00
Nikita Vasilev
4650e36d05
improve constrdescr
2021-04-26 17:19:18 +03:00
Maksim Kita
561b045991
Fixed tests
2021-04-26 13:52:41 +03:00
Maksim Kita
64f49a981b
Fixed tests
2021-04-26 13:52:41 +03:00
Maksim Kita
3cb4d1bdcb
Fixed style check
2021-04-26 13:52:41 +03:00
Maksim Kita
a9917a6540
Refactored StorageDictionary
2021-04-26 13:52:41 +03:00
tavplubix
738d8a757b
Merge pull request #23189 from ClickHouse/minor_fixes_in_attach_query
...
Minor fixes in ATTACH query
2021-04-20 20:04:26 +03:00
Alexander Tokmakov
4108a235f5
make separate functions
2021-04-20 14:22:02 +03:00
kssenii
88b50621d4
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica
2021-04-18 14:40:37 +00:00
Alexander Tokmakov
0354312294
minor fixes in attach query
2021-04-17 22:43:02 +03:00
Alexander Tokmakov
ebf0a3119e
fix data_type_default_nullable on attach
2021-04-16 13:29:33 +03:00
alexey-milovidov
9b546f3b89
Merge pull request #22657 from amosbird/ctefix3
...
Fix CTE usage in view definition
2021-04-15 02:01:10 +03:00
Alexander Tokmakov
05e4c8d3ef
fix attach mv in atomic db
2021-04-13 22:13:26 +03:00
kssenii
beae1c5fa4
Use ContextPtr
2021-04-11 08:08:32 +00:00
kssenii
c1adece94f
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica
2021-04-11 06:00:18 +00:00
Ivan
495c6e03aa
Replace all Context references with std::weak_ptr ( #22297 )
...
* Replace all Context references with std::weak_ptr
* Fix shared context captured by value
* Fix build
* Fix Context with named sessions
* Fix copy context
* Fix gcc build
* Merge with master and fix build
* Fix gcc-9 build
2021-04-11 02:33:54 +03:00
kssenii
1c501e7d97
Support replica identity index
2021-04-10 16:10:28 +00:00
kssenii
bd207daa74
Use only atomic database
2021-04-08 22:38:46 +00:00
kssenii
9fa21a6272
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica
2021-04-08 12:18:54 +00:00
Amos Bird
46c9affa83
Fix CTE in view.
2021-04-06 11:32:16 +08:00
alexey-milovidov
0c70b06960
Merge branch 'master' into system-querylog-map
2021-03-31 04:54:30 +03:00
tavplubix
3c0f5a57ec
Merge pull request #21535 from ClickHouse/distributed_ddl_improvements
...
Distributed DDL improvements
2021-03-29 22:40:11 +03:00
Alexander Tokmakov
c938f4f2fe
fix
2021-03-23 14:29:29 +03:00
Alexander Tokmakov
fc3e11a068
fix
2021-03-22 17:09:38 +03:00
Alexander Tokmakov
1845df25f3
fix possibly dangling reference to Context
2021-03-19 17:02:48 +03:00
kssenii
2dc006acf1
Rename part 2
2021-03-17 12:35:02 +00:00
Alexander Tokmakov
5070b5b85b
detach permanently setting for Replicated db
2021-03-09 00:34:52 +03:00
Alexander Tokmakov
2484781070
fix MV recovery in Replicated db
2021-03-08 20:26:38 +03:00
kssenii
4cdb55babe
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica
2021-02-22 12:39:35 +00:00
kssenii
ace76bb7fa
Better, remove debug logs
2021-02-22 12:35:53 +00:00
alexey-milovidov
20a7ccf5b1
Merge pull request #20174 from amosbird/alias
...
Normalized function names (lower-case case-insensitive names)
2021-02-21 16:23:51 +03:00
Alexander Tokmakov
2a36d6cb55
review suggestions
2021-02-20 02:41:58 +03:00
Amos Bird
2dc7ba160a
Better
2021-02-18 20:20:28 +08:00
Alexander Tokmakov
9c7cf9e92e
remove some debug code
2021-02-15 13:26:34 +03:00
Alexander Tokmakov
78c1d69b8c
better code
2021-02-08 22:36:17 +03:00
Alexander Tokmakov
91d0924665
write dictionaries metadata to zk
2021-02-08 12:46:30 +03:00
Alexander Tokmakov
7ce0ef2561
show clusters for replicated db
2021-02-08 12:14:17 +03:00
Alexander Tokmakov
18f6b5bbad
add timeouts
2021-02-04 22:41:44 +03:00
Alexander Tokmakov
6456ccf0da
better test
2021-02-02 22:39:04 +03:00
Alexander Tokmakov
9da445e740
execute initial query in the same thread
2021-02-01 22:29:47 +03:00
Alexander Tokmakov
a57456a3fd
fix
2021-01-28 22:02:39 +03:00
Alexander Tokmakov
52e5c0aad7
fix thread status
2021-01-28 16:48:17 +03:00
Alexander Tokmakov
3146a1a954
fix
2021-01-25 21:59:23 +03:00
sundy-li
22c5fa0974
Merge branch 'master' into system-querylog-map
2021-01-20 23:00:22 +08:00
Alexander Tokmakov
7f97a11c84
Merge branch 'master' into database_replicated
2021-01-18 17:09:39 +03:00
sundy-li
cef8bcc011
(feature) Use Map data type for system logs tables
2021-01-05 10:10:19 +00:00
Alexey Milovidov
4b3ae495d6
Merge branch 'master' into CurtizJ-multiple-nested
2021-01-02 00:25:16 +03:00
spongedc
494c9ac809
Merge remote-tracking branch 'origin/master' into support_show_create_view
2020-12-29 10:20:06 +08:00
Alexander Tokmakov
2836936079
fix
2020-12-25 20:43:03 +03:00
Alexander Tokmakov
42911e2438
implement CREATE OR REPLACE TABLE
2020-12-25 19:32:09 +03:00
spongedc
a277308ac6
Merge remote-tracking branch 'origin/master' into support_show_create_view
2020-12-23 11:56:46 +08:00
Anton Popov
b6ff6300b2
Merge remote-tracking branch 'upstream/master' into HEAD
2020-12-22 18:06:21 +03:00
Amos Bird
2a28c127eb
Better code for real
2020-12-18 14:13:59 +08:00
Anton Popov
a42b00c9aa
Merge remote-tracking branch 'upstream/master' into HEAD
2020-12-17 20:43:23 +03:00
tavplubix
7e73b6acd8
Merge pull request #17642 from filimonov/detach-permanently
...
DETACH TABLE PERMANENTLY
2020-12-17 14:26:51 +03:00
spongedc
38c0827881
Merge remote-tracking branch 'origin/master' into support_show_create_view
2020-12-16 12:26:56 +08:00
spongedc
a0083e23d6
Fix compile error
2020-12-16 12:07:50 +08:00
spongedc
81b0fa2989
1. rename is_view to is_ordinary_view 2. add more tests
2020-12-16 11:19:38 +08:00
Anton Popov
c78861e86e
Merge remote-tracking branch 'upstream/master' into HEAD
2020-12-15 01:45:01 +03:00
Anton Popov
afc2d7099b
add conversion from array to map
2020-12-15 01:16:04 +03:00
Mikhail Filimonov
f6097cf818
Adding DETACH TABLE PERMANENTLY
2020-12-14 15:28:59 +01:00
Alexander Tokmakov
0c80fce7f0
Merge branch 'master' into allow_atomic_database_inside_materialize_mysql
2020-12-13 17:56:50 +03:00
Alexander Tokmakov
f9f7da5f97
fix
2020-12-11 15:06:19 +03:00
Alexander Tokmakov
04ceaa66f2
implement ATTACH TABLE name FROM 'path/to/data/
2020-12-08 17:15:23 +03:00
Ivan
0ba712a2d3
Merge branch 'master' into allow_atomic_database_inside_materialize_mysql
2020-12-08 16:45:51 +03:00
Anton Popov
d7aad3bf79
Merge remote-tracking branch 'upstream/master' into HEAD
2020-12-07 19:13:01 +03:00
Ivan
315ff4f0d9
ANTLR4 Grammar for ClickHouse and new parser ( #11298 )
2020-12-04 05:15:44 +03:00
Alexander Tokmakov
a0ef3a113a
Merge branch 'master' into allow_atomic_database_inside_materialize_mysql
2020-12-02 18:29:02 +03:00
Alexander Tokmakov
1a4bd67736
fixes
2020-12-01 20:20:42 +03:00
Alexander Tokmakov
c955542dce
run functional tests with Replicated engine
2020-11-30 23:22:25 +03:00
Alexander Tokmakov
ab197a49c8
better code, fixes
2020-11-30 23:12:43 +03:00
Alexander Tokmakov
9e3fd3c170
Merge branch 'master' into database_replicated
2020-11-27 17:08:34 +03:00
Alexander Tokmakov
dce0bf8efc
Merge branch 'master' into allow_atomic_database_inside_materialize_mysql
2020-11-24 15:28:31 +03:00
Alexander Tokmakov
5ccf975a4a
Merge branch 'master' into database_replicated
2020-11-24 14:38:02 +03:00
Anton Popov
b384beb564
Merge remote-tracking branch 'upstream/master' into HEAD
2020-11-23 17:46:51 +03:00
Alexander Tokmakov
60a5782c75
fix AST formatting in log messages
2020-11-22 20:23:12 +03:00
Anton Popov
1f65478b49
implement nested with multiple nesting
2020-11-21 20:27:42 +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
Ivan Lezhankin
fdd1c182ab
Merge remote-tracking branch 'upstream/master' into tcp-port
2020-11-18 16:22:00 +03:00
Ivan Lezhankin
1787cd89a7
Implement tcpPort() function literal
2020-11-17 16:24:13 +03:00
tavplubix
3de32279ca
Update InterpreterCreateQuery.cpp
2020-11-16 14:03:27 +03:00
Alexander Tokmakov
8352e5d202
fix crash in CREATE AS
2020-11-16 13:14:12 +03:00
Alexander Tokmakov
0731bfb7be
Merge branch 'master' into database_replicated
2020-11-12 21:04:18 +03:00