Commit Graph

19972 Commits

Author SHA1 Message Date
SuperDJY
dd2972b8c3
return fake create query when executing show create table on system's tables. (#31391)
* clarify that cannot show create table of system's tables

* clarify that cannot show create table of system's tables in the document

* bypass test style-check for required `database=currentDatabase()` because `show create table` do not have condition

* rename supportsShowCreateTable to isSystemStorage

* build fake create query for show create table of system's tables

* fix tests for show create table on system's table:

1. only build fake create query when cannot get real query
2. only test rocksdb when it's enabled.

* fix test for show create table system.tables

* fix test for ASTCreateQuery set table and database

* change to LOGICAL_ERROR when cannot get in_memory metadata

Co-authored-by: tavplubix <tavplubix@gmail.com>

* implement common getCreateQueryFromStorage

Co-authored-by: tavplubix <tavplubix@gmail.com>
2021-11-19 13:25:55 +03:00
vdimir
2e0d3efba0
disable partial_merge_join_left_table_buffer_bytes due to bug 2021-11-19 12:59:23 +03:00
vdimir
f3d0e6d999
remove partial_merge_join_optimizations
this option is redundant because optimization is controlled by partial_merge_join_left_table_buffer_bytes
2021-11-19 12:58:46 +03:00
Amos Bird
c47ec31617
fix 2021-11-19 11:51:05 +08:00
Vitaly Baranov
af56b20da7 Rename IAccessEntity::Type -> AccessEntityType and move it to Access/Common. 2021-11-19 02:48:00 +03:00
Vitaly Baranov
06077a2952 Rename Quota::KeyType -> QuotaKeyType and move it to Access/Common. 2021-11-19 00:14:23 +03:00
Vitaly Baranov
6634fcbac7 Rename Quota::ResourceType -> QuotaType and move it to Access/Common. 2021-11-19 00:14:23 +03:00
Vitaly Baranov
33ea7a7262 Rename RowPolicy::ConditionType -> RowPolicyFilterType and move it to Access/Common. 2021-11-19 00:14:23 +03:00
Vitaly Baranov
2883ca012e Rename RowPolicy::NameParts -> RowPolicyName and move it to Access/Common. 2021-11-19 00:14:23 +03:00
alexey-milovidov
12a471507e
Merge pull request #31169 from sundy-li/notlike-fix
ISSUES-30801: Remove not like function into RPNElement
2021-11-18 23:40:57 +03:00
alexey-milovidov
b30f9124c0
Merge pull request #31008 from kssenii/sql-json-fix-2
Improve usability of JSON_VALUE
2021-11-18 23:39:17 +03:00
Vitaly Baranov
f4b5d5a0d7
Update src/Access/EnabledQuota.cpp 2021-11-18 21:49:36 +03:00
Amos Bird
d1a14d76f1
fix 2021-11-19 02:29:35 +08:00
Stig Bakken
f8c53e839a fix clang13 warning 2021-11-18 16:53:41 +01:00
Amos Bird
c988a4e770
fix again 2021-11-18 23:09:17 +08:00
Anton Popov
69559a4fd9 fix convertion to CNF 2021-11-18 17:54:07 +03:00
Stig Bakken
b91f21d658 Don't use setInternalQuery() when forwarding drop calls to database 2021-11-18 11:46:51 +01:00
Stig Bakken
9190a883d3 Print CREATE, not ATTACH 2021-11-18 11:46:51 +01:00
Stig Bakken
eb5115adb8 Fail when loading MaterializeMySQL database without uuid
and print instructions on how to remove and recreate.
2021-11-18 11:46:51 +01:00
Stig Bakken
18ce50fd7f Add hasReplicationThread() and stopReplication() methods to IDatabase 2021-11-18 11:46:51 +01:00
Stig Bakken
ff46e8bb51 Drop support for DatabaseOrdinary in MaterializedMySQL
1. Dropped support for DatabaseOrdinary for MaterializeMySQL. It
   is marked as experimental, and dropping support makes the code
   more maintaible, and speeds up integration tests by 50%.

2. Get rid of thread name logic for StorageMaterializeMySQL wrapping,
   use setInternalQuery instead (similar to MaterializedPostgreSQL).
