Commit Graph

133861 Commits

Author SHA1 Message Date
Arthur Passos
d8deebaaba
Merge branch 'ClickHouse:master' into bring_back_attach_partition_pr 2024-01-26 13:27:57 -03:00
Azat Khuzhin
50f0a34ecb Enable Rust on OSX
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-01-26 17:20:00 +01:00
Azat Khuzhin
5227d7c9bc Fix 02475_bson_each_row_format flakiness (due to small parsing block)
CI: https://s3.amazonaws.com/clickhouse-test-reports/59170/c82050d1925439f0ede2b32acb5b1b8df4acae5d/stateless_tests__release_/run.log
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-01-26 16:51:37 +01:00
Azat Khuzhin
332924a2b4 tests: adjust 02980_s3_plain_DROP_TABLE tests
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-01-26 16:47:36 +01:00
Azat Khuzhin
90ab986be6 Revert "Prohibit CREATE on static storages (ATTACH should be used instead)"
CREATE is used by Replicated database even for ATTACH, and anyway ATTACH
creates format_version.txt as well (without previuos patch).

This reverts commit 323f1f320ebe7e588d443abf78efa2c60193e7a9.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-01-26 16:47:36 +01:00
Azat Khuzhin
7ba31bf55c Do not create format_version.txt on write-once storages
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-01-26 16:47:36 +01:00
Azat Khuzhin
7cc7fb892c tests/test_disk_over_web_server: update expected assertion for static storage
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-01-26 16:47:36 +01:00
Azat Khuzhin
66a40bda0a Revert "Prohibit DROP from static storages"
It is actually OK to DROP at least from read-only disk, as for the
write-once it should be OK as well, since CREATE is prohibited anyway,
so there should be no leftovers

CI: https://s3.amazonaws.com/clickhouse-test-reports/59170/c82050d1925439f0ede2b32acb5b1b8df4acae5d/stress_test__asan_.html
CI: https://s3.amazonaws.com/clickhouse-test-reports/59170/c82050d1925439f0ede2b32acb5b1b8df4acae5d/integration_tests__asan__[3_4].html

