Commit Graph

3204 Commits

Author SHA1 Message Date
Alexey Milovidov
1950a75bd4 Merge branch 'master' into fix-inconsistent-formatting 2024-02-28 17:10:29 +01:00
pufit
330a206470
Add definers for views (Attempt 2) (#60439) 2024-02-27 19:00:17 -05:00
Alexey Milovidov
8cf619bc03 Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-inconsistent-formatting 2024-02-28 00:30:44 +01:00
Yakov Olkhovskiy
802db19e3b dedicated FunctionSecretArgumentsFinder for TreeNode, refactoring of FunctionSecretArgumentsFinder 2024-02-27 20:42:02 +00:00
Alexey Milovidov
9ea7ff231b
Merge pull request #60448 from ClickHouse/clang-19
Update to clang-19
2024-02-27 23:38:08 +03:00
Alexey Milovidov
0f3c9963d1 Merge branch 'master' of github.com:ClickHouse/ClickHouse into revert-60216-revert-59697-check-stack-size-in-parser 2024-02-27 17:30:32 +01:00
Alexey Milovidov
7c6e28708b
Merge pull request #60370 from ClickHouse/remove-alter-live-view
Remove ALTER LIVE VIEW
2024-02-27 17:45:59 +03:00
Alexey Milovidov
c192a448d0 Update to clang-19 2024-02-27 14:37:21 +01:00
Alexey Milovidov
6ac96bdcf1 Fix inconsistent formatting of CREATE TABLE ... COLLATE 2024-02-27 00:40:39 +01:00
Alexey Milovidov
0b90076a36
Revert "Revert "Check stack size in Parser"" 2024-02-27 01:34:50 +03:00
Alexey Milovidov
a3f1411679 Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-inconsistent-formatting 2024-02-26 19:01:11 +01:00
Yong Wang
795c1a98dc
Fix segmentation fault in KQL parser when the input query exceeds the max_query_size (#59626)
* Fix_kql_issue_found_by_wingfuzz

This commit fix the issues:
 https://github.com/ClickHouse/ClickHouse/issues/59036
 https://github.com/ClickHouse/ClickHouse/issues/59037

both issues are same reason, the input query exceed the max_query_size,
so the condition isEnd() of token is not meet and cause the assertion failure

* fix_kql_issue_found_by_wingfuzz: use isValid instead of TokenType::EndOfStream

* fix_kql_issue_found_by_wingfuzz: make functional test result consist

* fix_kql_issue_found_by_wingfuzz: update test case for makeseries

* fix_kql_issue_found_by_wingfuzz: disable makeseries

* fix_kql_issue_found_by_wingfuzz:
 use isvalid() function to replace isEnd() function of TokenIterator to check the end of stream

* fix_kql_issue_found_by_wingfuzz: add test case for max_query_size

* fix_kql_issue_found_by_wingfuzz: fix AST structure

* fix_kql_issue_found_by_wingfuzz: make sure the max query size test is in the dialect of kusto

* fix_kql_issue_found_by_wingfuzz : restore max query size after test

* fix_kql_issue_found_by_wingfuzz : fix typo

---------

Co-authored-by: János Benjamin Antal <benjamin.antal@clickhouse.com>
2024-02-26 13:31:47 +01:00
Robert Schulze
5c967c44de
Merge pull request #60248 from ClickHouse/revert-59450-order-by-all-ambiguities
Revert "Replace `ORDER BY ALL` by `ORDER BY *`"
2024-02-26 10:23:41 +01:00
Antonio Andelic
5b01c4feb3
Revert "Fix: IAST::clone() for RENAME" 2024-02-26 08:47:05 +01:00
Alexey Milovidov
979cd2937b Fix inconsistent formatting of SET param_... 2024-02-26 02:11:51 +01:00
Alexey Milovidov
e5cb594944 Fix inconsistent formatting of GRANT CURRENT GRANTS 2024-02-26 01:54:52 +01:00
Alexey Milovidov
4b854399f4
Update src/Parsers/ASTSystemQuery.cpp
Co-authored-by: Yakov Olkhovskiy <99031427+yakov-olkhovskiy@users.noreply.github.com>
2024-02-26 03:44:35 +03:00
Alexey Milovidov
3f8f641dff Fix inconsistent formatting of GRANT CURRENT GRANTS 2024-02-26 01:43:37 +01:00
Alexey Milovidov
10e59c2e01 Remove ALTER LIVE VIEW 2024-02-26 00:01:34 +01:00
Yakov Olkhovskiy
ab6ab8bfac replace only secret arguments with [HIDDEN], also hide it in TreeNode dump 2024-02-25 17:11:22 +00:00
Alexey Milovidov
2eb4d25126 Remove ALTER LIVE VIEW 2024-02-23 22:56:18 +01:00
Alexey Milovidov
35f379ee64 Fix trash formatting 2024-02-23 15:55:29 +01:00
Alexey Milovidov
da2ae34c1d Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-inconsistent-formatting 2024-02-23 15:55:03 +01:00
Alexey Milovidov
10ba0801be Fix inconsistent formatting of SYSTEM SYNC REPLICA LIGHTWEIGHT 2024-02-23 15:45:08 +01:00
Alexey Milovidov
396402a9b6 Fix inconsistent formatting of operator function and nulls action 2024-02-23 15:22:21 +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
Alexey Milovidov
75c5b1a2c6 Fix inconsistent formatting of window functions 2024-02-23 15:06:03 +01:00
Alexey Milovidov
9e32d0f5b2 Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-inconsistent-formatting 2024-02-23 15:05:46 +01:00
Igor Nikonov
90b1f8544a
Merge pull request #60227 from ClickHouse/fix-clone-ast-for-rename
Fix: IAST::clone() for RENAME
2024-02-23 14:48:14 +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
Kseniia Sumarokova
fb7924cdb1
Merge pull request #60233 from ClickHouse/hide-sensitive-info-in-s3-queue
Hide sensitive info for s3queue
2024-02-22 11:37:15 +01:00
Alexey Milovidov
2d9fbaa859 Merge with master 2024-02-21 20:37:48 +01:00
Alexey Milovidov
5076dd6266 Fix inconsistent formatting of lambda functions 2024-02-21 19:19:17 +01:00
Robert Schulze
52afa46e23
Revert "Replace ORDER BY ALL by ORDER BY *" 2024-02-21 19:05:20 +01:00
Alexey Milovidov
659d30774d Fix MODIFY REFRESH formatting 2024-02-21 18:37:46 +01:00
Alexey Milovidov
23afd322c9 Fix CREATE SETTINGS PROFILE 2024-02-21 18:25:21 +01:00
Alexey Milovidov
f726cb4800 Fix CREATE USER query 2024-02-21 17:56:36 +01:00
Alexey Milovidov
716d986238 Fix shit in CREATE INDEX 2024-02-21 17:29:15 +01:00
kssenii
c05c3944d1 Hide sensitive info for s3queue 2024-02-21 16:49:53 +01:00
Igor Nikonov
7411e81bec Fix style 2024-02-21 15:00:25 +00:00
Igor Nikonov
f4643b8341 Fix: RENAME AST clone
+ minor cleanup
2024-02-21 14:14:33 +00:00
Antonio Andelic
fee1565780
Revert "Check stack size in Parser" 2024-02-21 11:33:08 +01:00
Alexey Milovidov
a23e766edc Fix trash 2024-02-21 08:29:39 +01:00
Alexey Milovidov
ee3314b0a0 Fix trash 2024-02-21 08:27:13 +01:00
Alexey Milovidov
71c267e0b0 Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-inconsistent-formatting 2024-02-21 07:56:51 +01:00
Sergei Trifonov
d2aebe2c9a
Merge branch 'master' into alter-table-forget-partition 2024-02-20 13:56:50 +01:00
Robert Schulze
5474f36e75
Merge remote-tracking branch 'rschu1ze/master' into order-by-all-ambiguities 2024-02-20 10:09:57 +00:00
Alexey Milovidov
4c4c60f15d Continue fixing garbage 2024-02-20 10:55:12 +01:00
Alexey Milovidov
c753550d0b Digging into a pile of garbage 2024-02-20 10:42:20 +01:00
Alexey Milovidov
209acaa8b2 Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-inconsistent-formatting 2024-02-20 09:49:05 +01:00
Robert Schulze
6f6e74ad8b
Merge remote-tracking branch 'rschu1ze/master' into order-by-all-ambiguities 2024-02-19 15:19:13 +00:00
Alexey Milovidov
ffb89529b0 Better formatting 2024-02-19 13:40:28 +01:00
Alexey Milovidov
8ed180bd3b Fix trash 2024-02-19 13:36:53 +01:00
Alexey Milovidov
bf7449aa40 Fix garbage 2024-02-19 13:15:35 +01:00
Alexey Milovidov
de8b3476ab Update shit-test 2024-02-19 11:30:42 +01:00
Alexey Milovidov
db9026b5ac Fix trash 2024-02-19 11:09:37 +01:00
Alexey Milovidov
baf0fa1458 Fix bad test 2024-02-19 08:42:34 +01:00
Alexey Milovidov
a4cbe4b780 Attempt to remove a lot of trash 2024-02-19 08:28:07 +01:00
Alexey Milovidov
c6d75d1486 Attempt to remove a lot of trash 2024-02-19 08:15:28 +01:00
Alexey Milovidov
17e7c7a0cc Merge branch 'master' into fix-inconsistent-formatting 2024-02-19 07:32:50 +01:00
Alexey Milovidov
e2de74cf66 Fix debug 2024-02-19 05:34:40 +01:00
Alexey Milovidov
6fd563df52 Miscellaneous 2024-02-19 02:58:51 +01:00
Alexey Milovidov
6eff309185 Merge branch 'master' of github.com:ClickHouse/ClickHouse into check-stack-size-in-parser 2024-02-19 02:44:47 +01:00
Alexey Milovidov
232fe0dd1b Fix inconsistent formatting of SELECT ... FROM (EXPLAIN ...) 2024-02-18 05:38:34 +01:00
Alexey Milovidov
5ef91bd4ba Fix a test 2024-02-18 05:06:24 +01:00
Alexey Milovidov
3035b8f80c Fix a test 2024-02-18 03:20:51 +01:00
Alexey Milovidov
9686bb51bc Style check for abbreviations 2024-02-17 02:15:14 +01:00
Alexey Milovidov
2f315e0eb5 Style check for abbreviations 2024-02-17 02:14:15 +01:00
Alexander Tokmakov
31479649fe
Merge pull request #59908 from azat/rmt-uuid-macro
[RFC] Allow uuid in replica_path if CREATE TABLE explicitly has it
2024-02-16 17:31:59 +01:00
Alexey Milovidov
885e8dad63
Merge pull request #60042 from Algunenano/format_not
Fix formatting of NOT with single literals
2024-02-16 01:28:45 +01:00
Alexey Milovidov
3470fc70b2 Merge branch 'master' into check-stack-size-in-parser 2024-02-15 23:45:33 +01:00
Raúl Marín
a249840421 Fix formatting of NOT with single literals 2024-02-15 21:44:22 +01:00
Robert Schulze
058461e786
Merge remote-tracking branch 'rschu1ze/master' into order-by-all-ambiguities 2024-02-15 16:21:16 +00:00
Robert Schulze
1edf3b2254
Replace ORDER BY ALL by ORDER BY * to get rid of ambiguities 2024-02-15 16:19:56 +00:00
Alexey Milovidov
accc63500d Fix broken lambdas formatting 2024-02-15 06:54:18 +01:00
Azat Khuzhin
58e5d7876b Allow uuid in replica_path if CREATE TABLE explicitly has it
Right now the query with {uuid} macro without ON CLUSTER fails:

    CREATE TABLE x UUID 'aaaaaaaa-1111-2222-3333-aaaaaaaaaaaa' (key Int) ENGINE = ReplicatedMergeTree('/tables/{database}/{uuid}', 'r1') ORDER BY tuple();

There is a workaround right now to use ATTACH instead of CREATE, but
ATTACH is not CREATE.

CREATE still useful for proper RESTORE without ON CLUSTER.

So this patch allows this syntax, but only if UUID had been explicitly
passed in the query. This looks safe.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-02-13 08:01:09 +01:00
János Benjamin Antal
310b0773b2 Fix include used for debugging 2024-02-12 17:25:17 +00:00
János Benjamin Antal
69273b4645 Fix parsing of partition expressions surrounded by parens 2024-02-12 17:10:10 +00:00
Michael Kolupaev
2dfd310cf2 Hide URL/S3 'headers' argument in SHOW CREATE 2024-02-09 03:31:30 +00:00
Alexey Milovidov
aa004cabff Fix tests 2024-02-09 02:00:05 +01:00
Alexey Milovidov
497d78703b Merge branch 'master' of github.com:ClickHouse/ClickHouse into check-stack-size-in-parser 2024-02-09 01:58:34 +01:00
Alexey Milovidov
7016e1d397 Maybe better 2024-02-07 15:43:58 +01:00
Alexey Milovidov
5b791ddec8 Check stack size in Parser 2024-02-07 04:23:43 +01:00
Alexey Milovidov
88b6b38a74 Check stack size in Parser 2024-02-07 04:21:57 +01:00
Alexander Tokmakov
77e4b0c8d9 Revert "Merge pull request #59122 from arthurpassos/bring_back_attach_partition_pr"
This reverts commit ac90637170, reversing
changes made to fe2b5cde05.
2024-02-07 02:52:43 +01:00
serxa
1d31ac2a0c add FORGET PARTITION query to remove old parition nodes from ZooKeeper 2024-02-02 10:03:31 +00:00
János Benjamin Antal
e8c9500981 Update src/Parsers/ASTAlterQuery.cpp
Co-authored-by: Nikolay Degterinsky <43110995+evillique@users.noreply.github.com>
2024-02-01 14:43:31 +00:00
János Benjamin Antal
1a4f56a61a Fix ASTAlterCommand::formatImpl in case of column specific settings modifications 2024-02-01 14:43:31 +00:00
Yarik Briukhovetskyi
5816424c2b
Merge pull request #59119 from AVMusorin/trailing-comma-tuples
Allow trailing commas in types with several items
2024-01-30 16:31:54 +01:00
Alexey Milovidov
ac90637170
Merge pull request #59122 from arthurpassos/bring_back_attach_partition_pr
Revert revert attach partition PR
2024-01-30 04:02:31 +01:00
Alexey Milovidov
fe2b5cde05
Merge pull request #59338 from vitlibar/support-format-clause-in-backup-query
Support the FORMAT clause in BACKUP and RESTORE queries
2024-01-30 04:00:21 +01:00
Arthur Passos
15d04d0a78
Merge branch 'master' into bring_back_attach_partition_pr 2024-01-29 15:16:49 -03:00
Vitaly Baranov
1f446f78b5 Fix parameter's name. 2024-01-29 16:24:16 +01:00
Vitaly Baranov
9fa76bea7e Support FORMAT clause in BACKUP/RESTORE query. 2024-01-29 14:19:16 +01:00
Yarik Briukhovetskyi
9f2093df75
Restart CI 2024-01-29 12:54:29 +01:00
zhongyuankai
3de9dafa14
fix build check 2024-01-28 16:12:51 +08:00
Aleksandr Musorin
e6352234c3 Added parsing trailing symbols for type expressions
```sql
SELECT (1, 'foo')::Tuple(a Int, b String,);
SELECT (1, 'foo')::Tuple(Int, String,);
SELECT (1, (2,'foo'))::Tuple(Int, Tuple(Int, String,),);
````

fix
2024-01-26 17:56:14 +01:00
avogar
5833641fa5 Merge branch 'master' of github.com:ClickHouse/ClickHouse into variant-data-type 2024-01-26 16:54:02 +00:00
Arthur Passos
ce6877cbb6
Merge branch 'ClickHouse:master' into bring_back_attach_partition_pr 2024-01-26 10:57:11 -03:00
Maksim Kita
2a327107b6 Updated implementation 2024-01-25 14:31:49 +03:00
zhongyuankai
d970cd5b61 drop tables 2024-01-24 11:17:52 +08:00
Arthur Passos
799a94081b Revert "Revert "Allow to attach partition from table with different partition expression when destination partition expression doesn't re-partition""
This reverts commit a1c83e2f51.
2024-01-23 11:40:42 -03:00
Robert Schulze
a1c83e2f51
Revert "Allow to attach partition from table with different partition expression when destination partition expression doesn't re-partition" 2024-01-23 15:26:04 +01:00
Robert Schulze
e23e7e6b73
Merge pull request #53710 from rschu1ze/system-reload-asynchronous-metrics
Add statement `SYSTEM RELOAD ASYNCHRONOUS METRICS`
2024-01-23 11:56:25 +01:00
Robert Schulze
e67076ea2b
Merge pull request #55201 from canhld94/column_level_compress_block
Column-level compression block sizes
2024-01-23 11:22:03 +01:00
Arthur Passos
24b8bbe9fa
Allow to attach partition from table with different partition expression when destination partition expression doesn't re-partition (#39507)
* temp commit

* temp commit

* draft impl for feedback

* fix weird style changes

* fix weird style changes

* fix weird style changes

* fix weird style changes

* fix weird style changes

* aa

* aa

* Add integ tests and remove partition key restriction

* fix small incosistency in partition id

* style fix

* style fix

* style fix

* use existing DataPartStorageBuilder instead of new one

* Refactor part clone to make it more readable and maintainable

* Add MergeTreeDataPartCloner docs

* define ErrorCodes::BAD_ARGUMENTS

* Rebase

* camel case methods

* address some comments

* yet another rebase?

* Move from integ tests to stateless tests

* address more comments

* add finalize on min_max_idx files

* Add sync option to DistinctPartitionExpCloner

* just a temp test

* revert temp change

* Use echoOn to distinguish test queries

* remove comment

* fix build issue during rebase

* atempt to fix build after rebase

* finally fix build

* clear minmaxidx hyperrectangle before loading it

* Fix error on min_max files deletion where it was being assumed that partition expression contained all columns

* get it to the state it was previously

* add missing include

* getting functional?

* refactoring and renaming

* some more refactoring

* extern bad arguments

* try to fix style

* improvements and docs

* remove duplicate includes

* fix crash

* make tests more stable by ordering

* rebase once again..

* fix

* make ci happy?

* fix rebase issues

* docs

* rebase, but prolly needs to be improved

* refactor out from nasty inheritance to static methods

* fix style

* work around optional

* refactor & integrate some changes

* update column_type

* add tests by dencrane

* set utc

* fix ref file

* fix tests

* use MergeTree instead of SummingMergeTree

* mark MergeTreeDataPart::getBlock as const

* address a few comments

* compute module function name size at compile time

* simplify branching in getPartitionAstFieldsCount

* remove column_indexes argument

* merge getBlock with buildBlock

* add some const specifiers

* small adjustments

* remove no longer needed isNull check

* use std::min and max to update global min max idx

* add some assertions

* forward declare some symbols

* fix grammar

* forward decl

* try to fix build..

* remove IFunction forward decl

* Revert "use std::min and max to update global min max idx"

This reverts commit b2fe79dda7.

* Revert "remove no longer needed isNull check"

This reverts commit 129db2610f.

* Revert "Revert "remove no longer needed isNull check""

This reverts commit 9416087dd8.

* Revert "Revert "use std::min and max to update global min max idx""

This reverts commit 20246d4416.

* remove some comments

* partial use of MonotonicityCheckMatcher

* ranges

* remove KeyDescriptionMonotonicityChecker

* remove duplication of applyfunction

* move functions to anonymous namespace

* move functions to cpp

* Relax partition compatibility requirements by accepting subset, add tests from partitioned to unpartitioned

* updte reference file

* Support for partition by a, b, c to partition by a, b

* refactoring part 1

* refactoring part 2, use hyperrectangle, still not complete

* refactoring part 3, build hyperrectangle with intersection of source & destination min max columns

* Support attaching to table with partition expression of multiple expressions

* add tests

* rename method

* remove some code duplication

* draft impl for replicatedmergetree, need to dive deeper

* ship ref file

* fix impl for replicatedmergetree..

* forbid attach empty partition replicatedmergetree

* Add replicated merge tree integration tests

* add test missing files

* fix black

* do not check for monotonicity of empty partition

* add empty tests & fix replicated

* remove no longer needed buildBlockWithMinMaxINdexes

* remove column logic in buildHyperrectangle

* simplify implementation by using existing methods

* further simplify implementation

* move all MergeTreeDataPartClone private methods to .cpp file

* decrease decomposition

* use different namespaces

* reduce code duplication

* fix style

* address a few comments

* add chassert to assert arguments size on MonotonicityCheckVisitor

* remove deleteMinMaxFiles method

* remove useless checks from sanitycheck

* add tests for attach partition (not id)

* Remove sanityCheckASTPartition and bring back conditional getPartitionIDFromQuery

* remove empty block comment

* small fixes

* fix formatting

* add missing include

* remove duplicate iuncludes

* trigger ci

* reduce some code duplication

* use updated partition id on replicatedmergetree

* fix build

* fix build

* small refactor

* do not use insert increment on fetch part

* remove duplicate includes

* add one more integ test

* black

* black

* rely on partition exp instead of partition id on replicated part fetch to decide if it is a different partition exp

* add one more integ test

* add order by clause

* fix black

---------

Co-authored-by: Alexey Milovidov <milovidov@clickhouse.com>
2024-01-22 21:00:04 +01:00
Robert Schulze
90a0ea36b3
Add statement 'SYSTEM RELOAD ASYNCHRONOUS METRICS' 2024-01-22 17:14:58 +00:00
Duc Canh Le
ed031f32af address review comments
Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
2024-01-22 16:06:29 +00:00
vdimir
0791c75315
Merge pull request #58654 from yariks5s/paste_join_aliases_requirement
Avoid alias duplicates in PASTE JOIN and fix aliases requirement
2024-01-22 14:48:13 +01: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
Kruglov Pavel
5444cde408
Merge branch 'master' into variant-data-type 2024-01-18 18:31:27 +01:00
Duc Canh Le
b16a4cf361 add document
Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
2024-01-18 07:55:44 +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
Kseniia Sumarokova
7ded82e51f
Merge pull request #58297 from azat/qp-alter-part
Support query parameters in ALTER TABLE ... PART
2024-01-15 18:18:34 +01:00
Yarik Briukhovetskyi
61889faabd
Merge pull request #58710 from aiven-sal/aiven-sal/fix_normq2
Handle signed numeric literals in normalizeQuery
2024-01-15 14:40:03 +01: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
Alexander Tokmakov
5128607995
Merge pull request #58393 from jaymebrd/feat/add-from-modifier-sync-replica-lightweight
add `from srcreplicas` modifier  for `SYSTEM SYNC REPLICA LIGHTWEIGHT`
2024-01-14 20:53:16 +01:00
Duc Canh Le
f755e77534 move column level setting to the end of declaration
Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
2024-01-14 09:36:32 +00: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
Alexey Milovidov
d112492c56 Remove some code 2024-01-13 03:48:04 +01:00
Antonio Andelic
654fee820e
Merge pull request #58665 from ClickHouse/jemalloc-system-commands
Add SYSTEM commands and Keeper 4LW for jemalloc
2024-01-12 10:08:13 +01:00
Nikolai Kochetov
119b5ccf76
Merge pull request #56944 from amosbird/fix-56666
Fix a bug with projections and the aggregate_functions_null_for_empty setting during insertion.
2024-01-11 14:16:49 +01:00
Salvatore Mesoraca
d134c1521d
Handle signed numeric literals in normalizeQuery
This solution is non-ideal, but it's difficult to achieve
better results using only the Lexer.

Close #57919
2024-01-11 11:04:28 +01:00
Antonio Andelic
2bfed6b8eb Add system commands and 4lw for jemalloc 2024-01-11 08:24:56 +00:00
yariks5s
7a1c1a3b62 analyzer implementation 2024-01-10 13:38:46 +00:00
Amos Bird
ad46103cd3
Also disable legacy_column_name_of_tuple_literal 2024-01-09 22:08:29 +08:00
Amos Bird
330c576740
projection with aggregate_functions_null_for_empty 2024-01-09 22:08:29 +08:00
Jayme Bird
d169383c6c more explicit logical flow 2024-01-08 10:02:09 +00:00
Jayme Bird
a996015c9c clang format 2024-01-08 10:02:09 +00:00
Jayme Bird
18b7f1de5f various fixups 2024-01-08 10:02:09 +00:00
Jayme Bird
b1580efffa switch to use comma join seperated list of srcReplicas 2024-01-08 10:02:09 +00:00
Jayme Bird
128a421d84 add from <srcReplica> modified to SYSTEM SYNC REPLICA LIGHTWEIGHT 2024-01-08 10:02:09 +00:00
Robert Schulze
c11a2fcb7f
Fix style 2024-01-08 08:50:34 +00:00
Robert Schulze
8e804487f3
Some fixups 2024-01-07 22:28:08 +00:00
Robert Schulze
8d4b519bb1
Replace std::regex by re2 2024-01-03 15:06:20 +00:00
Kruglov Pavel
4d8cf71ba7
Merge branch 'master' into variant-data-type 2024-01-03 15:21:23 +01:00
Alexander Tokmakov
1013f6b23f
Merge branch 'master' into reintroduce_is_deleted 2023-12-29 15:46:24 +01:00
Michael Kolupaev
96c68e5aae Remove pausing, enable multithreading, kick off refresh on table creation unless the query says EMPTY 2023-12-28 17:56:06 +00:00
Michael Kolupaev
dda0606f67 Things 2023-12-28 17:56:05 +00:00
Michael Kolupaev
98dbd105ad Overhaul timestamp arithmetic 2023-12-28 17:56:04 +00:00
Michael Kolupaev
a524e8c51e Overhaul dependencies 2023-12-28 17:56:04 +00:00
Michael Kolupaev
29a8edb40e Simple review comments 2023-12-28 17:56:04 +00:00
koloshmet
49367186e3 fix fix fix 2023-12-28 17:56:04 +00:00
koloshmet
238741dafe fixed style 2023-12-28 17:56:04 +00:00
koloshmet
c52aa984ee refreshable materialized views 2023-12-28 17:56:04 +00:00
Alexander Tokmakov
bdada351c8 Revert "Merge pull request #58274 from ClickHouse/revert-58267"
This reverts commit 583b9637c2, reversing
changes made to 224e937620.
2023-12-28 14:07:59 +01:00