Commit Graph

128 Commits

Author SHA1 Message Date
Han Fei
83d1b44a3e validate 2023-09-19 17:08:15 +02:00
Han Fei
10c622fa08 Merge branch 'master' into hanfei/statistic 2023-08-24 15:56:06 +02:00
Han Fei
f5c9d278ad use statistic to order prewhere conditions better 2023-08-09 22:57:49 +02:00
Anton Popov
78abad7701 allow to execute constant non-deterministic functions in mutations on initiator 2023-08-07 17:16:15 +00:00
Alexey Milovidov
369ad0aea3 Remove ALTER of LIVE VIEW 2023-06-22 20:32:29 +02:00
Anton Popov
612173e734 refactoring near alter conversions 2023-05-25 22:54:54 +00:00
Antonio Andelic
f21c664744 Add error code 2023-04-03 15:17:06 +00:00
Antonio Andelic
e81c2999a3
Update src/Interpreters/InterpreterAlterQuery.cpp
Co-authored-by: Alexander Tokmakov <tavplubix@clickhouse.com>
2023-04-03 16:56:45 +02:00
Antonio Andelic
12bee0573f Correctly check table 2023-04-03 14:54:14 +00:00
Antonio Andelic
e7d00c8f34 Don't replicate mutations for KeeperMap tables 2023-04-03 14:22:08 +00:00
Alexey Milovidov
62bfdb349a Merge branch 'master' into fix-trash-query-kind 2023-02-02 04:26:49 +01:00
Alexey Milovidov
9b908a0be0 Fix trash around query kind, part 2 2023-02-01 03:31:31 +01:00
Alexey Milovidov
5c4db119fa Fix trash around query kind, part 1 2023-02-01 03:11:54 +01:00
Alexander Gololobov
863548114d force_wait flag is no longer needed 2023-01-30 18:38:28 +01:00
Alexander Tokmakov
70d1adfe4b
Better formatting for exception messages (#45449)
* save format string for NetException

* format exceptions

* format exceptions 2

* format exceptions 3

* format exceptions 4

* format exceptions 5

* format exceptions 6

* fix

* format exceptions 7

* format exceptions 8

* Update MergeTreeIndexGin.cpp

* Update AggregateFunctionMap.cpp

* Update AggregateFunctionMap.cpp

* fix
2023-01-24 00:13:58 +03:00
Alexander Gololobov
2c64f0042a Added force_wait parameter to IStorage::mutate() 2022-12-30 16:23:03 +01:00
alesapin
fa467b3398 Minor code polishing 2022-12-22 14:31:42 +01:00
Antonio Andelic
9f0fdd780b Modify ALTER before replicating 2022-11-25 10:16:20 +00:00
Alexander Tokmakov
65474830ac make tryEnqueueReplicatedDDL virtual 2022-09-16 16:25:32 +02:00
Alexander Tokmakov
03c193ccca fix ON CLUSTER with Replicated database cluster 2022-09-15 21:15:57 +02:00
Alexander Tokmakov
30e9104b6e ignore cluster if equals to db name 2022-07-06 19:54:05 +02:00
Robert Schulze
89aa9ae00f
Fixed clang-tidy check "bugprone-branch-clone"
The check is currently *not* part of .clang-tidy. It complains about:
(1) "switch has multiple consecutive identical branches"
(2) "repeated branch in conditional chain"

About (1): Lots of findings in switches were about redundant
"[[fallthrough]]" in places where the compiler would not warn anyways. I
have cleaned these up.

About (2): In if-else_if-else chains, fixing the warning would usually
mean concatenating multiple if-conditions. As this would reduce
readability in most cases, I did not fix these places.

Because of (2), I also refrained from adding "bugprone-branch-clone" to
.clang-tidy.
2022-04-30 19:40:28 +02:00
Vitaly Baranov
030f3e488c Add shard_index and replica_index to params of executeDDLQueryOnCluster(). 2022-04-25 16:34:33 +02:00
Anton Popov
305dd57262
Merge branch 'master' into fix_storage_distributed_ttl 2022-04-14 14:51:15 +02:00
Alexander Tokmakov
5fad3fdffc throw exception on non-transactional queries 2022-02-01 01:27:55 +03:00
zhongyuankai
a6254516e0 Fix Alter ttl modification unsupported table engine 2022-01-24 21:48:52 +08:00
Azat Khuzhin
aee034a597 Use explicit template instantiation for SystemLog
- Move some code into module part to avoid dependency from IStorage in SystemLog
- Remove extra headers from SystemLog.h
- Rewrite some code that was relying on headers that was included by SystemLog.h

v2: rebase
v3: squash move into module part with explicit template instantiation
    (to make each commit self compilable after rebase)
2022-01-10 22:01:41 +03:00
Maksim Kita
9ef359ce2c Dictionaries fix comment 2021-12-28 23:50:48 +03:00
Maksim Kita
74979a5f01
Merge pull request #31095 from amosbird/addprojection
Function name normalization for ALTER queries
2021-12-03 12:07:07 +03:00
Raúl Marín
051dddd8df Reduce dependencies on ASTIdentifier.h
Goes from rebuilding 483 objects to 165 when it's modified
2021-11-26 16:49:40 +01:00
Nikolay Degterinsky
ba50e8387d Merge branch 'master' into query_parameters 2021-11-15 19:55:54 +00:00
Nikolay Degterinsky
7b5954b736 Merge branch 'master' into query_parameters 2021-11-11 11:43:00 +00:00
Amos Bird
0200d1c001
Alter query function normalization. 2021-11-07 21:27:02 +08:00
Amos Bird
b25b778349
Only grab AlterLock when we do alter. 2021-11-03 01:08:17 +08:00
Vitaly Baranov
3ed7f8f0b3 Move access-rights' source files needed for parser to a separate target. 2021-11-01 19:13:49 +03:00
tavplubix
d7c69f6c02
Merge pull request #29202 from aiven/kmichel-replicated-database-alter-attach
Allow non-replicated ALTER TABLE FETCH/ATTACH in Replicated databases
2021-10-27 16:42:54 +03:00
Alexander Tokmakov
2e7e195e77 change alter_lock to std::timed_mutex 2021-10-26 13:37:00 +03:00
Nikolay Degterinsky
d76976e272 Merge branch 'master' into query_parameters 2021-10-18 17:34:20 +03:00
mergify[bot]
477ea62257
Merge branch 'master' into remove-sample-by 2021-10-15 15:14:17 +00:00
Anton Popov
476d7a411f allow to remove SAMPLE BY expression 2021-10-14 17:05:20 +03:00
Maksim Kita
c1f04452de AddDefaultDatabaseVisitor support dictGet 2021-10-14 16:31:32 +03:00
Nikolay Degterinsky
7f3d395bf3 Merge branch 'master' into query_parameters 2021-09-30 02:01:33 +03:00
Nikolai Kochetov
236d71ea94
Merge pull request #28582 from ClickHouse/rewrite-pushing-to-views
Rewrite PushingToViews
2021-09-27 21:19:11 +03:00
Kevin Michel
045d4f2d32
Don't replicate DROP/DETACH/DROP DETACHED on Replicated database 2021-09-27 10:10:46 +02:00
Vasily Nemkov
cb1ca9b33e Implemented modifying table comments with ALTER TABLE t MODIFY COMMENT 'value' 2021-09-23 01:14:00 +03:00
Nikolay Degterinsky
bdc0d65c6b Fixes after merge 2021-09-22 16:57:17 +03:00
Nikolay Degterinsky
1b1d90deb8 Merge branch 'master' into query_parameters 2021-09-22 13:53:56 +03:00
Kevin Michel
008c3c812b
Allow non-replicated ALTER TABLE FETCH/ATTACH in Replicated databases
`ALTER TABLE ... FETCH` and `ALTER TABLE ... ATTACH` queries were
disabled in the Replicated database engine, because it could cause
accidental duplication of data.

This enables these queries but without replicating them.

In the case of `FETCH`, the part will only be fetched on the server
where the query is issued.

Similarly, in the case of `ATTACH`, the attached part only needs to
be available on the server where the query is issued.

If the table itself is using one of the Replicated MergeTree engines,
the attached data is then replicated by the table engine itself,
without intervention of the database engine.

This change is meant to help with live backup/restore when using the
Replicated database engine, using FREEZE for backup and ATTACH for
restore.
2021-09-21 17:45:23 +02:00
Nikolai Kochetov
a790d391c0 Merge branch 'master' into rewrite-pushing-to-views 2021-09-20 19:43:15 +03:00
Nikolai Kochetov
a8c3b02598 Merge branch 'master' into rewrite-pushing-to-views 2021-09-17 15:38:11 +03:00