This reverts commit 082e62712c5e2f4c48d1abc6141ccfd1249d26b4.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-01-26 16:47:35 +01:00
Azat Khuzhin
d99fb4ce5b tests: rewrite test for MergeTree engines in s3_plain using ATTACH
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-01-26 16:47:35 +01:00
Azat Khuzhin
aafc149c1e Prohibit CREATE on static storages (ATTACH should be used instead)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-01-26 16:47:35 +01:00
Azat Khuzhin
1ee723d50d Prohibit DROP from static storages
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-01-26 16:47:35 +01:00
Azat Khuzhin
046a7a5df5 tests: cover DROP TABLE on s3_plain disk
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-01-26 16:47:35 +01:00
Azat Khuzhin
d79c1f7e1c Fix MetadataStorageFromPlainObjectStorage::iterateDirectory() (add prefix)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-01-26 16:47:35 +01:00
Azat Khuzhin
9ce18bbf43 Implement MetadataStorageFromPlainObjectStorageTransaction::removeDirectory (for DROP TABLE)
This is required to remove format_version.txt for MergeTree after DROP

    (lldb) bt
    * thread 192, name = 'BgSchPool', stop reason = breakpoint 1.1
        frame 0: 0x0000000016c7f452 clickhouse`__cxa_throw(thrown_object=0x00007ffd7a53c480, tinfo=0x00000000011602a0, dest=(clickhouse`DB::Exception::~Exception() at Exception.h:40)) + 18 at cxa_exception.cpp:258
        frame 1: 0x00000000109bf709 clickhouse`DB::IMetadataTransaction::throwNotImplemented() + 137 at IMetadataStorage.h:151
        frame 2: 0x00000000109bf126 clickhouse`DB::IMetadataTransaction::removeDirectory(this=<unavailable>, (null)=<unavailable>) + 6 at IMetadataStorage.h:96
        frame 3: 0x0000000010968978 clickhouse`DB::(anonymous namespace)::RemoveRecursiveObjectStorageOperation::removeMetadataRecursive(this=0x00007ffd7a7327a0, tx=std::__1::shared_ptr<DB::IMetadataTransaction>::element_type @ 0x00007ffd7a6f6018 strong=4 weak=1, path_to_remove="tmp_insert_all_2_2_0") + 376 at DiskObjectStorageTransaction.cpp:364
        frame 4: 0x000000001096893d clickhouse`DB::(anonymous namespace)::RemoveRecursiveObjectStorageOperation::removeMetadataRecursive(this=0x00007ffd7a7327a0, tx=std::__1::shared_ptr<DB::IMetadataTransaction>::element_type @ 0x00007ffd7a6f6018 strong=4 weak=1, path_to_remove="store/27f/27f6f9d2-ab2e-4817-b771-0e706e485b15/") + 317 at DiskObjectStorageTransaction.cpp:362
        frame 5: 0x0000000010965a7f clickhouse`DB::(anonymous namespace)::RemoveRecursiveObjectStorageOperation::execute(this=0x00007ffd7a7327a0, tx=std::__1::shared_ptr<DB::IMetadataTransaction>::element_type @ 0x00007ffd7a6f6018 strong=4 weak=1) + 95 at DiskObjectStorageTransaction.cpp:372
        frame 6: 0x0000000010963a2f clickhouse`DB::DiskObjectStorageTransaction::commit(this=0x00007ffea22b6168) + 79 at DiskObjectStorageTransaction.cpp:903
        frame 7: 0x00000000109577e5 clickhouse`DB::DiskObjectStorage::removeSharedRecursive(this=<unavailable>, path="store/27f/27f6f9d2-ab2e-4817-b771-0e706e485b15/", keep_all_batch_data=false, file_names_remove_metadata_only=size=0) + 133 at DiskObjectStorage.cpp:426
        frame 8: 0x000000001095af79 clickhouse`DB::DiskObjectStorage::removeRecursive(this=<unavailable>, path=<unavailable>) + 57 at DiskObjectStorage.h:79
      * frame 9: 0x0000000010b5c3d5 clickhouse`DB::DatabaseCatalog::dropTableFinally(this=0x00007ffff7096800, table=0x00007ffe853e1bd0) + 1365 at DatabaseCatalog.cpp:1317
        frame 10: 0x0000000010b5b7e7 clickhouse`DB::DatabaseCatalog::dropTableDataTask(this=0x00007ffff7096800) + 2375 at DatabaseCatalog.cpp:1270

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-01-26 16:47:35 +01:00
Azat Khuzhin
f3b4f28f0d Disable mutable operations into {Replicated,}MergeTree with static storage
Mutable operations includes:
- INSERT
- OPTIMIZE
- parts manipulation
- ...

