Commit Graph

1517 Commits

Author SHA1 Message Date
Alexander Tokmakov
1fe50ad201 Merge branch 'master' into mvcc_prototype 2022-04-05 14:38:02 +02:00
Alexander Tokmakov
da00beaf7f Merge branch 'master' into mvcc_prototype 2022-04-05 11:14:42 +02:00
Vladimir C
54b4049ea5
Merge pull request #35794 from awakeljw/fork_chmaster 2022-04-05 09:44:45 +02:00
Alexander Tokmakov
a2167f12b8 Merge branch 'master' into mvcc_prototype 2022-04-04 14:24:23 +02:00
Azat Khuzhin
93bbe9641a Fix formatting of INSERT ... COMPRESSION
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-04 10:33:12 +03:00
Azat Khuzhin
9a76efb850 Fix formatting of INSERT INFILE queries (missing quotes)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-04 10:33:12 +03:00
Yakov Olkhovskiy
38993f215f
Merge pull request #35706 from yakov-olkhovskiy/ephemeral-35641
Allow EPHEMERAL without explicit default expression
2022-04-01 10:49:29 -04:00
kssenii
6c8e073a61 Merge master 2022-04-01 16:48:29 +02:00
Alexander Tokmakov
6591d1ceb7 Merge branch 'master' into mvcc_prototype 2022-04-01 15:38:46 +02:00
Kseniia Sumarokova
cafff71d2f
Merge pull request #35799 from evillique/extract-parser-fix
Fix extract function parser
2022-04-01 10:59:39 +02:00
jewisliu
9a4cc78dfb support ALTER TABLE t DETACH PARTITION ALL syntax 2022-04-01 13:13:07 +08:00
Yakov Olkhovskiy
0367cbad3c messed merge fixed 2022-03-31 09:35:19 -04:00
Nikolay Degterinsky
e022f8527b Fix extract parser 2022-03-31 11:42:35 +00:00
Alexander Tokmakov
5a50ad9de3 Merge branch 'master' into mvcc_prototype 2022-03-31 11:35:04 +02:00
Yakov Olkhovskiy
3b40b56e56 refactored to remove parsers rependency on datatypes 2022-03-30 23:47:16 -04:00
kssenii
ac4897f4f9 Fix 2022-03-30 20:16:41 +02:00
kssenii
0fc92fe2aa Get rid of all "remote" mentions 2022-03-30 17:15:29 +02:00
kssenii
a2e950bd3b Fix 2022-03-29 17:34:50 +02:00
Yakov Olkhovskiy
46fd69d2bf
Update ParserCreateQuery.h
style fix
2022-03-29 09:15:27 -04:00
Yakov Olkhovskiy
ef34f7dbd7 allow EPHEMERAL without expression 2022-03-29 03:54:13 -04:00
Yakov Olkhovskiy
615efa1381 aliases processing fixed 2022-03-28 19:15:53 -04:00
Alexander Tokmakov
208b242188 Merge branch 'master' into mvcc_prototype 2022-03-28 19:58:06 +02:00
kssenii
6769b84638 Merge master 2022-03-24 20:47:43 +01:00
Yakov Olkhovskiy
adefcfd299
Merge branch 'master' into interpolate-feature 2022-03-24 15:33:09 -04:00
Yakov Olkhovskiy
83f406b722 optimization, INTERPOLATE without expr. list, any column is allowed except WITH FILL 2022-03-24 15:29:29 -04:00
Yakov Olkhovskiy
1631656803
Merge pull request #34353 from zvonand/issue_33147
Extended usage of Milliseconds, Microseconds, Nanoseconds
2022-03-23 13:33:07 -04:00
kssenii
c2c7f365ce Merge master 2022-03-23 16:58:35 +01:00
Alexander Tokmakov
bcec53aadc Merge branch 'master' into mvcc_prototype 2022-03-23 11:28:43 +01:00
Mikhail f. Shiryaev
e6f5a3f98b
Apply black formatter to all *.py files in the repo 2022-03-22 17:39:58 +01:00
Alexander Tokmakov
3c762f566d Merge branch 'master' into mvcc_prototype 2022-03-21 20:16:29 +01:00
mergify[bot]
e11ef05c2b
Merge branch 'master' into issue_33147 2022-03-21 13:40:17 +00:00
kssenii
eabbce69a7 Add system drop remote filesystem cache query, allow to write cache on insert 2022-03-21 12:32:44 +01:00
Vitaly Baranov
7a46e7a0d1
Merge branch 'master' into improve-backup-and-restore 2022-03-21 11:49:26 +01:00
Alexey Milovidov
0ce4696c49
Revert "[WIP] New row policies" 2022-03-21 08:41:33 +03:00
Alexander Tokmakov
9e05b12d2c Merge branch 'master' into mvcc_prototype 2022-03-20 22:42:26 +01:00
Vitaly Baranov
54d554f55d Simplify elements of ASTBackupQuery. 2022-03-20 20:01:54 +01:00
Yakov Olkhovskiy
eb7474e73a
Merge branch 'master' into interpolate-feature 2022-03-19 03:11:14 -04:00
Yakov Olkhovskiy
a8e1671a76 type match check for INTERPOLATE expressions added, bugfix, printout fixed 2022-03-18 16:44:27 -04:00
Alexander Tokmakov
0719d01d39 more introspection 2022-03-18 14:33:59 +01:00
Vitaly Baranov
98e48d7b54 SHOW CREATE ROW POLICY now always shows AS permissive/restrictive if there is TO section. 2022-03-17 15:28:53 +01:00
Vitaly Baranov
470582e262 Change type of RowPolicyKind: bool -> enum. 2022-03-17 15:28:05 +01:00
Yakov Olkhovskiy
00700988ee style fix 2022-03-17 02:31:01 -04:00
Yakov Olkhovskiy
7bb66e6702 added INTERPOLATE extension for ORDER BY WITH FILL 2022-03-17 01:51:35 -04:00
Alexander Tokmakov
1f571b7734 Merge branch 'master' into mvcc_prototype 2022-03-15 14:45:06 +01:00
Vladimir C
af88d3f133
Merge pull request #35173 from bigo-sg/dump_ast_in_dot 2022-03-15 11:18:41 +01:00
Alexander Tokmakov
9702b5177d Merge branch 'master' into mvcc_prototype 2022-03-14 21:45:38 +01:00
Maksim Kita
2665724301 Fix clang-tidy warnings in Parsers, Processors, QueryPipeline folders 2022-03-14 18:17:35 +00:00
Alexander Tokmakov
7f47f20aba add kill transaction query 2022-03-10 22:29:58 +01:00
Alexander Tokmakov
061fa6a6f2 Merge branch 'master' into mvcc_prototype 2022-03-10 13:13:04 +01:00
taiyang-li
382417d893 fix bug 2022-03-10 18:29:00 +08:00
taiyang-li
2cd469f113 support print ast in dot format 2022-03-10 18:04:35 +08:00
Alexander Tokmakov
8acfb8d27f Merge branch 'master' into mvcc_prototype 2022-03-07 17:40:15 +01:00
vdimir
688493373f
Try to fix trim function 2022-03-07 11:08:11 +00:00
Vitaly Baranov
115c0c2aba
Merge pull request #34855 from vitlibar/ignore-obsolete-grants-in-attach-grants
Ignore obsolete grants in ATTACH GRANT statements
2022-03-04 12:50:09 +01:00
Maksim Kita
1f5837359e clang-tidy check performance-noexcept-move-constructor fix 2022-03-02 18:15:27 +00:00
Vitaly Baranov
b7817b4cea Ignore obsolete grants in ATTACH GRANT statements. 2022-02-24 07:30:40 +03:00
Alexander Tokmakov
aa6b9a2abc Merge branch 'master' into mvcc_prototype 2022-02-23 23:22:03 +03:00
Vitaly Baranov
aee67a6693
Merge pull request #31484 from eungenue/Implement-SSL-X509-certificate-authentication
Implement ssl x509 certificate authentication
2022-02-21 11:30:52 +03:00
Vitaly Baranov
0d377de5f0 Support syntax CREATE USER IDENTIFIED WITH ssl_certificate CN ... 2022-02-21 07:01:00 +03:00
Maksim Kita
4217b2e056 Fix system queries RELOAD MODEL, RELOAD FUNCTION, RESTART DISK on cluster 2022-02-17 19:41:41 +00:00
zvonand
90c857c5e3 merge 2022-02-17 18:23:37 +03:00
Alexander Tokmakov
dae044f86b Merge branch 'master' into mvcc_prototype 2022-02-17 13:49:37 +03:00
Nikolai Kochetov
f9d2dae88e
Merge pull request #34424 from yakov-olkhovskiy/ephemeral-column
Ephemeral column issue #9436
2022-02-16 12:04:57 +01:00
Raúl Marín
93d344cbaf ASTCreateQuery: Remove usused tables member 2022-02-15 12:51:17 +01:00
Nikolai Kochetov
ab288642f6 Merge branch 'master' into ephemeral-column 2022-02-15 10:03:34 +00:00
Alexander Tokmakov
1e4e569151 Merge branch 'master' into mvcc_prototype 2022-02-15 02:26:47 +03:00
Alexander Tokmakov
cbd3b45646 add EXPLAIN CURRENT TRANSACTION 2022-02-14 22:47:17 +03:00
Maksim Kita
b73d1f4b64
Merge pull request #34578 from azat/ARRAY-JOIN-fix-format
Fix indentation in ARRAY JOIN formatting
2022-02-14 16:40:55 +01:00
Azat Khuzhin
edc35f1254 Fix indentation in ARRAY JOIN formatting
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-02-14 15:58:58 +03:00
alesapin
bb69455395
Merge pull request #34504 from CurtizJ/ttl-move-if-exists
Support `TTL TO [DISK|VOLUME] [IF EXISTS]`
2022-02-14 14:56:18 +03:00
zvonand
dcc0f53f8e updated Interval definitions 2022-02-13 17:54:03 +03:00
zvonand
48c1b8b62b Updated IntervalParser 2022-02-13 13:01:48 +03:00
Alexander Tokmakov
07e66e690d Merge branch 'master' into mvcc_prototype 2022-02-11 15:53:32 +03:00
Alexander Tokmakov
9e893dfda7 fixes 2022-02-10 23:35:03 +03:00
Anton Popov
70986a70a1 support TTL TO [DISK|VOLUME] [IF EXISTS] 2022-02-10 19:26:23 +03:00
Yatsishin Ilya
33b5c2251f Merge branch 'default-table-engine' of github.com:qoega/ClickHouse into default-table-engine 2022-02-10 09:09:20 +00:00
Yatsishin Ilya
ea03fec7b6 simplify case 2022-02-10 09:00:00 +00:00
mergify[bot]
d55eadc3c9
Merge branch 'master' into default-table-engine 2022-02-09 17:08:31 +00:00
Yakov Olkhovskiy
a134ab282b style fixed and minor optimization 2022-02-09 13:51:12 +00:00
Nikolai Kochetov
38fb50f736
Merge pull request #33958 from Algunenano/mv_cacheable_scalars
Scalar cache improvements
2022-02-09 16:46:53 +03:00
Nikolai Kochetov
0f7c0c72bd
Merge pull request #34305 from amosbird/projection-fix27
Fix various issues when projection is enabled by default
2022-02-08 17:19:56 +03:00
Yatsishin Ilya
bcf4303286 Merge remote-tracking branch 'origin' into default-table-engine 2022-02-08 10:35:29 +00:00
Anton Popov
b21adb8e11
Merge pull request #34229 from evillique/parser
Add composability to casting and index operators
2022-02-08 03:17:00 +03:00
Yakov Olkhovskiy
4d5fb56c29 added EPHEMERAL default for column (preliminary) 2022-02-07 23:21:10 +00:00
mergify[bot]
dd947f964c
Merge branch 'master' into mv_cacheable_scalars 2022-02-07 10:07:26 +00:00
Yatsishin Ilya
e0803064e6 Merge remote-tracking branch 'origin' into default-table-engine 2022-02-07 08:45:32 +00:00
Amos Bird
2debfc922d
Better projection format and test fixes 2022-02-07 10:47:11 +08:00
Alexander Tokmakov
ca5f951558 Merge branch 'master' into mvcc_prototype 2022-02-03 18:56:44 +03:00
Yatsishin Ilya
cce0452d19 add more tests, fix style, fix MATERIALIZED VIEW POPULATE without ENGINE 2022-02-02 18:07:03 +00:00
alexey-milovidov
eeae89388b
Merge pull request #34230 from aaronstephenkatz/patch-1
adding # as a recognized start of single line comment
2022-02-02 03:03:01 +03:00
Sergei Trifonov
68bc456830
Merge pull request #34223 from azat/bump-fmt
Bump fmtlib from 7.0.0 to 8.1.1
2022-02-02 00:03:25 +03:00
Aaron Katz
0cac4b4a6e
adding # as a recognized start of single line comment 2022-02-01 09:40:17 -08:00
Yatsishin Ilya
759574d6f0 improve 2022-02-01 16:59:41 +00:00
Nikolay Degterinsky
56aa60ab88 Add composability to casting and index operators 2022-02-01 15:56:03 +00:00
alexey-milovidov
cafb19d7fb
Merge pull request #34114 from amosbird/replxxwithlexer
Combining our lexer with replxx for better multiple line editing
2022-02-01 16:32:25 +03:00
Yatsishin Ilya
2a698b8da3 Merge remote-tracking branch 'origin/master' into default-table-engine 2022-02-01 13:23:52 +00:00
Azat Khuzhin
bedf208cbd Use fmt::runtime() for LOG_* for non constexpr
Here is oneliner:

    $ gg 'LOG_\(DEBUG\|TRACE\|INFO\|TEST\|WARNING\|ERROR\|FATAL\)([^,]*, [a-zA-Z]' -- :*.cpp :*.h | cut -d: -f1 | sort -u | xargs -r sed -E -i 's#(LOG_[A-Z]*)\(([^,]*), ([A-Za-z][^,)]*)#\1(\2, fmt::runtime(\3)#'

