Commit Graph

81 Commits

Author SHA1 Message Date
pufit
cad66f3e68
Fix ALTER QUERY MODIFY SQL SECURITY (#61480) 2024-03-25 20:03:02 -04:00
Nikita Mikhaylov
15896ecaf6
Add table system.keywords [Part 1] (#51808) 2024-03-18 16:58:57 +01:00
Alexey Milovidov
01136bbc3b Limit backtracking in parser 2024-03-17 19:54:45 +01:00
Alexey Milovidov
fc6f3c8399 Live view's life is close to the end 2024-03-04 00:49:22 +01:00
pufit
330a206470
Add definers for views (Attempt 2) (#60439) 2024-02-27 19:00:17 -05:00
Alexey Milovidov
2eb4d25126 Remove ALTER LIVE VIEW 2024-02-23 22:56:18 +01:00
Nikita Mikhaylov
8fef0b71c4
Merge pull request #60350 from ClickHouse/revert-54901-pufit/views-sql-security
Revert "Add definers for views"
2024-02-23 15:15:36 +01:00
Sergei Trifonov
2c766cf75f
Merge pull request #59507 from ClickHouse/alter-table-forget-partition
Add `FORGET PARTITION` query to remove old partition nodes from ZooKeeper
2024-02-23 12:55:08 +01:00
Raúl Marín
464b5e0e15
Revert "Add definers for views (#54901)"
This reverts commit 57306706b3.
2024-02-23 12:44:31 +01:00
János Benjamin Antal
7cad0050c0
Disambiguate alter commands list (#59532)
* Add optional parentheses to TTL element and alter command

* Add some basic tests

* Extend tests with more test cases

* Add one more test case

* Add server setting to control new formatting behavior

* Automatic style fix

* Fix segfault in `clickhouse-format` related to new server setting

* Remove format_ttl_expressions_with_parentheses

* Fix unit test compilation failures

* Introduce global flag to control the new formatting behavior

* Revert "Fix segfault in `clickhouse-format` related to new server setting"

This reverts commit d7131a3145.

* Revert accidental changes

* Revert accidental include reorder

* Revert accidental changes

* Enable new format in client and local server

---------

Co-authored-by: robot-clickhouse <robot-clickhouse@users.noreply.github.com>
2024-02-22 19:17:15 +01:00
pufit
57306706b3
Add definers for views (#54901) 2024-02-22 17:47:50 +01:00
serxa
1d31ac2a0c add FORGET PARTITION query to remove old parition nodes from ZooKeeper 2024-02-02 10:03:31 +00:00
Robert Schulze
1bfeee1954
Some fixups 2024-01-18 20:49:50 +00:00
Robert Schulze
15700592f7
Merge remote-tracking branch 'ClickHouse/master' into column_level_compress_block 2024-01-18 19:12:57 +00:00
Duc Canh Le
22afcd46f4 add ALTER COLUMN MODIFY/RESET SETTING
Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
2024-01-18 05:17:07 +00:00
Azat Khuzhin
48a700edba Support query parameters in ALTER TABLE ... PART
But, to make this happen it is not enough to simply fix the parser, the
whole ASTs for ALTER should be fixed as well, since they store `ASTPtr`
instead of `IAST *`, and so because of `ReplaceQueryParameterVisitor`
does not work for ALTER query.

So this patch converts ASTPtr to `IAST *` for ASTAlterQuery and
ASTAlterCommand (plus it also fixes when the children for
ASTAlterCommand had not been updated sometimes).

And only after this it is possible to adjust the parser (see
places with `parser_string_and_substituion` in the parser code).

v2: also fix ASTAlterCommand::clone (add missing components) and ParserAlterCommand::parseImpl
v3: fix APPLY DELETED MASK
v4: fix mutations_execute_nondeterministic_on_initiator/mutations_execute_subqueries_on_initiator
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-01-15 14:16:54 +03:00
Duc Canh Le
ac76eecb1e Merge branch 'master' into column_level_compress_block
Resolve conflicts

Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
2024-01-14 09:32:43 +00:00
Michael Kolupaev
dda0606f67 Things 2023-12-28 17:56:05 +00:00
Alexander Tokmakov
38fe70c68a
Revert "Refreshable materialized views (takeover)" 2023-12-28 13:12:20 +01:00
Michael Kolupaev
ef4cc5ec7f Things 2023-12-27 20:24:55 +00:00
Duc Canh Le
c3ffce1491 Merge branch 'master' into column_level_compress_block
Resolve conflicts

Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
2023-12-18 11:03:44 +00:00
Anton Popov
913ae1d267 Merge remote-tracking branch 'upstream/master' into HEAD 2023-12-05 14:47:32 +00:00
Anton Popov
c0e45c15fb add test for lightweight deletes and mutations 2023-12-05 13:38:25 +00:00
Anton Popov
7fbe7462b6 add mutation command to apply deleted mask 2023-12-01 19:12:05 +00:00
Sergey Kviatkevich
afae432e99 allow ALTER for TEMPORARY table 2023-11-30 21:42:12 +03:00
Han Fei
df1e019268 address comments 2023-10-30 00:39:16 +01:00
Duc Canh Le
8e374882cc support ALTER table MODIFY column REMOVE SETTING ..
Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
2023-10-05 09:16:29 +00:00
Duc Canh Le
4ff4b0a84b column-level settings: alter-able
Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
2023-10-02 05:59:21 +00:00
Han Fei
2330a28f7b support estimate by stat 2023-09-04 15:51:00 +02:00
Han Fei
f5c9d278ad use statistic to order prewhere conditions better 2023-08-09 22:57:49 +02:00
Alexander Tokmakov
304b9f1a93 remove trash from MOVE PARTITION command 2023-02-13 16:10:16 +01:00
jianmei zhang
8d49aa4697 Support sql standard drop index in seprate parser files 2022-06-29 11:08:05 +08:00
jianmei zhang
589cba8045 Support sql standard create index in seprate parser files 2022-06-29 11:08:05 +08:00
Jianmei Zhang
13231d6a85 Pass command type for create and drop index 2022-06-29 11:08:05 +08:00
Jianmei Zhang
4d0635371f Support sql stanard create and drop index 2022-06-29 11:08:05 +08: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
cmsxbc
366ee3deba
Support PostgreSQL style ALTER MODIFY COLUMN 2021-11-30 21:07:14 +08:00
Nikolay Degterinsky
64927938c6 Minor refactor 2021-11-16 08:58:28 +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
Anton Popov
476d7a411f allow to remove SAMPLE BY expression 2021-10-14 17:05:20 +03:00
Nikolay Degterinsky
7f3d395bf3 Merge branch 'master' into query_parameters 2021-09-30 02:01:33 +03: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
Nikolay Degterinsky
22f59e1714 Add support for table and database query parameters 2021-09-07 01:19:02 +03:00
kssenii
76e49334fa Minor fixes 2021-09-05 01:59:44 +03:00
kssenii
d0113743c9 Merge branch 'master' of github.com:ClickHouse/ClickHouse into materialized-postgresql 2021-09-05 01:07:31 +03:00
Vladimir Chebotarev
de5daa22ab Revert "MATERIALIZE COLUMN xxx FINAL"
This reverts commit bf1430c1ec.
2021-08-30 11:50:26 +03:00
Vladimir Chebotarev
0d6e0181d6 MATERIALIZE COLUMN xxx FINAL 2021-08-30 11:49:59 +03:00