But does not include DROP, since you need an ability to DROP it.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-01-26 16:47:35 +01:00
Azat Khuzhin
41ebaefeda Add a note for MetadataStorageFromPlainObjectStorage to support transactions
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-01-26 16:47:35 +01:00
Azat Khuzhin
6751e01cc3 Do not drop parts for static (ro/write-once) storages for Replicated engine
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-01-26 16:47:35 +01:00
Azat Khuzhin
e56728ae6c tests: add s3_plain disk
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-01-26 16:47:35 +01:00
Dmitry Novik
6c5057c4f2
Merge pull request #58919 from ClickHouse/analyzer-inj-func-elemination
Analyzer: Support GROUP BY injective function elimination
2024-01-26 16:45:09 +01:00
kssenii
5cd757dd9a Merge remote-tracking branch 'origin/master' into s3-queue-parallelize-ordered-mode 2024-01-26 16:33:22 +01:00
Kseniia Sumarokova
99653fc778
Merge branch 'master' into broken-projections-better-handling 2024-01-26 16:27:23 +01:00
kssenii
ee15b6e646 Fix 2024-01-26 16:26:59 +01:00
Dmitry Novik
a9d2e13697 Handle CTEs more careafully 2024-01-26 15:20:09 +00:00
Dmitry Novik
e38face46b Fix style 2024-01-26 15:20:09 +00:00
Dmitry Novik
778f4371c2 Cleanup the code 2024-01-26 15:20:09 +00:00
Dmitry Novik
e3c07d4562 Analyzer: Fix CTE name clash resolution 2024-01-26 15:20:09 +00:00
Raúl Marín
335c7da319 Merge remote-tracking branch 'blessed/master' into parallel_replicas_cte 2024-01-26 16:19:56 +01:00
Azat Khuzhin
94eb33ef27 Improve pytest --pdb experience by preserving dockerd on SIGINT (v2)
Previous fix (#43392) was not correct, since terminal sends SIGINT to
all processes in a group, so simply ignoring it in parent won't work. So
instead dockerd will be run in a new session.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-01-26 16:06:41 +01:00
Dmitry Novik
394e37894f Small improvement in QueryAnalysisPass 2024-01-26 15:03:35 +00:00
Artur Beglaryan
1624ecd7e6
Fixed typo in documentation
Added missed parameter in xml dictionary config
2024-01-26 15:02:28 +00:00
Mikhail f. Shiryaev
4286634876
Merge pull request #59256 from azat/tests/fasttest
Fix fasttest by pinning pip dependencies
2024-01-26 16:00:32 +01:00
Azat Khuzhin
92d96c4d02 Fix fasttest by pinning pip dependencies
After image update it prints the following warning:

    /ClickHouse/tests/queries/0_stateless/01558_ttest_scipy.python:5: DeprecationWarning:
    Pyarrow will become a required dependency of pandas in the next major release of pandas (pandas 3.0),
    (to allow more performant data types, such as the Arrow string type, and better interoperability with other libraries)
    but was not found to be installed on your system.
    If this would cause problems for you,
    please provide us feedback at https://github.com/pandas-dev/pandas/issues/54466

Pyarrow can be added as well, but according to the comment in the issue
it bloats the image size 170%, so let's simply downgrade it for now and
see how that issue will be resolved (or the warning could be suppressed
of course).

And pin other dependencies as well to avoid further failures.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-01-26 15:08:22 +01:00
avogar
7908f69d84 Fix special builds and tests 2024-01-26 14:01:06 +00:00
Arthur Passos
ce6877cbb6
Merge branch 'ClickHouse:master' into bring_back_attach_partition_pr 2024-01-26 10:57:11 -03:00
Raúl Marín
176d8beac9 Disable parallel replicas JOIN with CTE (not analyzer) 2024-01-26 14:36:38 +01:00
Nikolai Kochetov
75edbdd39c
Merge pull request #59147 from ClickHouse/vdimir/fix_agg_nothing_2
Fix AggregateFunctionNothing result type issues introducing it with different names
2024-01-26 14:33:38 +01:00
Yarik Briukhovetskyi
0cbadc9b52
Merge pull request #59190 from yariks5s/fix_to_string_nullable_timezone
Fix crash with nullable timezone for `toString`
2024-01-26 13:33:12 +01:00
kssenii
7515fa99f4 I hope now 2024-01-26 13:15:15 +01:00
taiyang-li
56db02c953 Merge branch 'master' into improve_if_with_floating 2024-01-26 19:21:49 +08:00
Nikolai Kochetov
10d4f1fd87
Merge pull request #59228 from kitaisreal/actions-dag-build-filter-actions-refactoring
Actions dag build filter actions refactoring
2024-01-26 11:34:19 +01:00
Sergei Trifonov
4fb511bfb3
Merge pull request #59137 from ClickHouse/fix-async-loader-shutdown-deadlock
Fix not started database shutdown deadlock
2024-01-26 11:21:13 +01:00
Max K
94b599d126
Merge pull request #59252 from ClickHouse/ci_fix_nightly_job
CI: fix ci configuration for nightly job
2024-01-26 10:59:00 +01:00
Max Kainov
2b75836ad2 CI: fix ci configuration for nightly job 2024-01-26 09:33:04 +00:00
taiyang-li
29b3cf60a6 fix perf regression 2024-01-26 16:45:09 +08:00
Vitaly Baranov
3fbdf48b53
Merge pull request #59244 from vitlibar/disable-copy-constructor-for-multi-version
Disable copy constructor for MultiVersion
2024-01-26 09:29:43 +01:00
pufit
92e63bf45c
Load server configs in clickhouse local (#59231)
Load server configs in clickhouse local
2024-01-25 23:13:31 -05:00
taiyang-li
626e30609a change as request 2024-01-26 10:43:27 +08:00
avogar
7f6784937d Fix 2024-01-25 23:59:24 +00:00
Vitaly Baranov
a7b1fe9fa2 Disable copy constructor for MultiVersion. 2024-01-25 23:53:54 +01:00
Alexey Milovidov
aedffeaab0
Merge pull request #58959 from Algunenano/fix_sum_map
Fix sumMapFiltered with NaN values
2024-01-25 23:50:28 +01:00