Commit Graph

120387 Commits

Author SHA1 Message Date
Yakov Olkhovskiy
e133db7937
Merge pull request #51472 from bigo-sg/substring_index
Add function substring_index, as in spark or mysql
2023-07-25 08:43:13 -04:00
Kruglov Pavel
da02f3189d
Merge pull request #50452 from DanRoscigno/update-acid-docs
update for min_chunk_bytes_for_parallel_parsing
2023-07-25 14:15:55 +02:00
Robert Schulze
1a965b20a3
Merge pull request #52309 from rschu1ze/qc-event-descr
Minor: Update description of events "QueryCacheHits/Misses"
2023-07-25 13:54:06 +02:00
Kruglov Pavel
f8c90d5964
Make better 2023-07-25 13:36:57 +02:00
robot-ch-test-poll
8964de808e
Merge pull request #52147 from ucasfl/any_value
Add any_value as a compatibility alias for any
2023-07-25 13:05:49 +02:00
Nikolai Kochetov
c960b3b533
Merge pull request #52533 from ClickHouse/Avogar-patch-2
Cancel execution in PipelineExecutor in case of exception in graph->updateNode
2023-07-25 12:39:22 +02:00
Yarik Briukhovetskyi
5f767b0dfa
Merge pull request #52004 from JackyWoo/rewrite_uniq_to_count
Rewrite uniq to count
2023-07-25 11:41:00 +02:00
robot-ch-test-poll
bd5d93e439
Merge pull request #52536 from ClickHouse/Fix_disallow_concurrent_backup_restore_test
Fix disallow_concurrency test for backup and restore
2023-07-25 09:10:27 +02:00
robot-ch-test-poll1
4e5ed9b475
Merge pull request #52534 from ClickHouse/analyzer_fix_01951_distributed_push_down_limit
Make 01951_distributed_push_down_limit analyzer agnostic
2023-07-25 07:45:21 +02:00
robot-ch-test-poll4
fe6cd14a48
Merge pull request #52527 from Algunenano/mergetree_cleanup
Remove unused code
2023-07-25 07:41:42 +02:00
Alexey Milovidov
ecdafeaf83
Merge pull request #52175 from bigo-sg/comment_improve_ch_to_arrow
Add comments for https://github.com/ClickHouse/ClickHouse/pull/52112
2023-07-25 06:47:48 +03:00
flynn
8388ee067a
Merge branch 'master' into any_value 2023-07-25 11:21:19 +08:00
robot-ch-test-poll1
05d4932842
Merge pull request #52137 from ucasfl/avro-fix
Avro input format support Union with single type
2023-07-25 04:48:39 +02:00
Alexey Milovidov
b53baa43ac
Merge pull request #51293 from ClickHouse/sql-fetch-allow-without-offset
Allow SQL standard `FETCH` without `OFFSET`
2023-07-25 05:44:39 +03:00
Alexey Milovidov
fbcc06685b
Merge pull request #51367 from ClickHouse/remove-wrong-code
Attempt to remove wrong code (catch/throw in Functions)
2023-07-25 05:44:22 +03:00
Alexey Milovidov
168b84a592
Merge pull request #52337 from Avogar/no-decode-url
Allow to disable decoding/encoding path in uri in URL engine
2023-07-25 05:43:06 +03:00
Alexey Milovidov
787757fd25
Merge pull request #52497 from ClickHouse/Fix_test_insert_same_partition_and_merge_increase_timeout
Fix test_insert_same_partition_and_merge by increasing wait time
2023-07-25 05:39:20 +03:00
Alexey Milovidov
813efa31ad
Merge pull request #52513 from ClickHouse/fix-transform-2
Fix abort in function `transform`
2023-07-25 05:37:17 +03:00
flynn
93c628dea1
Merge branch 'master' into any_value 2023-07-25 10:37:08 +08:00
Alexey Milovidov
7cab99d2a3
Merge pull request #52537 from ClickHouse/tavplubix-patch-8
Update 02136_scalar_subquery_metrics.sql
2023-07-25 05:33:29 +03:00
Alexey Milovidov
3c034d563b
Merge pull request #52068 from azat/replicated-cluster-prep1
Preparations for Trivial Support For Resharding (part1)
2023-07-24 22:57:44 +03:00
Kseniia Sumarokova
e05e0ec557
Merge pull request #52318 from valbok/utf8-names
MaterializedMySQL: Support unquoted utf-8 strings in DDL
2023-07-24 21:49:33 +02:00
Alexey Milovidov
34ff0e0ea9
Merge pull request #52184 from azat/tests/randomize-timezone
Randomize timezone in tests across non-deterministic around 1970 and default
2023-07-24 22:47:52 +03:00
Alexander Tokmakov
8b09fb4cba
Merge pull request #52355 from valbok/comment-db
MaterializedMySQL: Add support of double quoted comments
2023-07-24 20:55:50 +03:00
Alexander Tokmakov
c3e2077449
Merge branch 'master' into comment-db 2023-07-24 20:53:46 +03:00
Alexander Tokmakov
2f99363db0
Update 02136_scalar_subquery_metrics.sql 2023-07-24 20:51:53 +03:00
Alexey Milovidov
33e4273d38 Merge branch 'sql-fetch-allow-without-offset' of github.com:ClickHouse/ClickHouse into sql-fetch-allow-without-offset 2023-07-24 19:50:56 +02:00
Kruglov Pavel
c35da36ff2
Fix default value 2023-07-24 19:50:53 +02:00
Alexey Milovidov
9660bc0d99 Merge branch 'master' into sql-fetch-allow-without-offset 2023-07-24 19:50:40 +02:00
Alexey Milovidov
c082789c27 Merge branch 'fix-transform-2' into sql-fetch-allow-without-offset 2023-07-24 19:50:33 +02:00
Alexey Milovidov
654af41431 Fix race 2023-07-24 19:45:55 +02:00
Alexey Milovidov
22a2fa097f Improve error messages 2023-07-24 19:40:02 +02:00
Alexey Milovidov
b9375782bd Merge branch 'master' into remove-wrong-code 2023-07-24 19:34:01 +02:00
Alexey Milovidov
01993bef5b
Merge pull request #52489 from ClickHouse/incbin
Faster startup of clickhouse-client and clickhouse-local
2023-07-24 18:42:24 +03:00
Igor Nikonov
f067f8c46d Make 01951_distributed_push_down_limit analyzer agnostic 2023-07-24 15:37:16 +00:00
Kruglov Pavel
d2d100b68a
Cancel execution in PipelineExecutor in case of exception in graph->updateNode 2023-07-24 17:05:57 +02:00
flynn
5d318ef72a
Merge branch 'master' into avro-fix 2023-07-24 22:13:18 +08:00
robot-ch-test-poll3
40f53c4659
Merge pull request #52515 from ClickHouse/fix-test_throttling
Fix `test_throttling`
2023-07-24 15:58:28 +02:00
Nikita Taranov
c6e6fd7613
Shard OpenedFileCache to avoid lock contention (#51341)
* shard OpenedFileCache to avoid lock contention

* Update OpenedFileCache.h

* fix build

---------

Co-authored-by: Alexey Milovidov <milovidov@clickhouse.com>
2023-07-24 15:58:21 +02:00
Nikolay Degterinsky
40652cf2de
Merge pull request #51899 from evillique/describe-table-settings
Allow SETTINGS before FORMAT in DESCRIBE TABLE query
2023-07-24 15:24:41 +02:00
Raúl Marín
c7239c64ea Remove unused code 2023-07-24 15:16:44 +02:00
Nikita Taranov
df5ff1383c
Fix settings not applied for explain query when format provided (#51859) 2023-07-24 14:57:05 +02:00
Alexander Tokmakov
dd491eeae2
Merge pull request #52514 from azat/tests/fix-test_version_update_after_mutation
Fix flakiness of test_version_update_after_mutation by enabling force_remove_data_recursively_on_drop
2023-07-24 15:23:12 +03:00
Antonio Andelic
5da6c99f6d
Add comment 2023-07-24 12:02:27 +02:00
Antonio Andelic
3710c7238d Fix test_throttling 2023-07-24 09:19:06 +00:00
Val Doroshchuk
efa638ef3c MaterializedMySQL: Support unquoted utf-8 strings in DDL
Since ClickHouse does not support unquoted utf-8 strings but MySQL does.

Instead of fixing Lexer to recognize utf-8 chars as TokenType::BareWord,
suggesting to quote all unrecognized tokens before applying any DDL.

Actual parsing and validating the syntax will be done by particular Parser.

If there is any TokenType::Error, the query is unable to be parsed anyway.
Quoting such tokens can provide the support of utf-8 names.

See `tryQuoteUnrecognizedTokens` and `QuoteUnrecognizedTokensTest`.

mysql> CREATE TABLE 道.渠(...

is converted to

CREATE TABLE `道`.`渠`(...

Also fixed the bug with missing * while doing SELECT in full sync because db or table name are back quoted when not needed.
2023-07-24 11:12:10 +02:00
Azat Khuzhin
0401dc453e Fix flakiness of test_version_update_after_mutation by enabling force_remove_data_recursively_on_drop
Since there can be some leftovers:

    2023.07.24 07:08:25.238066 [ 140 ] {} <Error> Application: Code: 219. DB::Exception: Cannot drop: filesystem error: in remove: Directory not empty ["/var/lib/clickhouse/data/system/"]. Probably database contain some detached tables or metadata leftovers from Ordinary engine. If you want to remove all data anyway, try to attach database back and drop it again with enabled force_remove_data_recursively_on_drop setting: Exception while trying to convert database system from Ordinary to Atomic. It may be in some intermediate state. You can finish conversion manually by moving the rest tables from system to .tmp_convert.system.9396432095832455195 (using RENAME TABLE) and executing DROP DATABASE system and RENAME DATABASE .tmp_convert.system.9396432095832455195 TO system. (DATABASE_NOT_EMPTY), Stack trace (when copying this message, always include the lines below):

    0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000000e68af57 in /usr/bin/clickhouse
    1. ? @ 0x000000000cab443c in /usr/bin/clickhouse
    2. DB::DatabaseOnDisk::drop(std::shared_ptr<DB::Context const>) @ 0x000000001328d617 in /usr/bin/clickhouse
    3. DB::DatabaseCatalog::detachDatabase(std::shared_ptr<DB::Context const>, String const&, bool, bool) @ 0x0000000013524a6c in /usr/bin/clickhouse
    4. DB::InterpreterDropQuery::executeToDatabaseImpl(DB::ASTDropQuery const&, std::shared_ptr<DB::IDatabase>&, std::vector<StrongTypedef<wide::integer<128ul, unsigned int>, DB::UUIDTag>, std::allocator<StrongTypedef<wide::integer<128ul, unsigned int>, DB::UUIDTag>>>&) @ 0x0000000013bc05e4 in /usr/bin/clickhouse
    5. DB::InterpreterDropQuery::executeToDatabase(DB::ASTDropQuery const&) @ 0x0000000013bbc6b8 in /usr/bin/clickhouse
    6. DB::InterpreterDropQuery::execute() @ 0x0000000013bbba22 in /usr/bin/clickhouse
    7. ? @ 0x00000000140b13a5 in /usr/bin/clickhouse
    8. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum) @ 0x00000000140ad20e in /usr/bin/clickhouse
    9. ? @ 0x00000000140d2ef0 in /usr/bin/clickhouse
    10. DB::maybeConvertSystemDatabase(std::shared_ptr<DB::Context>) @ 0x00000000140d0aaf in /usr/bin/clickhouse
    11. DB::Server::main(std::vector<String, std::allocator<String>> const&) @ 0x000000000e724e55 in /usr/bin/clickhouse
    12. Poco::Util::Application::run() @ 0x0000000017ead086 in /usr/bin/clickhouse
    13. DB::Server::run() @ 0x000000000e714a5d in /usr/bin/clickhouse
    14. Poco::Util::ServerApplication::run(int, char**) @ 0x0000000017ec07b9 in /usr/bin/clickhouse
    15. mainEntryClickHouseServer(int, char**) @ 0x000000000e711a26 in /usr/bin/clickhouse
    16. main @ 0x0000000008cf13cf in /usr/bin/clickhouse
    17. __libc_start_main @ 0x0000000000021b97 in /lib/x86_64-linux-gnu/libc-2.27.so
    18. _start @ 0x00000000080705ae in /usr/bin/clickhouse
     (version 23.7.1.2012)

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-07-24 10:34:50 +02:00
Smita Kulkarni
0e46cf86b7 Added try-except to check cases when second backup/restore is picked up first 2023-07-24 08:52:19 +02:00
Alexey Milovidov
c794922401 More tests 2023-07-24 08:20:30 +02:00
Alexey Milovidov
890a3754a6 Fix error 2023-07-24 08:19:46 +02:00