Commit Graph

13428 Commits

Author SHA1 Message Date
Maksim Kita
7ee64e55ed Recursive CTE distributed fix 2024-05-16 12:07:01 +03:00
Raúl Marín
ad5403a034
Merge pull request #63429 from Algunenano/micro_analyzer
Micro-optimizations for the new analyzer
2024-05-16 09:01:56 +00:00
Zimu Li
c0f5d70c5c
Merge branch 'ClickHouse:master' into master 2024-05-15 22:38:22 -07:00
Anton Popov
f9c1c719b9 fix explain current transaction 2024-05-16 00:04:28 +00:00
Alexander Tokmakov
c13a0cae81 fix another bug 2024-05-15 20:33:41 +02:00
Raúl Marín
d8a2328e9e Merge remote-tracking branch 'blessed/master' into async_insert_query_log_populate 2024-05-15 20:17:09 +02:00
Alexander Tokmakov
b17bfb16cd
Merge pull request #63695 from ClickHouse/flaten-nested-is-broken-with-replicated-database
flatten_nested is broken with replicated database.
2024-05-15 16:34:03 +00:00
vdimir
bcd1c4fd28
Merge pull request #63755 from ClickHouse/vdimir/pmj_join_non_procssed_clash
Fix ILLEGAL_COLUMN in partial_merge join
2024-05-15 12:46:30 +00:00
Kruglov Pavel
413be14c43
Merge branch 'master' into dynamic-data-type 2024-05-15 13:43:04 +02:00
Sema Checherinda
c860e19380 clickhouse disks reads server configs 2024-05-15 13:41:34 +02:00
kssenii
5ede316ec5 Merge remote-tracking branch 'origin/master' into use-iobject-storage-for-table-engines-1 2024-05-15 12:52:25 +02:00
Alexander Tokmakov
9eaf9004b7 Merge branch 'master' into rdb_auto_recovery 2024-05-14 20:35:00 +02:00
Alexander Tokmakov
bc98cc212c fix 2024-05-14 20:30:49 +02:00
Zimu Li
2da80eb250
Merge branch 'ClickHouse:master' into master 2024-05-14 11:04:23 -07:00
vdimir
53383396a3
Merge pull request #63432 from p1rattttt/external_cross_join
Added possibility to do cross join in temporary file if size exceeds limits
2024-05-14 17:15:47 +00:00
vdimir
b872162dea
Fix ILLEGAL_COLUMN in partial_merge join 2024-05-14 11:08:41 +00:00
Zimu Li
c6eea55430
Merge branch 'ClickHouse:master' into master 2024-05-13 20:02:49 -07:00
Raúl Marín
61fb090850 Merge remote-tracking branch 'blessed/master' into micro_analyzer 2024-05-13 20:46:48 +02:00
Maxim Alexeev
9c2e1bfce6 fixed review 2024-05-13 19:39:45 +03:00
p1rattttt
0bd39b86d5
Merge branch 'ClickHouse:master' into external_cross_join 2024-05-13 19:06:59 +03:00
Alexander Tokmakov
8bb24e6a36
Update InterpreterCreateQuery.cpp 2024-05-13 17:00:14 +02:00
Alexander Tokmakov
7ffd71d77b
Update InterpreterCreateQuery.cpp 2024-05-13 16:17:18 +02:00
kssenii
9ce465bb88 Merge remote-tracking branch 'origin/master' into use-iobject-storage-for-table-engines-1 2024-05-13 16:14:58 +02:00
Dmitry Novik
5e1a3b5601
Update src/Interpreters/InterpreterSelectQueryAnalyzer.cpp 2024-05-13 14:48:33 +02:00
Maksim Kita
b8c719f866 Analyzer view read only necessary columns 2024-05-13 13:41:47 +03:00
Azat Khuzhin
4ad88d04b4 Move initGlobalProfiler() into ThreadStatusExt.cpp and fix examples
To avoid undefined references in examples:

    May 11 01:58:40 ld.lld-17: error: undefined symbol: DB::Context::hasTraceCollector() const
    May 11 01:58:40 >>> referenced by ThreadStatus.cpp:132 (/build/src/Common/ThreadStatus.cpp:132)
    May 11 01:58:40 >>>               ThreadStatus.cpp.o:(DB::ThreadStatus::initGlobalProfiler(unsigned long, unsigned long)) in archive src/libclickhouse_common_iod.a
    May 11 01:58:40 clang++-17: error: linker command failed with exit code 1 (use -v to see invocation)