Note, that I tried to do this with coccinelle (tool for semantic
patchin), but it cannot parse C++:

    $ cat fmt.cocci
    @@
    expression log;
    expression var;
    @@

    -LOG_DEBUG(log, var)
    +LOG_DEBUG(log, fmt::runtime(var))

I've also tried to use some macros/templates magic to do this implicitly
in logger_useful.h, but I failed to do so, and apparently it is not
possible for now.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

v2: manual fixes
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-02-01 14:30:03 +03:00
Alexander Tokmakov
2e4ae37d98 Merge branch 'master' into mvcc_prototype 2022-02-01 13:20:03 +03:00
Ilya Yatsishin
9c2ef98d23
Apply suggestions from code review
Co-authored-by: tavplubix <tavplubix@gmail.com>
2022-02-01 10:03:50 +03:00
Yatsishin Ilya
676fc5b20f Initial commit 2022-01-31 17:10:59 +00:00
Amos Bird
54517753d7
Combining our lexer with replxx 2022-01-30 19:48:33 +08:00
zhangxiao871
7f2f7fa993 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into yandex-master 2022-01-30 13:46:52 +08:00
zhangxiao871
dd395c5721 Better test. 2022-01-30 13:46:11 +08:00
Maksim Kita
cfd3421e4f Dictionary PRIMARY KEY parsing fix 2022-01-29 15:50:10 +00:00
Alexander Tokmakov
fb9b2d5326 Merge branch 'master' into mvcc_prototype 2022-01-28 21:18:36 +03:00
mergify[bot]
c9a1c9a896
Merge branch 'master' into system_on_cluster 2022-01-28 10:42:26 +00:00
zhangxiao871
78e2794ada Fix START MERGES and add test 2022-01-28 14:30:57 +08:00
Raúl Marín
045c92e2b9 Fix readability issues 2022-01-26 17:36:45 +01:00
Raúl Marín
4b5ab80e3b Better scalar cache handling
- Fixes global CTE scalar cache.
- Adds MVs back (views dependent on the source are cached locally and others globally
2022-01-26 17:36:45 +01:00
zhangxiao871
1bd74dda63 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into yandex-master 2022-01-26 17:40:32 +08:00
zhangxiao871
20b669f330 Supports all types of SYSTEM query ON CLUSTER clause. 2022-01-26 17:40:00 +08:00
Anton Popov
6cbcfd706f fix conversion function to literal 2022-01-24 15:28:15 +03:00
Anton Popov
3567e18f6e fix 'Not found column' exception in distributed queries with arrays and tuples 2022-01-24 10:46:30 +03:00
Alexander Tokmakov
e3b1397001 Merge branch 'master' into mvcc_prototype 2022-01-21 18:59:01 +03:00
Kruglov Pavel
6f49f0cac6
Don't write additional space in DESCRIBE TABLE query formatting 2022-01-20 21:07:34 +03:00
tavplubix
41ee114abb
Merge pull request #33819 from bigo-sg/optimize_explain_create_function
Support explain create function query
2022-01-20 19:07:43 +03:00
Alexander Tokmakov
0ea0a8ccc7 Merge branch 'master' into mvcc_prototype 2022-01-20 17:05:55 +03:00
Kruglov Pavel
f644602ec8
Merge pull request #33776 from Avogar/fix-insert-values
Fix parsing query INSERT INTO ... VALUES SETTINGS ... (...), ...
2022-01-20 14:09:27 +03:00
taiyang-li
e4f5444073 support explain create function query 2022-01-20 16:23:52 +08:00
Azat Khuzhin
6c0fa21025 Remove unbundled libprotobuf-mutator support 2022-01-20 08:47:16 +03:00
Azat Khuzhin
788cb6b2b0 Remove unbundled protobuf support 2022-01-20 08:47:16 +03:00
Alexander Tokmakov
e9a5a64a71 Merge branch 'master' into mvcc_prototype 2022-01-19 21:41:23 +03:00
avogar
c4cd8c6da4 Fix parsing query INSERT INTO ... VALUES SETTINGS ... (...), ... 2022-01-19 14:22:32 +03:00
alexey-milovidov
d222cb9771
Merge pull request #33695 from amosbird/buildimprove
Some build improvement
2022-01-19 03:19:22 +03:00
Amos Bird
6d62060e16
Build improvement 2022-01-17 22:36:27 +08:00
Eugene Galkin
f46dca4793 support x509 ssl certificate authentication 2022-01-17 15:01:38 +03:00
Azat Khuzhin
16adcc1666 Reduce memory usage for parsing collections (by using move ctor)
In case you pass array in VALUES section (ValuesBlockInputFormat), it
will be copied after it had been created.
This is not significant if array is small, however if you have huge
enough array, then this can become significant (especially for array of
bool, since for each element will be used Field anyway, and it's size is
56 byte).

Here is a simple reproducer:

    $ curl -sS 'http://127.1:8123/?input_format_values_deduce_templates_of_expressions=0' -d@- <<<"insert into function null('_ Int') values (length([0,$(yes 1, | head -n2000000 | tr -d '\n')1]))"

But note, that there is lots of work (evalute constant expressions from #6781)
after parsing collection, and so total memory usage for query does not
changed a lot (hence - no test).

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-01-15 21:13:05 +03:00
Alexander Tokmakov
4dd216ce8f Merge branch 'master' into mvcc_prototype 2022-01-14 17:11:32 +03:00
avogar
7ea75b3082 Fix parsing queries with FROM INFILE statement again 2022-01-12 12:59:40 +03:00
Kruglov Pavel
dca9753e7a
Delete unecessary line 2022-01-11 20:26:43 +03:00
Kruglov Pavel
186020d906
Update ParserInsertQuery.cpp 2022-01-11 20:24:34 +03:00
mergify[bot]
7999d90900
Merge branch 'master' into auto_format_by_file_extension 2022-01-11 17:21:14 +00:00
tavplubix
6eee1fda56
Merge pull request #33521 from Avogar/fix-from-infile-syntax
Fix parsing queries with FROM INFILE statement
2022-01-11 20:16:24 +03:00
avogar
070fd60b02 Fix parsing queries with FROM INFILE statement 2022-01-11 17:16:54 +03:00
zhongyuankai
146068c911 INTO OUTFILE / FROM INFILE: autodetect FORMAT by file extension 2022-01-11 21:52:09 +08:00
zhongyuankai
f97250aea9 Merge branch 'master' into auto_format_by_file_extension 2022-01-11 21:41:49 +08:00
Maksim Kita
3aeb1279ee IAST QueryKind style fix 2022-01-11 12:31:26 +03:00
Maksim Kita
8aa930b52f
Merge pull request #33294 from ClickHouse/query-kind-concurent_restriction
Add IAST::QueryKind enum and use it in query limiter
2022-01-11 11:23:18 +03:00
Alexander Tokmakov
bf2b6c2c37 Merge branch 'master' into mvcc_prototype 2022-01-10 19:53:50 +03:00
Stig Bakken
3fd93eb90c Print alter command names in EXPLAIN AST 2022-01-10 10:08:41 +01:00
Kseniia Sumarokova
e6ea7c361d
Merge pull request #32836 from stigsb/explain-table-override
Add `EXPLAIN TABLE OVERRIDE` for pre-validating overrides.
2022-01-10 09:58:16 +03:00
Alexey Milovidov
6df2afb5dd One step backwards 2022-01-09 10:42:06 +03:00
Alexey Milovidov
fa0a9aa989 Another try 2022-01-09 08:12:34 +03:00
Alexey Milovidov
5e0edd01f1 Prevent excessive backtracking 2022-01-09 07:42:55 +03:00
Alexey Milovidov
da967a555a Trying 2022-01-09 07:42:53 +03:00
Alexey Milovidov
341fd57e15 Somewhat better 2022-01-09 06:25:12 +03:00
Alexey Milovidov
5dc794c939 Another attempt for #20158 2022-01-09 05:45:54 +03:00
Alexey Milovidov
5ba42d690c Avoid exponential backtracking in parser, part 2 2022-01-09 04:28:24 +03:00
zhongyuankai
878e44eb97 auto format by file extension 2022-01-08 21:47:14 +08:00
Alexey Milovidov
1813e7ad35 Fix clang-tidy 2022-01-08 04:57:13 +03:00