Commit Graph

3204 Commits

Author SHA1 Message Date
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
Alexander Tokmakov
38fe70c68a
Revert "Refreshable materialized views (takeover)" 2023-12-28 13:12:20 +01:00
Alexey Milovidov
524d53199d
Merge branch 'master' into mv 2023-12-28 04:11:48 +01:00
Alexey Milovidov
c7efd2afea Revert #58267 2023-12-28 04:09:33 +01:00
Alexey Milovidov
40a5dbdeba
Merge branch 'master' into mv 2023-12-28 03:16:27 +01:00
Michael Kolupaev
b9cbecb0df Remove pausing, enable multithreading, kick off refresh on table creation unless the query says EMPTY 2023-12-27 20:24:56 +00:00
Michael Kolupaev
ef4cc5ec7f Things 2023-12-27 20:24:55 +00:00
Michael Kolupaev
a7c369e14f Overhaul timestamp arithmetic 2023-12-27 20:24:55 +00:00
Michael Kolupaev
01369a0a8a Overhaul dependencies 2023-12-27 20:24:54 +00:00
Michael Kolupaev
5dc04a13a7 Simple review comments 2023-12-27 20:24:54 +00:00
koloshmet
808cb0fa05 fix fix fix 2023-12-27 20:24:54 +00:00
koloshmet
d1932763f3 fixed style 2023-12-27 20:24:54 +00:00
koloshmet
c762898adb refreshable materialized views 2023-12-27 20:24:54 +00:00
Alexander Tokmakov
01d042c490 Revert "Merge pull request #57932 from ClickHouse/remove-shit-cleanup"
This reverts commit 2d58dc512c, reversing
changes made to 41873dc4a3.
2023-12-27 13:46:06 +01:00
Alexander Tokmakov
4c4623e3ab Revert "Merge pull request #58100 from ClickHouse/optimize-cleanup-as-noop"
This reverts commit 3b1aa53460, reversing
changes made to b9466023ce.
2023-12-27 13:03:53 +01:00
Alexey Milovidov
dc4b9a1013 Obfuscator: keep settings and timezones 2023-12-23 04:55:55 +01:00
Yarik Briukhovetskyi
483a377834
Merge pull request #57995 from yariks5s/paste_join
Implementing PASTE JOIN
2023-12-22 12:56:06 +01:00
Alexey Milovidov
411d1049dd Reintroduce OPTIMIZE CLEANUP as no-op 2023-12-21 06:02:46 +01:00
Anton Popov
87d0cec055
Merge pull request #57433 from CurtizJ/materialize-lightweight-delete
Add mutation command `APPLY DELETED MASK`
2023-12-20 14:44:11 +01:00
Yarik Briukhovetskyi
6e816d45ae
Merge branch 'master' into paste_join 2023-12-19 20:02:24 +01:00
avogar
319ae440b6 Implement Variant data type 2023-12-19 16:45:15 +00:00
Robert Schulze
952175ce39
Merge pull request #57875 from zhongyuankai/order_by_all
Support `ORDER BY ALL`
2023-12-19 13:38:07 +01:00
yariks5s
6740316a88 init 2023-12-18 15:02:51 +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
Robert Schulze
41da561e3a
Fix crash 2023-12-17 10:16:25 +00:00
ubuntu
0e8b26d84f fix test 2023-12-17 11:21:46 +08:00
Alexey Milovidov
6ada95ea00 Remove C++ templates (normalizeQuery) 2023-12-17 02:44:30 +01:00
zhongyuankai
5ccc5b4fd8 batter 2023-12-16 18:49:25 +08:00
zhongyuankai
01f5b20517 Support ORDER BY ALL 2023-12-16 18:48:23 +08:00
Alexey Milovidov
ee502ef6b9 Remove trash (OPTIMIZE CLEANUP) 2023-12-15 22:41:58 +01:00
Nikita Mikhaylov
a0af0392cd
Random changes in random files (#57642) 2023-12-14 12:47:11 +01:00
Anton Popov
7598403f78 Merge remote-tracking branch 'upstream/master' into HEAD 2023-12-13 16:55:17 +00:00
Nikolay Degterinsky
64cd83fcd9
Merge pull request #57713 from evillique/fix-unary-operators-parsing
Fix unary operators parsing
2023-12-11 13:18:00 +01:00
Nikolay Degterinsky
ed23f47e72 Yet another fix 2023-12-10 23:04:29 +00:00
Nikolay Degterinsky
8b5c694684 Fix 2023-12-10 16:45:17 +00:00
Nikolay Degterinsky
fc8656ee9e Fix unary operators parsing 2023-12-09 22:44:06 +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
Alexey Milovidov
c729d06e27
Merge pull request #56078 from hanfei1991/hanfei/sqllogic
try to work sqllogic-test out
2023-12-05 06:37:29 +01:00
Anton Popov
7fbe7462b6 add mutation command to apply deleted mask 2023-12-01 19:12:05 +00:00
Julia Kartseva
1f8031c6e1
Merge pull request #56892 from icuken/alter_temporary_table
allow ALTER for TEMPORARY tables
2023-11-30 18:29:43 -08:00
Raúl Marín
46acd8736c
Merge pull request #57189 from Algunenano/fix_respect_nulls
Fix RESPECT NULLS
2023-11-30 20:21:42 +01:00
Sergey Kviatkevich
afae432e99 allow ALTER for TEMPORARY table 2023-11-30 21:42:12 +03:00
Raúl Marín
7fa626bfef Reject NULL actions on normal functions and fix serialization 2023-11-30 13:16:51 +01:00
Han Fei
7bd2ea3add Merge branch 'master' into hanfei/statistic 2023-11-27 23:31:23 +01:00
Han Fei
824e9ef664 Merge branch 'master' into hanfei/sqllogic 2023-11-27 15:15:35 +01:00
Raúl Marín
2e24639d46 Fix updateTreeHashImpl 2023-11-27 11:00:27 +01:00
Raúl Marín
56b15a7294 Fix style 2023-11-27 11:00:27 +01:00
Raúl Marín
4250c6626c Move handling of RESPECT NULLS outside of the parser 2023-11-27 11:00:27 +01:00
Raúl Marín
d8ac46e064 Make RESPECT NULLS case insensitive and compatible with combinators 2023-11-27 11:00:27 +01:00
Raúl Marín
a3e342a477 Separate first_value and first_value_respect_nulls states 2023-11-27 11:00:27 +01:00
Han Fei
34945227ac address comments 2023-11-25 20:51:57 +01:00
Nikolay Degterinsky
f6d7b30b10
Merge pull request #56825 from evillique/fix-set-query-formatting
Fix SET query and SETTINGS formatting
2023-11-18 15:35:10 +01:00
Alexey Milovidov
482d8ca9d8
Merge pull request #56102 from ClickHouse/coverage
Granular code coverage with introspection
2023-11-16 23:23:40 +01:00
Nikolay Degterinsky
ef17d972ab Fix SET query formatting 2023-11-16 05:18:50 +00:00
Han Fei
c527a77d0b ignore all heading plus 2023-11-15 17:02:14 +01:00
Robert Schulze
2931bbfe62
Merge pull request #56665 from rschu1ze/refactor-ast-hash-calculation
Small refactoring of AST hash calculation (follow-up to #56545)
2023-11-14 11:24:30 +01:00
Alexey Milovidov
3ef14f6098 Merge branch 'master' of github.com:ClickHouse/ClickHouse into coverage 2023-11-14 06:08:32 +01:00
Nikolay Degterinsky
bf04f0f298
Merge pull request #56494 from evillique/fix-empty-named-collections
Fix empty NAMED COLLECTIONs
2023-11-13 17:49:17 +01:00
Robert Schulze
d6df7d8403
Merge remote-tracking branch 'rschu1ze/master' into refactor-ast-hash-calculation 2023-11-13 15:54:21 +00:00
Robert Schulze
b899270372
Remove default value for argument 'ignore_aliases' from IAST::updateTreeHash() 2023-11-13 13:18:35 +00:00
Alexey Milovidov
7a489059ac
Merge pull request #56350 from ClickHouse/system-symbols
Remove garbage.
2023-11-13 12:25:18 +01:00
Robert Schulze
50cd59a72b
Remove default value for argument 'ignore_aliases' from IAST::getTreeHash() 2023-11-13 10:27:38 +00:00
Kseniia Sumarokova
b7915e6983
Merge pull request #55782 from aiven-sal/aiven-sal/namedcoll_pr
NamedCollections: prevent fields overriding in functions' calls
2023-11-13 09:07:09 +01:00
Alexey Milovidov
a044c61c79 Merge branch 'master' of github.com:ClickHouse/ClickHouse into system-symbols 2023-11-13 03:27:37 +01:00
robot-ch-test-poll
0d8af2c119
Merge pull request #56545 from rschu1ze/qc-alias
Fix handling of aliases in query cache
2023-11-13 02:17:41 +01:00
Robert Schulze
90711b1b99
Fix test failures 2023-11-12 11:06:58 +00:00
Alexey Milovidov
58319f08be Merge branch 'master' into system-symbols 2023-11-11 04:12:37 +01:00
Robert Schulze
8ad124ef64
Fix #56258, attempt II 2023-11-10 14:03:13 +00:00
Nikolay Degterinsky
07b2cdb614
Merge pull request #56491 from evillique/fix-alter-comment-on-cluster
Fix ALTER COMMENT queries ON CLUSTER
2023-11-10 13:35:26 +01:00
Robert Schulze
4223b82fb4
Revert "Fix #56258"
This reverts commit 1dc565cd22.
2023-11-10 11:50:16 +00:00
Alexey Milovidov
7a44e2f478 Miscellaneous 2023-11-10 05:36:44 +01:00
Robert Schulze
1dc565cd22
Fix #56258 2023-11-09 21:07:42 +00:00
Salvatore Mesoraca
1174689f8b
Refactoring 2023-11-09 17:25:20 +01:00
Salvatore Mesoraca
b8e478195f
Simplify code 2023-11-09 17:25:19 +01:00
Salvatore Mesoraca
7d206cbc3c
NamedCollections: prevent fields overriding in functions call
Add syntax in SQL and XML to mark specific fields to allow
override or not.
Also add a new setting to control the default behaviour when
overriding support is not specified.
2023-11-09 17:25:16 +01:00
Nikolay Degterinsky
10ac68517e Fix empty NAMED COLLECTIONs 2023-11-09 07:59:58 +00:00
Nikolay Degterinsky
96f558f51a Fix ALTER COMMENT queries ON CLUSTER 2023-11-09 06:19:00 +00:00
Alexey Milovidov
cd94d02455 Merge branch 'master' into coverage 2023-11-04 21:49:59 +01:00
Han Fei
19cdc6dfe2 Merge branch 'master' into hanfei/statistic 2023-10-30 04:53:18 +01:00
Han Fei
df1e019268 address comments 2023-10-30 00:39:16 +01:00
Alexey Milovidov
70e3dd808c Granular code coverage with introspection 2023-10-29 02:07:24 +01:00
vdimir
c1ae369919
wip CHECK query for all tables 2023-10-27 15:22:10 +00:00
vdimir
1d5f75fd71
Merge pull request #53404 from ClickHouse/vdimir/check_table_improvements2
Improve CHECK TABLE system query, support checking part
2023-10-26 10:57:44 +02:00
Maksim Kita
901294d352 Fixed code review issues 2023-10-25 21:41:26 +03:00
Maksim Kita
82d4d52b06 Add SHOW SETTING query 2023-10-25 18:49:00 +03:00
Raúl Marín
6068277af9
Merge pull request #55815 from jetgm/master
Add SHOW MERGES
2023-10-25 11:44:30 +02:00
vdimir
7583394c9c
Support CHECK TABLE ... PART ... query 2023-10-23 12:33:35 +00:00
Raúl Marín
7d7bf1f565
Merge pull request #55826 from Algunenano/clearer_matview_creation_errors
Provide a better message for common MV pitfalls
2023-10-23 14:07:14 +02:00
Aleksei Filatov
0a1f3f205c
Add external HTTP Basic authenticator (#55199) 2023-10-20 19:24:19 +02:00
Raúl Marín
dd640cba72 Provide a better message for common MV pitfalls 2023-10-19 13:21:57 +02:00
jetgm
bde5c5a4a8 add show merges 2023-10-19 18:17:28 +08:00
Antonio Andelic
fc24e599fd Check if id is nullptr 2023-10-18 07:26:32 +00:00
Han Fei
4b23142775
Merge branch 'master' into hanfei/statistic 2023-10-17 16:40:31 +02:00
János Benjamin Antal
eeff98f3a3
Merge pull request #55373 from lingtaolf/enhancement/rename_without_keyword
Support rename table without keyword TABLE
2023-10-16 14:06:23 +02:00
alesapin
697c1e3bb0
Merge pull request #55604 from ClickHouse/evillique-partition-parameters
Implement query paramenters support in partition expression
2023-10-16 10:26:02 +02:00
Alexey Milovidov
2bb5b79f02
Merge pull request #55361 from ClickHouse/better-depth-check
Better recursion depth check
2023-10-14 20:17:07 +02:00
Alexey Milovidov
565a1c62d7
Merge pull request #54100 from ClickHouse/unicode-minus
Add suport for mathematical minus character
2023-10-14 20:16:08 +02:00
Alexey Milovidov
aafdd9da86
Merge pull request #55615 from ClickHouse/fix-kusto-thread-race
Fix: race condition in kusto implementation
2023-10-14 04:52:37 +02:00
Alexey Milovidov
de8534de70 Fix error 2023-10-14 02:10:13 +02:00
Alexey Milovidov
6d8f28aad0 Merge branch 'master' into better-depth-check 2023-10-14 01:48:59 +02:00
Alexey Milovidov
854ad78c3e Fix error 2023-10-14 01:48:18 +02:00
Alexey Milovidov
183411cf58 Merge branch 'master' into unicode-minus 2023-10-14 01:34:45 +02:00
Yakov Olkhovskiy
1cd98f3cea use thread_local for static 2023-10-13 17:43:38 +00:00
Alexander Tokmakov
3e60451ac7 Revert "Merge pull request #54421 from evillique/cluster-groups"
This reverts commit 211c80e1a0, reversing
changes made to b53a98217c.
2023-10-13 18:55:51 +02:00
alesapin
daa8dbbbae Make as flexible as it can be 2023-10-13 18:51:32 +02:00
alesapin
1571dbcb26 Finally fix it 2023-10-13 18:16:51 +02:00
alesapin
f80dd06f52 Fix tuple parser 2023-10-13 17:36:38 +02:00
alesapin
78575720d1 Simpler and better 2023-10-13 16:52:04 +02:00
alesapin
47d48d81e0 Implement feature 2023-10-13 16:22:18 +02:00
robot-clickhouse-ci-1
211c80e1a0
Merge pull request #54421 from evillique/cluster-groups
Add replica groups to Replicated database engine
2023-10-12 18:14:42 +02:00
Nikolay Degterinsky
20e16be27b Fixes & improvements 2023-10-12 15:02:08 +00:00
Han Fei
42dc61abf5 Merge branch 'master' into hanfei/statistic 2023-10-12 16:19:45 +02:00
凌涛
4499dd3e2f modify style 2023-10-12 14:21:20 +08:00
alesapin
9235408435 Merge branch 'partition-parameters' of github.com:evillique/ClickHouse into evillique-partition-parameters 2023-10-11 18:06:12 +02:00
Alexey Milovidov
59e4c223f3
Merge pull request #55277 from azat/fix-schema-cache-format
Fix query formatting for SYSTEM queries
2023-10-11 16:17:29 +02:00
Yakov Olkhovskiy
0738984edf
Merge pull request #42510 from ClibMouse/Kusto-phase2-oss-pr
Support Kusto Query Language dialect - phase 2
2023-10-11 08:35:26 -04:00
Azat Khuzhin
9d26bd869c Fix SYSTEM query formatting
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-10-11 07:20:28 +02:00
Azat Khuzhin
ef2b5b9632 Fix query formatting for SYSTEM DROP SCHEMA CACHE FOR
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-10-11 07:20:28 +02:00
Vitaly Baranov
2af66dd9e9
Merge pull request #55089 from vitlibar/improve-hiding-secrets-in-logs
Improve hiding secrets in logs
2023-10-10 19:02:40 +02:00
Kruglov Pavel
5ded0005a3
Merge pull request #55064 from AVMusorin/system-drop-format-cache
Allow drop cache for Protobuf format
2023-10-10 14:23:11 +02:00
Vitaly Baranov
fb93bee5f3
Update src/Parsers/ASTFunction.cpp
Co-authored-by: Konstantin Bogdanov <thevar1able@users.noreply.github.com>
2023-10-09 17:01:30 +02:00
Anton Popov
4b76ab91a1 fix parsing of arrays in cast operator 2023-10-09 14:16:13 +00:00
凌涛
8f82d64129 support rename table without keyword TABLE 2023-10-09 18:10:03 +08:00
Aleksandr Musorin
8d0c961af0 Allow drop cache for protobuf format
Before it was impossible to update Protobuf schema without server
restart. With this commit, it is enough to send query `SYSTEM DROP
SCHEMA FORMAT CACHE [FOR Protobuf]`.
2023-10-09 10:41:15 +02:00
Alexey Milovidov
b6d4ae51c6 Better recursion depth check 2023-10-09 02:40:47 +02: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
Duc Canh Le
bb9521542d change syntax to per-column settings
Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
2023-10-02 05:59:13 +00:00
Duc Canh Le
00c2a3d2c2 per-column compress min-max block sizes
Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
2023-10-02 05:59:02 +00:00
Vitaly Baranov
0fde528b96 Support "S3" database engine while hiding secrets in AST. 2023-09-28 12:10:45 +02:00
Vitaly Baranov
e78bb8223b Support NOSIGN in the parameters of "S3" table engines while hiding secrets in AST. 2023-09-28 12:10:45 +02:00
Vitaly Baranov
8637f60906 Hide secrets in DataLake table engines and functions. 2023-09-28 12:10:45 +02:00
Yong Wang
8c9da6bacf Merge remote-tracking branch 'origin/master' into Kusto-phase2-oss-pr 2023-09-27 22:35:14 -07:00
Han Fei
4e7745f757 Merge branch 'master' into hanfei/statistic 2023-09-26 21:43:53 +02:00
Han Fei
8cb9fe0154 refine code 2023-09-26 19:16:01 +02:00
George Gamezardashvili
0ce30ab6d5
SSH keys authentication (#41109)
Added new type of authentication based on SSH keys. It works only for Native TCP protocol.

Co-authored-by: Nikita Mikhaylov <nikitamikhaylov@clickhouse.com>
Co-authored-by: Robert Schulze <robert@clickhouse.com>
2023-09-26 17:50:19 +02:00
Nikolay Degterinsky
ff66d29376
Merge pull request #51469 from frinkr/perf-huge-ast
Improve performace for huge ast by direct-writing the column name for ASTLiteral
2023-09-24 14:56:50 +02:00
Nikolay Degterinsky
256a699f43 Merge remote-tracking branch 'upstream/master' into perf-huge-ast 2023-09-24 00:29:03 +00:00
Alexander Tokmakov
21ffbd88de
Merge pull request #54859 from ClickHouse/fix_zero_copy_locks
Fix zero copy locks with hardlinks
2023-09-22 18:27:03 +02:00
Vitaly Baranov
3a2ca1f69c
Merge pull request #51261 from evillique/users-valid-until
Add VALID UNTIL clause for users
2023-09-22 12:38:30 +02:00
Pavel Novitskiy
853e3f0aa7
Add drop table IF EMPTY (#48915) 2023-09-21 09:20:18 -04:00
Jordi Villar
05a1c96258 Interval operator support plural literals 2023-09-20 23:00:25 +02:00
Alexander Tokmakov
ec80068611 add a test for no such key 2023-09-20 22:37:24 +02:00
robot-clickhouse
c7c4166a73
Merge pull request #54670 from ClickHouse/fix-parser-unit-tests
Fix parser unit tests
2023-09-20 02:24:27 +02:00
Han Fei
17243b84ab Merge branch 'master' into hanfei/statistic 2023-09-19 17:09:17 +02:00
János Benjamin Antal
2ea324e44e Add explanatory comment 2023-09-18 09:59:30 +00:00
János Benjamin Antal
66265e879d Make the transformation to one line reversible 2023-09-18 09:59:20 +00:00
Robert Schulze
f5e8028bb1
Merge pull request #54642 from rschu1ze/broken-re2st
Remove broken lockless variant of re2
2023-09-17 15:30:57 +02:00
János Benjamin Antal
358f22d18a Update PRQL unit tests to latest PRQL version 2023-09-15 12:31:30 +00:00
János Benjamin Antal
68c6bd8826 Make the failed message single line to fix result parsing 2023-09-15 12:04:22 +00:00
Robert Schulze
7b378dbad3
Remove broken lockless variant of re2 2023-09-14 16:40:42 +00:00
Val Doroshchuk
6cfbaf9f86 MaterializedMySQL: Introduce Character Set Introducers
If some string literals are used in DDL, they might have `Character Set Introducers`
https://dev.mysql.com/doc/refman/8.0/en/charset-introducer.html
f.e. _utf8mb4'1' which is not parsable by current ParserStringLiteral.

Since we use utf8 by default, suggesting to automatically convert the string literals to utf8
before executing the query and avoid any charset introducers there.
Conversion from utf8 to utf8 is not needed and skipped.

Also it might convert double quotes to single quotes if any
which might solve issues with COMMENT and empty string literals "" in DEFAULT expressions.

SELECT _latin1"abc"; -- might be also valid for MySQL
... DEFAULT "",
... COMMENT "abc"

Currently no DEFAULT expressions are supported, not parsable at all,
but using this MR it allows to parse the expressions together with double quotes as string literals.
2023-09-14 08:24:25 +02:00
Tim Windelschmidt
7979090333 use env to find bash 2023-09-13 18:57:11 +02:00
Nikolay Degterinsky
268c45d900 Merge remote-tracking branch 'upstream/master' into users-valid-until 2023-09-12 23:44:22 +00:00
Kruglov Pavel
21a2cf7707
Merge pull request #54337 from wat-ze-hex/show-functions-2023-09-04
Add SHOW FUNCTIONS support to client
2023-09-11 13:03:02 +02:00
Nikolay Degterinsky
39b11f47f5
Merge pull request #54403 from evillique/fix-column-formatting
Fix incorrect formatting of CREATE query with PRIMARY KEY
2023-09-08 22:14:49 +02:00
robot-ch-test-poll4
839f69c940
Merge pull request #53765 from vitlibar/sync-uuids-of-tables-on-replicas
Sync UUIDs of tables on replicas after RESTORE
2023-09-08 17:30:32 +02:00
Han Fei
ddcb64f39f update docs and refine statements 2023-09-08 02:27:17 +02:00
Julia Kartseva
59844b0a9d Add SHOW FUNCTIONS support to client
Accepts CH client queries in the form of
SHOW FUNCTIONS [LIKE | ILIKE '< pattern>']

Retrieves all columns from `functions` table in system database.

Fixes #52757
2023-09-07 14:08:50 -07:00
Nikolay Degterinsky
e821cd4511 Fix formatting of column declaration 2023-09-07 12:01:07 +00:00
Alexander Sapin
518d4b4357 Merge branch 'master' into alter-table-add-comment 2023-09-06 12:34:04 +02:00
Vitaly Baranov
82b1c09150 Simplify coordination of UUIDs. 2023-09-05 20:49:43 +02:00
robot-clickhouse
926c5636dd
Merge pull request #42599 from ClickHouse/build-fuzzer-protocol
libFuzzer: add CI fuzzers build, add tcp protocol fuzzer, fix other fuzzers.
2023-09-04 22:41:54 +02:00
Han Fei
f60dad0598 Merge branch 'master' into hanfei/statistic 2023-09-04 16:17:07 +02:00
Han Fei
2330a28f7b support estimate by stat 2023-09-04 15:51:00 +02:00
Yakov Olkhovskiy
361b21b416 fix fuzzers, cmake refactor, add target fuzzers 2023-09-01 14:20:50 +00:00
Nikita Mikhaylov
c08fc52812
Merge pull request #54067 from ClickHouse/vdimir/is_not_distinct_from_operator
Parse IS NOT DISTINCT and <=> operators
2023-08-31 17:14:42 +02:00
Alexey Milovidov
8c28e51425 Add suport for mathematical minus character 2023-08-31 04:59:58 +02:00
Alexey Milovidov
6962070baa Add suport for mathematical minus character 2023-08-31 04:56:47 +02:00
vdimir
dd094d1f55
Parse IS NOT DISTINCT and <=> operators 2023-08-30 13:12:43 +00:00
chen768959
4db7b866ad If there is a comma after 'from' then the first one was a name of a column 2023-08-29 15:20:23 +08:00
Alexey Milovidov
0c0e8e548a
Merge pull request #53864 from jsc0218/ignore-foreign-keys-in-tables-definition
Ignore foreign keys in tables definition
2023-08-29 03:09:54 +03:00
jsc0218
c91b409bcf remove trailing white spaces to pass format check 2023-08-28 09:19:46 -04:00
jsc0218
bf12415215 Ignore foreign keys in tables definition 2023-08-27 21:18:13 -04:00
Yakov Olkhovskiy
264877b2a5 fix fuzzers, add bundle build target fuzzers 2023-08-27 19:47:11 +00:00
Yakov Olkhovskiy
b9425d8c4b no-newline-eof for Parsers/fuzzers/codegen_fuzzer 2023-08-27 15:47:29 +00:00
Yong Wang
e5f968b0d8 Kusto-phase2: enabled fuzzing test for dialect prql 2023-08-26 07:40:40 -07:00
Yong Wang
e08382a8c7 Kusto-phase3: fix another style 2023-08-26 07:40:40 -07:00
Yong Wang
ff9b985490 Kusto-phase2: fix style 2023-08-26 07:40:40 -07:00
Yong Wang
1c3a3debb4 Kusto-phase2: fix unit test 2023-08-26 07:40:40 -07:00
Yong Wang
828f4a67b7 Kusto-phase2: use seperated path to parse kql query 2023-08-26 07:40:40 -07:00
Yong Wang
5621ca5984 Kusto-phase2: allow negative operators for kql table function only 2023-08-26 07:40:40 -07:00
Yong Wang
4a5f462e43 Kusto-phase2: prevent pass NaN and inf to intExp2 2023-08-26 07:40:40 -07:00
Yong Wang
350516ddf5 Kusto-phase2: fix unit test 2023-08-26 07:40:40 -07:00
Yong Wang
02a2a70add Kusto-phase2: fix another intExp2 integer overflow 2023-08-26 07:40:40 -07:00
Yong Wang
0a26b6fde3 Kusto-phase2 : fix integer overflow for intExp2 2023-08-26 07:40:40 -07:00
Yong Wang
89d4644f93 Kusto-phase3: add round fuction to p2 to avoid different result on different machine 2023-08-26 07:40:40 -07:00
Yong Wang
1ec574057a Kusto-phase2: fixed some functional test 2023-08-26 07:40:40 -07:00
Yong Wang
815cf6b55d Kusto-phase2: fix KustoLayer state 2023-08-26 07:40:39 -07:00
Yong Wang
cafb9f810e Kusto-phase2: fix unit test 2023-08-26 07:40:39 -07:00
Yong Wang
87d3ba87a7 Kusto-phase2: update pipe index issue 2023-08-26 07:40:39 -07:00
Yong Wang
91f82150a5 Kusto-phase2: remove unnecessary changes 2023-08-26 07:40:39 -07:00
Yong Wang
bfb6184ccf Kusto-phase2: fix style, remove trailing whitespaces 2023-08-26 07:40:39 -07:00
Yong Wang
c9e180cc87 Kusto-phase2 : adjust time format 2023-08-26 07:40:39 -07:00
Yong Wang
5cc3f4708c Kusto-phase2: restore to kusto dialect only, fix some style issue 2023-08-26 07:40:39 -07:00
Yong Wang
523bcf550d Kusto-phase2: fix operators, unit test and functional test. 2023-08-26 07:40:39 -07:00
Yong Wang
6f6a103c5f Kusto-phase2: remove dialect auto option. use table function instead of subquery for kql() function fix type. 2023-08-26 07:40:39 -07:00
Larry Luo
9e82ed1d04 Fixed clang-tidy and Arch tests 2023-08-26 07:40:39 -07:00
Larry Luo
1105ac624b Fixed style issues 2023-08-26 07:40:38 -07:00
Larry Luo
3a245f5cba removed trailing whitespaces. 2023-08-26 07:40:38 -07:00