Move it firstly into ThreadStatusExt and then do not try to use it from
the ThreadPool.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-05-13 11:05:36 +02:00
Alexey Milovidov
f27a0d6801
Merge pull request #60469 from ClickHouse/clang-18-ci
Use clang-18 in CI
2024-05-13 09:35:45 +02:00
Alexey Milovidov
2d138d3d7e
Merge pull request #63674 from nickitat/remove_monotonous_func_optimisation_leftovers
Remove leftovers of `optimize_monotonous_functions_in_order_by`
2024-05-12 22:29:52 +00:00
Nikita Taranov
68d9e55302 impl 2024-05-12 20:38:43 +01:00
Alexey Milovidov
eff0d7cb8b Merge branch 'master' of github.com:ClickHouse/ClickHouse into clang-18-ci 2024-05-11 14:15:38 +02:00
p1rattttt
85fb1f95d1
Merge branch 'ClickHouse:master' into external_cross_join 2024-05-11 13:54:38 +03:00
Maxim Alexeev
51818742cb Deleted trash log 2024-05-11 13:41:07 +03:00
woodlzm
06f0780a3f Add a build_id ALIAS column to trace_log to facilitate auto renaming upon detecting binary changes. 2024-05-10 23:27:42 -07:00
Michael Kolupaev
02fa09dd4c Preserve the non-analyzer behavior to fix a test 2024-05-10 22:37:35 +00:00
p1rattttt
ed43788062
Merge branch 'ClickHouse:master' into external_cross_join 2024-05-11 00:52:18 +03:00
Maxim Alexeev
a43faf7399 added check that tmp_data != nullptr 2024-05-10 16:19:53 +03:00
Kruglov Pavel
6207f6f4a5
Merge branch 'master' into dynamic-data-type 2024-05-10 13:42:38 +02:00
avogar
e7c7eb159a Apply suggestions from the code review 2024-05-10 11:32:27 +00:00
Alexey Milovidov
dd58af7d4f Merge branch 'master' of github.com:ClickHouse/ClickHouse into clang-18-ci 2024-05-10 07:17:39 +02:00
Alexey Milovidov
426a51b624 Useless changes 2024-05-10 04:53:29 +02:00
Alexey Milovidov
42710158e4 Merge branch 'master' into clang-18-ci 2024-05-10 02:38:20 +02:00
Michael Kolupaev
1b43c58489
Merge pull request #62087 from ClickHouse/checkmate
Avoid crashing on column type mismatch in a few dozen places
2024-05-09 23:59:59 +00:00
Maxim Alexeev
ad5cbc6808 fixed code and added test 2024-05-10 01:25:08 +03:00
Maxim Alexeev
7376fac30c Fixed bug 2024-05-10 00:50:27 +03:00
tomershafir
b97bf456c6 try fix build 2024-05-09 20:53:36 +03:00
p1rattttt
0a7a69a00d
Merge branch 'ClickHouse:master' into external_cross_join 2024-05-09 18:51:44 +03:00
Raúl Marín
0e2b2ab53a Reduce join logging again 2024-05-09 12:53:34 +02:00
Eduard Karacharov
a365c36e9d use qualified dictionary name in query log 2024-05-09 11:28:27 +03:00
Alexey Milovidov
224e1940ae Useless changes 2024-05-09 03:58:34 +02:00
Alexey Milovidov
0d14a2c67e Useless changes 2024-05-09 03:11:02 +02:00
Alexey Milovidov
1d69518c4d Useless changes 2024-05-09 02:07:04 +02:00
Alexey Milovidov
95f12ef274 Useless changes 2024-05-09 01:08:33 +02:00
Alexander Tokmakov
db8079768a automatically recover Replicated database if the queue got stuck 2024-05-09 00:00:51 +02:00
Alexey Milovidov
8c4a5d3663
Merge pull request #61823 from ClickHouse/total-rows-in-system-zeros-generate-random
Set total_rows_approx for trivial queries with LIMIT from system.zeros and generateRandom
2024-05-08 21:32:35 +00:00
p1rattttt
0fb8fea19b
Merge branch 'ClickHouse:master' into external_cross_join 2024-05-09 00:08:01 +03:00
Eduard Karacharov
eedef6d826 fix empty used_dictionaries in query_log 2024-05-08 22:26:03 +03:00
Maxim Alexeev
e146262ccf Deleted setting max_bytes_in_join by default_max_bytes 2024-05-08 19:57:46 +03:00
Nikita Mikhaylov
afdb773d17
Merge pull request #62896 from lyrixx/dx-join-get
dx: Enhance error message when non-deterministic function is used with Replicated source
2024-05-08 14:05:05 +00:00
豪肥肥
a3e1208873
Merge branch 'ClickHouse:master' into part_log_typo 2024-05-08 06:44:41 +08:00
Maxim Alexeev
4018a2b4a3 fixed comments 2024-05-07 23:43:40 +03:00
Raúl Marín
c99f15a843 Insert QueryFinish on AsyncInsertFlush with no data 2024-05-07 17:41:49 +02:00
Alexey Milovidov
da365ef84d
Merge pull request #63439 from ClickHouse/fix-slow-suggest
Fix slow suggest in case of a large number of columns
2024-05-07 14:09:52 +00:00
tomershafir
ed63ad5e61 iouring: refactor get from context 2024-05-07 14:10:49 +03:00
kssenii
cd093ca793 Merge remote-tracking branch 'origin/master' into use-iobject-storage-for-table-engines-1 2024-05-07 12:50:48 +02:00
Raúl Marín
85096f037e updateHeader: Needs to keep track of all the matches 2024-05-07 12:42:55 +02:00
Alexey Milovidov
605faebb17
Merge pull request #63357 from ClickHouse/fudge
Fix AST parsing of invalid type names
2024-05-07 09:50:29 +02:00
Alexander Gololobov
0162395dd5
Merge pull request #63377 from zvonand/fix-x-clickhouse-timezone
Fix `X-ClickHouse-Timezone` header with `session_timezone`
2024-05-07 06:10:28 +00:00
Alexey Milovidov
46a8cf9881 Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-slow-suggest 2024-05-07 07:39:58 +02:00
Alexey Milovidov
a20c626cc2
Merge pull request #63401 from ClickHouse/remove-copy-when-writing-to-cache
Remove copy from writing to fs cache
2024-05-07 01:38:54 +00:00
Alexey Milovidov
a38ea6c8cd Thread names 2024-05-07 02:54:25 +02:00
Alexey Milovidov
c53c8eb6d1 Fix slow suggest 2024-05-07 01:36:20 +02:00
Michael Kolupaev
d14fc62d4d Avoid crashing on column type mismatch in a few dozen places 2024-05-06 22:09:02 +00:00
Michael Kolupaev
313843331b Fix AST parsing of invalid type names 2024-05-06 21:52:46 +00:00
Maxim Alexeev
d531e2006d Deleted check of read type and added comment 2024-05-07 00:10:24 +03:00
Maxim Alexeev
d4a0325350 added check that tmp_data is not nullptr 2024-05-06 23:30:27 +03:00
Maxim Alexeev
3dd04e4e58 removed garbage 2024-05-06 23:27:28 +03:00
Maxim Alexeev
1660a4fe86 first working version 2024-05-06 23:22:41 +03:00
Maxim Alexeev
1b7b4fc858 removed unnecessary setting 2024-05-06 22:08:13 +03:00
Raúl Marín
ef81f3313f Optimize ActionsDAG::updateHeader 2024-05-06 20:58:04 +02:00
Robert Schulze
0f87653fef
Rename "inverted" to "fulltext" 2024-05-06 16:59:36 +00:00
Andrey Zvonov
c3abf7f462 propagate session_timezone to result_details when query fails 2024-05-06 14:55:34 +00:00
Andrey Zvonov
942bd6af61
Explain updating result_details.timezone 2024-05-06 16:15:32 +02:00
kssenii
a51786532b Remove copy 2024-05-06 13:21:11 +02:00
Nikita Taranov
a5ec7e84c7
Merge pull request #62904 from liuneng1994/feature/adaptive_merged_block_size
Reduce external sorting memory usage on large table and speed up sorting
2024-05-06 11:20:47 +00:00
vdimir
4b1af861d8
Merge pull request #63346 from ClickHouse/vdimir/fix_write_buffer_file_segment_dtor
Fix finalize WriteBufferToFileSegment and StatusFile
2024-05-06 10:57:19 +00:00
Igor Nikonov
e986619ce3
Merge pull request #61935 from ClickHouse/pr-receive-timeout-on-handshake
Parallel replicas: table check failover
2024-05-06 10:30:59 +00:00
liuneng1994
1cfda11521 Merge branch 'refs/heads/master' into feature/adaptive_merged_block_size
# Conflicts:
#	src/Core/SettingsChangesHistory.h
2024-05-06 10:48:56 +08:00
Maxim Alexeev
ec15298b82 First working prototype 2024-05-06 01:34:03 +03:00
Alexey Milovidov
1bcf035bbd Zero means unlimited; apply the thresholds by logical or; better documentation 2024-05-05 04:59:12 +02:00
Alexey Milovidov
7aa1b1fb3f Merge branch 'master' into cross_join_compression 2024-05-05 04:52:19 +02:00
Andrey Zvonov
010d158d87 set result timezone after query execution 2024-05-04 21:48:04 +00:00
Maxim Alexeev
d8972cae0f changed settings 2024-05-04 11:41:27 +03:00
vdimir
1424e8a6de
Fix finalize WriteBufferToFileSegment and StatusFile to avoid exceptions in destructor 2024-05-03 14:19:39 +00:00
kssenii
e9d9f2bc25 Merge remote-tracking branch 'origin/master' into use-iobject-storage-for-table-engines-1 2024-05-03 13:55:12 +02:00
Duc Canh Le
5d2feb41e7
Revert "Revert "Introduce bulk loading to StorageEmbeddedRocksDB"" 2024-05-03 18:29:36 +08:00
Alexey Milovidov
c9fd1df4fc
Revert "Introduce bulk loading to StorageEmbeddedRocksDB" 2024-05-03 05:27:03 +03:00
Alexey Milovidov
a17618851e Merge branch 'master' into total-rows-in-system-zeros-generate-random 2024-05-03 03:40:53 +02:00
Alexey Milovidov
aea3090074 Less directories 2024-05-03 03:24:03 +02:00
Alexey Milovidov
ecf524175a Less directories 2024-05-03 03:20:11 +02:00
Alexey Milovidov
ed1bbd0bd0 Merge branch 'master' into local-less-directories 2024-05-03 02:35:44 +02:00
Igor Nikonov
376c54c7f9 Merge remote-tracking branch 'origin/master' into pr-receive-timeout-on-handshake 2024-05-02 19:15:14 +00:00
p1rattttt
20194542dc
Merge branch 'ClickHouse:master' into cross_join_compression 2024-05-02 22:01:32 +03:00
Robert Schulze
66810e17c4
Merge remote-tracking branch 'ClickHouse/master' into optimize_drop_tables 2024-05-02 16:01:38 +00:00
Kseniia Sumarokova
33a0e8035f
Merge pull request #61250 from ClickHouse/less-contentaion-in-cache-part4
Less contention in cache, part 4
2024-05-02 15:18:16 +00:00
vdimir
a838fb778b
Merge pull request #59163 from canhld94/rocksdb_bypass_memtable
Introduce bulk loading to StorageEmbeddedRocksDB
2024-05-02 14:49:03 +00:00
kssenii
3f9ca1cbfe Merge remote-tracking branch 'origin/master' into less-contentaion-in-cache-part4 2024-05-02 13:04:05 +02:00
vdimir
7617155901
Merge branch 'master' into vdimir/ineq_join_v2 2024-05-01 11:53:43 +00:00
Duc Canh Le
6a324ae67a Merge branch 'master' into rocksdb_bypass_memtable
Try fix CI
2024-05-01 11:21:31 +00:00
kssenii
deb4706056 Review fixes 2024-05-01 11:19:51 +02:00
Robert Schulze
0a01a92bf8
Merge pull request #62884 from rschu1ze/inverted-to-fulltext
Rename "inverted index" to "full-text index"
2024-04-30 20:03:35 +00:00
Robert Schulze
f29574d043
Merge remote-tracking branch 'ClickHouse/master' into optimize_drop_tables 2024-04-30 19:25:22 +00:00
avogar
df92f42237 Fix tests, improve dynamic/variantElement functions, add more comments 2024-04-30 18:45:19 +00:00
Konstantin Bogdanov
273464c963
Merge pull request #63046 from ClickHouse/support-user-expiration
Check user expiration date before query execution
2024-04-30 17:42:58 +00:00
pufit
677a76c8d8
Merge branch 'master' into pufit/fix-dump-ast-with-sql-security 2024-04-30 10:05:22 -04:00
Konstantin Bogdanov
185e715fc1
Update src/Interpreters/Session.h
Co-authored-by: Nikolay Degterinsky <43110995+evillique@users.noreply.github.com>
2024-04-30 14:54:34 +02:00
Konstantin Bogdanov
36014f739a
Rename 2024-04-30 14:52:43 +02:00
Raúl Marín
415a7be8db
Merge pull request #63119 from Algunenano/sanity_check_clamp
Make sanity check of settings worse
2024-04-30 12:20:38 +00:00
Raúl Marín
89fe970cd2
Merge pull request #62929 from Algunenano/optimize_rewrite_sum_if_to_count_if
Enable optimize_rewrite_sum_if_to_count_if by default
2024-04-30 12:07:24 +00:00
vdimir
23525ea3d5
Merge branch 'master' into ineq_join_v2 2024-04-30 08:15:51 +00:00
Alexey Milovidov
817570c5e4
Merge branch 'master' into local-less-directories 2024-04-30 04:45:33 +02:00
pufit
2c0e880909 Format SQL security option only in CREATE VIEW queries. 2024-04-29 20:50:48 -04:00
Alexey Milovidov
ba45bd2534
Merge pull request #63125 from kitaisreal/recursive-cte-data-race-fix
Recursive CTE data race fix
2024-04-30 01:26:29 +02:00
Alexander Tokmakov
37950a5f4e
Merge pull request #62738 from pamarcos/pamarcos/system-unload-primary-key
Add SYSTEM UNLOAD PRIMARY KEY
2024-04-29 21:18:01 +00:00
Raúl Marín
987558e18d Improvements based on review 2024-04-29 20:46:37 +02:00
Raúl Marín
ff1c0023e8 Use TSA and mutex instead of object copy 2024-04-29 20:05:57 +02:00
Maksim Kita
d237133ec0 Recursive CTE data race fix 2024-04-29 18:29:18 +03:00
Igor Nikonov
20884efdcc Merge remote-tracking branch 'origin/master' into pr-receive-timeout-on-handshake 2024-04-29 13:36:13 +00:00
Raúl Marín
97c781e365 Sanity check: Clamp values instead of throwing 2024-04-29 14:34:47 +02:00
Raúl Marín
8df67eb7ed
Merge branch 'master' into optimize_rewrite_sum_if_to_count_if 2024-04-29 11:51:09 +02:00
alesapin
4701429db4
Merge pull request #62773 from hileef/fix/update/nested-columns-size-check
fix: update: nested materialized columns: size check fixes
2024-04-29 09:27:39 +00:00
Azat Khuzhin
3e68103ac8 Fix interserver secret for Distributed over Distributed from remote()
Right if you are executing remote() and later the query will
go to the cluster with interserver secret, then you should have the same
user on the nodes from that cluster, otherwise the query will fail with:

    DB::NetException: Connection reset by peer

