Commit Graph

846 Commits

Author SHA1 Message Date
Vladimir
35ca8b97ac
Set distinct_on_expression_list to null white transforming to limit_by 2021-07-07 12:48:39 +03:00
vdimir
b44bd174cc
Change error code for DISTINCT ON and LIMIT BY, finally 2021-07-06 19:14:22 +03:00
mergify[bot]
e9df8cc96c
Merge branch 'master' into support-distinct-on 2021-07-06 11:28:07 +00:00
vdimir
3cef256f79
Errorcode DISTINCT_ON_AND_LIMIT_BY_TOGETHER -> UNSUPPORTED_METHOD 2021-07-06 12:22:08 +03:00
vdimir
9665d41092
Force parentheses for DISTINCT ON 2021-07-06 12:17:26 +03:00
Kseniia Sumarokova
d2141ff53b
Merge pull request #24148 from l1tsolaiki/jsonpath
Jsonpath
2021-07-06 10:43:29 +03:00
vdimir
f5b5f601f4
Merge branch 'master' into support-distinct-on 2021-07-05 15:44:20 +03:00
Kseniia Sumarokova
705e839390
Merge branch 'master' into inconsisteny 2021-07-04 02:29:56 +03:00
Alexey Milovidov
127455f15f Remove experimental ANTLR parser 2021-07-03 18:48:03 +03:00
alexey-milovidov
51bf60a938
Merge pull request #17769 from xjewer/alex/remove_engine_setting
CLICKHOUSE-784: reset merge tree setting
2021-07-03 18:27:15 +03:00
kssenii
02681019f8 Fix 2021-07-03 08:48:42 +00:00
Aleksei Semiglazov
9a5365fc41
CLICKHOUSE-784: reset merge tree setting
Add an ability to reset custom setting to default and remove it from table's metadata.
This will allow to rollback the change without knowing the system/config's default.

Signed-off-by: Aleksei Semiglazov <asemiglazov@cloudflare.com>
2021-07-01 20:09:54 +01:00
Aleksei Semiglazov
f47e1ff102
CLICKHOUSE-1194: add skipping index to the beginning of the list
add the FIRST keyword to the ADD INDEX command to be able to add index in the beginning of the list.