2021-11-18 11:46:51 +01:00
kssenii
11ab1f1ae5 Fix 2021-11-18 08:46:31 +00:00
kssenii
4016530b99 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into sql-json-fix-2 2021-11-18 08:33:50 +00:00
Vladimir Chebotarev
8b622bd4ff Fixed a typo. 2021-11-18 10:54:59 +03:00
Vladimir C
0a3a43c017
Merge pull request #30984 from qieqieplus/untuple-func-alias 2021-11-18 10:42:20 +03:00
Kruglov Pavel
f27fcf8372
Merge pull request #31004 from Avogar/output-formats
Small refactoring in formats
2021-11-17 20:44:46 +03:00
Anton Popov
dfb9bc2a01 minor fixes in constraints 2021-11-17 18:43:02 +03:00
Amos Bird
feb3a12d34
fix 2021-11-17 23:11:23 +08:00
Amos Bird
4cfb105d5a
better 2021-11-17 22:07:56 +08:00
Amos Bird
7b9a19f066
enhance minmax_count projection 2021-11-17 22:05:57 +08:00
alexey-milovidov
e5fba49947
Merge pull request #31450 from ClickHouse/tavplubix-patch-6
Change default http timeout from 1800 to 180
2021-11-17 10:33:42 +03:00
alexey-milovidov
2a5c70c5f9
Merge pull request #31400 from ClickHouse/remove-thread-local-std-string
Remove thread_local std::string
2021-11-17 10:29:34 +03:00
alexey-milovidov
1e058fb207
Merge pull request #30190 from azat/ReadBuffer-throw-on-empty
Do not allow zero-length reads
2021-11-17 10:21:08 +03:00
mergify[bot]
41fa94f482
Merge branch 'master' into notlike-fix 2021-11-17 07:14:21 +00:00
Kseniia Sumarokova
d1374481df
Merge pull request #31457 from azat/local-pager
Add --pager support for clickhouse-local
2021-11-17 09:29:56 +03:00
Azat Khuzhin
bbbbd261b8 Add --pager support for clickhouse-local 2021-11-16 22:25:32 +03:00
avogar
1ebcbf4748 Fix style 2021-11-16 17:10:30 +03:00
Kruglov Pavel
be7a358f17 Fix 2021-11-16 17:10:30 +03:00
Kruglov Pavel
4f5e731513 Try fix tests 2021-11-16 17:10:30 +03:00
avogar
8e9783388b Add formats CustomSeparatedWithNames/WithNamesAndTypes 2021-11-16 17:10:30 +03:00
avogar
73d1918410 tmp 2021-11-16 17:10:30 +03:00
Nikolay Degterinsky
d365d6c496 Fix merge 2021-11-16 14:04:33 +00:00
tavplubix
9ed97eec96
Update Defines.h 2021-11-16 15:42:37 +03:00
Nikolay Degterinsky
dd3b0e4140 Merge branch 'master' into query_parameters 2021-11-16 12:42:26 +00:00
tavplubix
33122597fe
Merge pull request #31410 from stigsb/materialized-mysql-create-table-like
Handle CREATE TABLE LIKE in MaterializedMySQL
2021-11-16 14:10:58 +03:00
Nikolay Degterinsky
2f6a565b06 Merge branch 'master' into query_parameters 2021-11-16 10:37:58 +00:00
Nikolai Kochetov
38935d91ac
Merge pull request #31317 from azat/fix-tsan-in-async_socket_for_remote
Fix possible data-race in case of query cancellation with async_socket_for_remote
2021-11-16 13:03:05 +03:00
Nikolai Kochetov
15cd3dc307
Merge pull request #31006 from vzakaznikov/fix_live_view_underusing_cpu
Fixing query performance issue in Live Views
2021-11-16 12:43:33 +03:00
Vladimir Chebotarev
1e79177ce2 Build fix. 2021-11-16 12:31:51 +03:00
Nikolay Degterinsky
64927938c6 Minor refactor 2021-11-16 08:58:28 +00:00
Kruglov Pavel
1bbe0df945
Fix perf test 2021-11-16 11:41:50 +03:00
tavplubix
710fbebafc
Merge pull request #30977 from ClickHouse/check_dependencies_on_drop
Check dependencies on DROP TABLE
2021-11-16 11:38:42 +03:00
Nikolay Degterinsky
ba50e8387d Merge branch 'master' into query_parameters 2021-11-15 19:55:54 +00:00
Nikolay Degterinsky
5d07387987 Fix INFILE tests 2021-11-15 19:55:27 +00:00
Nikolay Degterinsky
5c5897c1cd Apply suggestions from code review
Co-authored-by: Kseniia Sumarokova <54203879+kssenii@users.noreply.github.com>
2021-11-15 17:57:26 +00:00
Kseniia Sumarokova
b040890fcf
Merge pull request #31420 from kssenii/fix-positional-args-bug
Fix group by with positional args
2021-11-15 20:42:58 +03:00
Ilya Yatsishin
e5301ab712
Merge pull request #31286 from cfcz48/add_oss_support
Aliyun OSS Storage support
2021-11-15 17:00:27 +03:00
Stig Bakken
3eac620d4d Handle CREATE TABLE LIKE in MaterializedMySQL 2021-11-15 14:43:50 +01:00
tavplubix
c3219a00aa
Merge pull request #31333 from azat/global-ctx-tmp-tables
Do not try to resolve temporary tables from global context
2021-11-15 16:35:02 +03:00
Vitaliy Zakaznikov
63c70f6281 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into fix_live_view_underusing_cpu 2021-11-15 07:50:27 -05:00
kssenii
6fe803e31e Fix 2021-11-15 15:09:04 +03:00
avogar
8f7be52ac4 Update test, remove commented code 2021-11-15 14:58:18 +03:00
Amos Bird
30b06a969b
Cancel vertical merges (#31057)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-11-15 14:32:53 +03:00
Alexander Tokmakov
416a82b99a Merge branch 'master' into check_dependencies_on_drop 2021-11-15 13:35:45 +03:00
alesapin
af820f85d3
Merge pull request #31259 from azat/temporary_directories_lifetime-message-fix
Print warning during old directories cleanup in MergeTree only if it is old
2021-11-15 12:56:31 +03:00
avogar
8c87f8861c Fix style 2021-11-15 12:48:28 +03:00
avogar
ba06953ee7 Fix tests 2021-11-15 12:47:00 +03:00
alesapin
a4c711ba8b
Merge pull request #31406 from ClickHouse/tavplubix-patch-5
Remove excessive debug info from the log message in DDLWorker
2021-11-15 12:38:03 +03:00
Vladimir Chebotarev
5e9710a26e Attempt to resolve nullptr in STS credentials provider for S3. 2021-11-15 10:46:43 +03:00
Azat Khuzhin
fe36884110 Convert assert(!isGlobalContext()) to LOGICAL_ERROR 2021-11-15 10:32:19 +03:00
Azat Khuzhin
68068ff71d Remove check for clickhouse-local
From #26231 clickhouse-local uses local context for query execution.
2021-11-15 10:32:19 +03:00
Azat Khuzhin
fa317e96e8 Do not try to resolve temporary tables from global context 2021-11-15 10:32:19 +03:00
alesapin
2a9ed85f23
Merge pull request #31300 from ClickHouse/fix_intersecting_parts_to_do3
Remove strange code from mutations
2021-11-15 10:08:32 +03:00
qieqieplus
b6aa781c9b add dot separator 2021-11-15 14:47:34 +08:00
tavplubix
b5b20f84bc
Update DDLWorker.cpp 2021-11-14 17:41:55 +03:00
Kseniia Sumarokova
846fbd059b
Merge pull request #31403 from kssenii/fix-client-output
Fix client
2021-11-14 15:01:30 +03:00
kssenii
ad1b7c83cd Fix 2021-11-14 07:19:59 +00:00
Alexey Milovidov
052a7a92e8 Whitespace 2021-11-14 10:05:20 +03:00
Alexey Milovidov
fe3ee85d80 Fix MaterializedMySQL 2021-11-14 10:04:45 +03:00
alexey-milovidov
cb6342025d
Merge pull request #31229 from zhanglistar/fsync
Change all fsync to fdatasync
2021-11-14 05:16:01 +03:00
Alexey Milovidov
bd684f02f2 Fix clang-tidy 2021-11-14 04:57:59 +03:00
Alexey Milovidov
1e4e36ff2d Remove thread_local std::string 2021-11-14 02:43:17 +03:00
alexey-milovidov
e323b83f6a
Merge pull request #30876 from pmed/backslash_letter_interactive_input
add aliases for `\<letter>` interactive client commands
2021-11-14 01:43:13 +03:00
Azat Khuzhin
f2c74a81f7 Fix QueryScope in MaterializedMySQLSyncThread
QueryScope should exist for the whole query execution time.
2021-11-13 20:06:08 +03:00
Kseniia Sumarokova
59d4eb99c2
Merge pull request #31291 from kssenii/update-async-reads-setting
Make remote_filesystem_read_method=threadpool by default
2021-11-13 19:19:35 +03:00
Azat Khuzhin
11be942bb0 Fix possible data-race in case of query cancellation with async_socket_for_remote
RemoteQueryExecutor::cancel() (that is called in another thread), steal
the fiber, and process any pending packets, to leave the connection in
the correct state (so that it can be reused for further queries).

However this requires processing pending packets, and this will update
the RemoteQueryExecutorReadContext::packet field, which can be read in
another thread by the RemoteQueryExecutor::read().

This was pretty tricky due to fibers, but AFAICS I understand this
correctly and this should fix the race.

Note, that if you will look at the logs from the #28854, you will see,
that all those data races was triggered after query cancellation.

Fixes: #28854
Refs: #18715

v2: fix daedlock in case of duplicated parts
v3: do not hold the mutex, since was_cancelled is atomic
2021-11-13 12:44:02 +03:00
Kseniia Sumarokova
c7be79b4e7
Merge pull request #31136 from LiuYangkuan/IDiskRemote_metadata_disk
use DiskPtr instead of OS's file system API in class IDiskRemote
2021-11-13 12:16:05 +03:00
mergify[bot]
5d0306ed0c
Merge branch 'master' into notlike-fix 2021-11-12 22:35:10 +00:00
Maksim Kita
38be11a622
Merge pull request #31334 from kitaisreal/bloom-filter-index-check-fix
BloomFilter index check fix
2021-11-13 01:26:08 +03:00
Kseniia Sumarokova
c6fd56ede9
Update DiskLocal.cpp 2021-11-13 00:00:32 +03:00
mergify[bot]
22e7efa8b0
Merge branch 'master' into add_oss_support 2021-11-12 18:25:26 +00:00
LiuYangkuan
4366fcbc83 fix build check and make rename robust in DiskS3::restoreFileOperations 2021-11-12 22:54:10 +08:00
Tomáš Hromada
445b0ba7cc
Expose all GlobalThreadPool config params (#31285) 2021-11-12 16:24:47 +03:00
Kruglov Pavel
051a9e7c69
Merge pull request #31249 from vitlibar/fix-show-grants
Fix SHOW GRANTS when partial revokes are used.
2021-11-12 15:49:12 +03:00
tavplubix
8916d3bebf
Merge pull request #31305 from ClickHouse/rename_support_ifexists
Merging #31081
2021-11-12 15:22:43 +03:00
Anton Popov
7769ed76ce
Merge pull request #31261 from CurtizJ/tuple-element-to-subcolumn
Optimize tupleElement to reading of subcolumn
2021-11-12 15:00:53 +03:00
kssenii
6f895036e6 Disable for hdfs until tested, adjust tests with profile events 2021-11-12 14:09:19 +03:00
Vitaly Baranov
79a93c819f
Merge pull request #31262 from vitlibar/initial-user-role-row-policy
Initial user's roles are used now to find row policies
2021-11-12 13:51:20 +03:00
liyang830
7b88c956c8 fix: quota limit was not reached, but the limit was exceeded 2021-11-12 18:22:55 +08:00
zhanglistar
8bcef97e11 1. style check fix. 2021-11-12 17:23:22 +08:00