And on the remote node:

    <Debug> TCPHandler: User (initial, interserver mode): new_user (client: 172.16.1.5:40536)
    <Debug> TCP_INTERSERVER-Session: d29ecf7d-2c1c-44d2-8cc9-4ab08175bf05 Authentication failed with error: new_user: Authentication failed: password is incorrect, or there is no user with such name.
    <Error> ServerErrorHandler: Code: 516. DB::Exception: new_user: Authentication failed: password is incorrect, or there is no user with such name. (AUTHENTICATION_FAILED), Stack trace (when copying this message, always include the lines below):

The problem is that remote() will not use passed to it user in
any form, and instead, the initial user will be used, i.e. "cli_user"
not "query_user":

    chc --user cli_user -q "select * from remote(node, default, some_dist_table, 'query_user')"

Fix this by using the user from query for the remote().

Note, that the Distributed over Distributed in case of tables still wont
work, for this you have to have the same users on all nodes in all
clusters that are involved in case of interserver secret is enabled (see
also test).

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

v2: move client initial_user adjustment into ClusterProxy/executeQuery.cpp
v3: we cannot check for interserver_mode in
    updateSettingsAndClientInfoForCluster() since it is not yet
    interserver in remote() context
2024-04-29 07:12:17 +02:00
Alexey Milovidov
c570316c87
Merge branch 'master' into analyzer-support-recursive-cte 2024-04-29 02:26:59 +02:00
p1rattttt
cde04df8af
Merge branch 'ClickHouse:master' into cross_join_compression 2024-04-28 23:10:43 +03:00
kssenii
3e4d9bf73a Better result condition 2024-04-28 14:08:20 +02:00
kssenii
8c4476d7db Merge remote-tracking branch 'origin/master' into less-contentaion-in-cache-part4 2024-04-28 13:36:16 +02:00
kssenii
7a416f2e76 Merge remote-tracking branch 'origin/master' into use-iobject-storage-for-table-engines-1 2024-04-28 12:19:32 +02:00
Maksim Kita
bd1189de70 Fixed tests 2024-04-28 12:52:17 +03:00
Maksim Kita
06d2c18f26 Analyzer support recursive CTEs 2024-04-28 12:52:17 +03:00
Maksim Kita
b080adb586 Fixed build 2024-04-28 12:52:05 +03:00
Maksim Kita
8ed6f4c27a Fixed code review issues 2024-04-28 12:52:05 +03:00
Maksim Kita
bc6db79737 QueryPlan convert OUTER JOIN to INNER JOIN optimization 2024-04-28 12:52:04 +03:00
LiuNeng
4f9dba8535
Merge branch 'master' into feature/adaptive_merged_block_size 2024-04-28 12:54:43 +08:00
lgbo-ustc
0070d6fc71 fixed: converting filter column type 2024-04-28 09:27:16 +08:00
lgbo-ustc
352d7a443b fixed: filter column is a const column 2024-04-28 09:27:16 +08:00
lgbo-ustc
5431e272c9 update 2024-04-28 09:27:16 +08:00
lgbo-ustc
6fa6c0261b apply 27a2b19 2024-04-28 09:27:16 +08:00
lgbo-ustc
7ee720ffb0 update settting 2024-04-28 09:27:15 +08:00
lgbo-ustc
c51e9163a5 reduce hash join code size
add check

debug

fixed

fixed

fixed

fixed

fixed

debug

debug

update

rename full_expression

rollback ExecutionContext

experiment: support join_use_nulls
2024-04-28 09:26:11 +08:00
lgbo-ustc
cd9c87811f fixed bugs for all right join
add test cases

fixed typos

add document

fixed stype error and rename some variables

fixed test error

add test cases

try to recude hash join code size

debug

fixed

fixed coredump

fixed. condition result type is not bool

enable when allow_experimental_analyzer=0

fixed tests

fixed

update tests

update tests

roll backup when use the old analyzer

fixed typos

fixed

test

large obj check

test

test
2024-04-28 09:26:11 +08:00
lgbo-ustc
f7dd4deca0 Optimization for cutting left blocks into processed and not_processed parts. 2024-04-28 09:26:11 +08:00