Signed-off-by: Aleksei Semiglazov <asemiglazov@cloudflare.com>
2021-07-01 19:37:48 +01:00
Alexey Milovidov
a7ee0b91b1 Fix strange whitespaces @abyss7 2021-06-29 01:52:22 +03:00
Zijie Lu
f20a1f708b Merge branch 'master' into support-distinct-on 2021-06-28 16:38:29 +08:00
Zijie Lu
b408c7d7e6 Merge branch 'master' into support-distinct-on
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
2021-06-28 14:53:55 +08:00
Maksim Kita
44122118de Fixed ASTRenameQuery for EXCHANGE DICTIONARIES 2021-06-26 14:28:13 +03:00
Maksim Kita
7b03150b90 Fixed tests 2021-06-26 14:28:13 +03:00
Maksim Kita
008adabec2 Support REPLACE DICTIONARY, CREATE OR REPLACE DICTIONARY queries 2021-06-26 14:28:13 +03:00
Ivan
14e43cfafa
Add CI check for darwin-aarch64 (#25560)
* Add support for darwin-aarch64

* Fix PVS warnings

* Add build configuration

* Fix packager args
2021-06-25 18:21:56 +03:00
Anton Popov
4a250dc14e
Merge pull request #25371 from CurtizJ/add-compatibility-setting
Add compatibility setting for name of tuple literals
2021-06-25 15:08:13 +03:00
Nikolai Kochetov
c92c352d9a Fix crash in EXPLAIN AST without query. 2021-06-23 15:29:10 +03:00
Anton Popov
a15ee72d0f Merge remote-tracking branch 'upstream/master' into HEAD 2021-06-23 13:53:01 +03:00
Zijie Lu
63db58710d Support for DISTINCT ON (columns)
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
2021-06-22 19:25:14 +08:00
Anton Popov
c2754c34f4 Merge remote-tracking branch 'upstream/master' into HEAD 2021-06-21 12:42:48 +03:00
Azat Khuzhin
fabff86788 Fix NOT parsing 2021-06-20 23:27:24 +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
Azat Khuzhin
c6339b4c08 Stable NOT chain formatting 2021-06-19 08:03:36 +03:00
alexey-milovidov
35411d1085
Merge pull request #24427 from azat/formatting-fixes
Fix formatting of negative values
2021-06-17 21:21:47 +03:00
l1tsolaiki
f2d451e0ec
Merge branch 'ClickHouse:master' into jsonpath 2021-06-17 18:25:26 +03:00
l1tsolaiki
8bac279cb8 Merge branch 'jsonpath' of github.com:l1tsolaiki/ClickHouse into jsonpath 2021-06-17 13:21:13 +03:00
l1tsolaiki
ff3857fbe7 Add root parsing 2021-06-17 13:18:43 +03:00
Azat Khuzhin
9242654231 negate: replace special case with parens
v0: negate: add parens for negative values
    Before this patch -(-1) was formatted to --1, but this is not valid
    syntax.
v2: replace special case with parens, otherwise formatting of -(-(-1))
    will be unstable, in v0 it was formatted to -(1) but -(1) is
    formatted to -1 [1].

  [1]: https://clickhouse-test-reports.s3.yandex.net/24427/4512460aeb02fec557c558eee3f8291a6297efb2/fuzzer_asan/fuzzer.log
2021-06-17 10:07:03 +03:00
alexey-milovidov
f7707b4409
Merge pull request #25391 from amosbird/ctf
Fix column transformer replace format issue
2021-06-17 09:06:57 +03:00
Amos Bird
f9d00d6dfb
Fix column transformer replace format issue 2021-06-17 11:12:26 +08:00
Maksim Kita
67e9b85951 Merge ext into common 2021-06-16 23:28:41 +03:00
Anton Popov
ea9b890618
Merge branch 'master' into add-compatibility-setting 2021-06-16 21:10:56 +03:00
Anton Popov
8bd7cbd925 add compatibility setting for name of columns 2021-06-16 21:10:07 +03:00
mergify[bot]
7959d92029
Merge branch 'master' into minor-changes-3 2021-06-15 18:07:24 +00:00
Nikita Mikhaylov
a52bba91b7
Merge pull request #16401 from abyss7/ast-table-identifier-2
ASTTableIdentifier part #2: Introduce ASTTableIdentifier
2021-06-15 13:51:30 +03:00
Kseniia Sumarokova
b9c77d9628
Merge branch 'master' into jsonpath 2021-06-14 11:43:31 +03:00
Alexey Milovidov
447d7bb8cd Minor changes 2021-06-14 07:13:35 +03:00
Alexey Milovidov
cae9b25074 Minor change 2021-06-14 06:05:27 +03:00
Ivan
d5bd761db9
Typo
Co-authored-by: Nikita Mikhaylov <mikhaylovnikitka@gmail.com>
2021-06-13 22:27:54 +03:00
Ivan Lezhankin
a237229998 Another ANTLR fix 2021-06-12 00:15:38 +03:00
Ivan Lezhankin
f7979292d6 Merge branch 'ast-table-identifier-2' of github.com:abyss7/ClickHouse into ast-table-identifier-2 2021-06-11 18:29:04 +03:00
Ivan Lezhankin
4773c79300 Fix ANTLR grammar 2021-06-11 18:27:32 +03:00
Maksim Kita
eabeb3076f Added tests 2021-06-10 22:32:09 +03:00
Ivan
a7fa4e641c
Merge branch 'master' into ast-table-identifier-2 2021-06-10 16:43:22 +03:00
Alexander Kuzmenkov
c0e6aa97a6
Merge pull request #24734 from ClickHouse/aku/frame-expressions
support expressions in window frame
2021-06-10 00:25:32 +03:00