Commit Graph

55574 Commits

Author SHA1 Message Date
Yakov Olkhovskiy
257cdd83d4
Merge pull request #60994 from bigo-sg/csv-tuple
fix csv format not support tuple
2024-03-27 09:07:46 -04:00
vdimir
3fa6d23730
Merge pull request #61364 from ClickHouse/vdimir/fix_crash_objson_array_null
Fix crash in ObjectJson parsing array with nulls
2024-03-27 13:41:09 +01:00
Igor Nikonov
15a0f5381f
Merge pull request #59176 from azat/dist/readonly-replicas
Add ability to skip read-only replicas for INSERT into Distributed engine
2024-03-27 13:19:12 +01:00
Yarik Briukhovetskyi
844bb4f06c
Merge pull request #61727 from yariks5s/fix_undrop_query
Revert "Revert "Un-flake test_undrop_query""
2024-03-27 13:12:50 +01:00
Dmitry Novik
39d99068c3
Merge pull request #61652 from ClickHouse/enable-analyzer
Enable `allow_experimental_analyzer` by default
2024-03-27 12:58:43 +01:00
Nikita Mikhaylov
414bccc527
Revert "disallow LowCardinality input type for JSONExtract" (#61960) 2024-03-27 12:06:50 +01:00
Dmitry Novik
31df60be20 Merge remote-tracking branch 'origin/master' into enable-analyzer 2024-03-27 11:37:32 +01:00
Kseniia Sumarokova
af66e1f7c4
Fix style check 2024-03-27 11:25:58 +01:00
Han Fei
af2e86d72d make TSAN happy 2024-03-27 10:21:16 +01:00
Michael Kolupaev
d5da446d21 Tidy 2024-03-27 02:32:15 +00:00
Nikita Taranov
010fd38b71
Merge pull request #61664 from nickitat/db_on_disk_smth
Small change in `DatabaseOnDisk::iterateMetadataFiles()`
2024-03-27 00:06:43 +01:00
kssenii
0a5ce69880 Review fix 2024-03-26 22:02:50 +01:00
kssenii
dc83eb1ad6 Review fixes 2024-03-26 21:43:54 +01:00
Nikolai Kochetov
3b6ea659df Fixing 02535_analyzer_group_by_use_nulls 2024-03-26 19:10:34 +00:00
Dmitry Novik
65121b712e Merge remote-tracking branch 'origin/master' into enable-analyzer 2024-03-26 19:02:30 +01:00
Han Fei
2110bfd278 address comment 2024-03-26 18:53:54 +01:00
Han Fei
97fca6682e fix logical-error when undoing quorum insert transaction 2024-03-26 18:48:25 +01:00
kssenii
a777045dd3 Fix and more tests for broken projections handling 2024-03-26 18:47:48 +01:00
Dmitry Novik
c88cb6be9d Fix broken only_analyze in QueryAnalysisPass 2024-03-26 17:46:38 +01:00
shabroo
8e8bc83d36
Update Context.cpp
@alexey-milovidov please stop torturing me and accept this commit.
2024-03-26 17:37:27 +01:00
Nikita Mikhaylov
1b828ab6f6 Fix for ASync 2024-03-26 16:05:43 +00:00
Yarik Briukhovetskyi
d8bfdf040f
has_all -> has_all_tables 2024-03-26 16:58:36 +01:00
jsc0218
0eb12d2d27
Merge pull request #61888 from jsc0218/No_milli_micro_nanosecod_in_date_trunc
no smaller unit in date_trunc
2024-03-26 11:15:35 -04:00
Kruglov Pavel
50e667dd5b
Merge pull request #61667 from Avogar/fix-with-fill-invalid-chunk
Don't allow the same expression in ORDER BY with and without WITH FILL
2024-03-26 16:04:33 +01:00
Vitaly Baranov
83e006e372
Merge pull request #61734 from vitlibar/fix-columns-after-alter-table-modify-query
Fix columns after executing MODIFY QUERY for a materialized view with internal table
2024-03-26 15:35:22 +01:00
Kruglov Pavel
7220797637
Fix style 2024-03-26 15:26:42 +01:00
Han Fei
73deb9a24c fix a race in refreshable view 2024-03-26 14:20:54 +01:00
Nikolai Kochetov
2dee605d52 Merge branch 'master' into gb-use-null-analyzer-crashes 2024-03-26 13:05:03 +01:00
Nikolai Kochetov
277df60dc4 Fix some crashes with analyzer and group_by_use_nulls. 2024-03-26 12:01:17 +00:00
Alexander Gololobov
4e94510e32 Finish chunk if the size exceeds max_block_size 2024-03-26 12:49:19 +01:00
Alexander Gololobov
2bf1d118c7 Stream rows when reading from system.replicas 2024-03-26 12:49:19 +01:00
Arthur Passos
2ed53e309b
Reset part level upon attach from disk on MergeTree (#61536)
* hackish change to check how CI reacts

* remove unnecessary renameTo

* introduce separate metho

* remove unused arg

* rename meth od

* add simple test

* add current database

* set mutations sync

* Update tests/queries/0_stateless/03013_test_part_level_is_reset_attach_from_disk_mt.sql

---------

Co-authored-by: János Benjamin Antal <antaljanosbenjamin@users.noreply.github.com>
Co-authored-by: János Benjamin Antal <benjamin.antal@clickhouse.com>
2024-03-26 11:44:55 +01:00
Azat Khuzhin
3481fd5191 Fix settings history for distributed_insert_skip_read_only_replicas
CI: https://s3.amazonaws.com/clickhouse-test-reports/59176/fa0c47a42f4187e8284e19d1cd008a0a76c38caf/fast_test.html
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:25:28 +01:00
Azat Khuzhin
1bb9cffb9b Remove distributed_insert_skip_read_only_replicas from settings history
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:24:59 +01:00
Azat Khuzhin
f86bb1e9e9 Rename to DistributedConnectionSkipReadOnlyReplica
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:24:59 +01:00
Azat Khuzhin
ac882c1e70 Simplify condition in PoolWithFailoverBase
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:24:59 +01:00
Azat Khuzhin
c7b919b19e Replace distributed_insert_replicas_preferences with distributed_insert_skip_read_only_replicas
v2: fix test
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:24:57 +01:00
Azat Khuzhin
a19b27bd7c Revert extra changed lines
That was the changes that looks OK for the initial patchset version, but
not now, after all review comments.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:24:16 +01:00
Azat Khuzhin
fe613ddd06 Convert distributed_insert_replicas_preferences into enum
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:24:14 +01:00
Azat Khuzhin
eb334d717a Remove superior check for empty pools
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:23:21 +01:00
Azat Khuzhin
dbdf080108 Remove insert argument for ConnectionPoolWithFailover
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:22:38 +01:00
Azat Khuzhin
d922bfb1b0 Introduce distributed_insert_prefer_non_readonly_replica setting
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:21:40 +01:00
Azat Khuzhin
0e99781686 Move insert flag from ConnectionEstablisher to TryResult
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:21:40 +01:00
Azat Khuzhin
b9469e2729 Do not try to INSERT into readonly replicas for Distributed engine
Sometimes replica may be readonly for a long time, and this will make
some INSERT queries fail, but it does not make sense to INSERT into
readonly replica, so let's ignore them.

But note, that this will require to extend TableStatus (not extend, but
introduce new version), that will have is_readonly field.

Also before background INSERT into Distributed does not uses
getManyChecked() which means that they do not request TableStatus
packet, while now they would, though this is minor (just a note).

v2: Add a note about max_replica_delay_for_distributed_queries for INSERT
v3: Skip read-only replicas for async INSERT into Distributed
v4: Remove extra @insert parameter for ConnectionPool*::get*
    It make sense only when the table name had passed --
    ConnectionPoolWithFailover::getManyChecked()
v5: rebase on top LoggerPtr
v6: rebase
v7: rebase
v8: move TryResult::is_readonly into the end

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:21:38 +01:00
Azat Khuzhin
77de81f996 Simpler and less error prone PoolWithFailoverBase::TryResult::reset()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:19:10 +01:00
Azat Khuzhin
b2945a5ad4 Mark Replicated table as readonly in case of static disk (read-only/write-once)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:19:10 +01:00
Nikolai Kochetov
2f382ac8a8
Merge pull request #61787 from ClickHouse/fix-virtual-columns-storage-merge-analyzer
Fix more tests with virtual columns in StorageMerge.
2024-03-26 11:16:25 +01:00
Nikolai Kochetov
f2e9ea2417
Merge pull request #61875 from ClickHouse/try-to-fix-02901_parallel_replicas_rollup-with-analyzer
Try to fix 02901_parallel_replicas_rollup with analyzer.
2024-03-26 11:12:29 +01:00
vdimir
802d6a2dac
Merge pull request #59007 from ClickHouse/vdimir/using_alias_followup
Analyzer: fixes for JOIN columns resolution
2024-03-26 10:36:50 +01:00
Kseniia Sumarokova
fd8e34a0ba
Merge pull request #60452 from ClickHouse/revert-refert-of-broken-projections-handling
Revert "Revert "Merge pull request #56864 from ClickHouse/broken-projections-better-handling""
2024-03-26 10:34:48 +01:00
Michael Kolupaev
899b856ad6 Add profile events for number of HTTP requests and bytes read 2024-03-26 09:14:55 +00:00
Michael Kolupaev
1fb902c5b7 Fix sending a new request every 2 MB 2024-03-26 09:14:55 +00:00
Michael Kolupaev
1f0de3de64 Add a test and remove unrelated unused profile events 2024-03-26 09:14:55 +00:00
Michael Kolupaev
ab0c601d63 Make userspace page cache work with 'web' disks 2024-03-26 09:14:55 +00:00
Alexey Milovidov
cc1ee02459
Merge pull request #61916 from ClickHouse/no-please
No "please"
2024-03-26 12:10:11 +03:00
Alexey Milovidov
76ed7e40fe
Merge pull request #61866 from azat/pool-remove-AllocateNewBypassingPool
Remove PoolBase::AllocateNewBypassingPool
2024-03-26 11:02:44 +03:00
Alexey Milovidov
9b052d059d No "please" 2024-03-26 09:00:20 +01:00
Alexey Milovidov
94f1379677 Move KQL trash where it is supposed to be 2024-03-26 04:02:32 +01:00
pufit
cad66f3e68
Fix ALTER QUERY MODIFY SQL SECURITY (#61480) 2024-03-25 20:03:02 -04:00
Alexey Milovidov
7282c5dbf6
Merge pull request #61848 from ClickHouse/geodistance-double-precision
Double precision of geoDistance if the arguments are Float64
2024-03-26 02:58:07 +03:00
avogar
dc87c483dd Add a setting to allow saving bad escape sequences in JSON input formats 2024-03-25 21:58:53 +00:00
Yakov Olkhovskiy
6c4cd355e6
Merge pull request #61511 from jewelzqiu/existing-count
Add docs for lwd-aware merge settings
2024-03-25 16:59:58 -04:00
jsc0218
faf82d53b3 no smaller unit in date_trunc 2024-03-25 20:56:00 +00:00
Alexey Milovidov
1928e7d1f6
Merge pull request #60886 from ArctypeZach/master
Add support for `START TRANSACTION` syntax
2024-03-25 21:09:48 +03:00
Alexander Tokmakov
87dea7885f
Merge pull request #61675 from ClickHouse/replace_range_sucks
Fix actual_part_name for REPLACE_RANGE (`Entry actual part isn't empty yet`)
2024-03-25 18:59:49 +01:00
Julia Kartseva
a24b76c02e
Merge pull request #61617 from jkartseva/json-disallow-low-cardinality
disallow LowCardinality input type for JSONExtract
2024-03-25 10:21:36 -07:00
Pervakov Grigorii
a2ad832dfe fix error handling 2024-03-25 17:13:30 +00:00
Han Fei
233a75505b
Merge pull request #61766 from ditgittube/master_fix_window
Fix RANGE frame is not supported for Nullable columns.
2024-03-25 17:17:58 +01:00
kssenii
5100b0d52e Fix typo 2024-03-25 17:04:44 +01:00
Nikolai Kochetov
3752b13753 See what would happen if constant fold _CAST for scalar subqueries properly. 2024-03-25 15:36:01 +00:00
Alexey Milovidov
dc6d713658
Merge pull request #60774 from canhld94/zookeeper_log_us
Change column name from duration_ms to duration_us in system.zookeeper
2024-03-25 18:07:58 +03:00
Alexey Milovidov
c2209c997c
Merge branch 'master' into geodistance-double-precision 2024-03-25 17:49:32 +03:00
Alexey Milovidov
24261476c4
Merge pull request #61820 from ClickHouse/get-client-http-header
Add a new function `getClientHTTPHeader`
2024-03-25 17:48:24 +03:00
Alexey Milovidov
21a0d17637
Merge branch 'master' into geodistance-double-precision 2024-03-25 17:47:42 +03:00
Alexey Milovidov
d45a6fe9b9 Fix tidy 2024-03-25 15:46:55 +01:00
Pervakov Grigorii
570dc32b07 fix style 2024-03-25 14:09:53 +00:00
Pervakov Grigorii
6b50f5bf10 Reload certificate chain during certificate reload 2024-03-25 14:09:53 +00:00
avogar
192d59e1ff Disable optimize_group_by_function_keys when group_by_use_nulls=1 2024-03-25 14:00:40 +00:00
kssenii
38b15fb2a3 Fix 02494_zero_copy_and_projection_and_mutation_work_together.sql with shared merge tree 2024-03-25 14:59:37 +01:00
Vitaly Baranov
12a7f6afff Fix columns of a materialized views after MODIFY QUERY. 2024-03-25 14:50:36 +01:00
alesapin
d4063e378e
Merge pull request #61554 from ClickHouse/fix_wait_for_mutation_done
Wait for done mutation with more logs and asserts
2024-03-25 14:27:34 +01:00
Nikita Taranov
4e3d4f1c92
Merge branch 'master' into db_on_disk_smth 2024-03-25 14:22:14 +01:00
kssenii
e3d2fb28cf Merge remote-tracking branch 'origin/master' into revert-refert-of-broken-projections-handling 2024-03-25 13:54:39 +01:00
Nikolai Kochetov
75150033c8 Cleanup 2024-03-25 12:45:20 +00:00
Nikolai Kochetov
6d5f2cd7b5 Cleanup 2024-03-25 12:44:28 +00:00
Sergei Trifonov
10c6152aac
Merge pull request #61546 from ClickHouse/more-log-for-async-loader
More logging for loading of tables
2024-03-25 13:12:45 +01:00
Yarik Briukhovetskyi
8bdbfce43c
Merge branch 'master' into fix_undrop_query 2024-03-25 13:06:46 +01:00
Yarik Briukhovetskyi
20a45b4073
Merge pull request #61564 from liuneng1994/optimize_in_single_value
New analyzer pass to optimize in single value
2024-03-25 12:53:01 +01:00
kssenii
f7ef5734fa Add more comments 2024-03-25 12:10:26 +01:00
Nikolai Kochetov
abe78e1a7b Merge branch 'master' into fix-virtual-columns-storage-merge-analyzer 2024-03-25 10:43:23 +00:00
Azat Khuzhin
1bfd588035 Remove PoolBase::AllocateNewBypassingPool
The code that it uses had been removed in #58845.
Introduced in #49732

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-25 11:04:05 +01:00
SmitaRKulkarni
a642f4d3ec
Merge pull request #59929 from ClickHouse/Azure_write_buffer
Asynchronous WriteBuffer for AzureBlobStorage
2024-03-25 10:32:56 +01:00
János Benjamin Antal
80a7cda59a Fix style 2024-03-25 09:21:45 +00:00
SmitaRKulkarni
f16dffaefc
Merge pull request #61503 from ClickHouse/Azure_read_buffer
Add support of ParallelReadBuffer to ReadBufferFromAzureBlobStorage
2024-03-25 09:51:59 +01:00
LiuYuan
8e4c25e1c4 Fix RANGE frame is not supported for Nullable columns. 2024-03-25 08:31:46 +00:00
HowePa
d38534e047 add TRUNCATE ALL TABLES 2024-03-25 15:59:15 +08:00
Alexey Milovidov
a600e181ec
Merge branch 'master' into get-client-http-header 2024-03-25 07:23:43 +03:00
Alexey Milovidov
0d1751fd55
Merge pull request #61791 from ClickHouse/enable-output_format_pretty_row_numbers
Enable `output_format_pretty_row_numbers` by default
2024-03-25 06:16:39 +03:00
Alexey Milovidov
cbf3b5ea02 Fix error 2024-03-25 03:41:52 +01:00
Alexey Milovidov
d488d4fac5 Remove unused headers 2024-03-25 03:38:47 +01:00