Skip to content

Commit 376e08c

Browse files
committed
Merge branch 'master' into hanfei/remove_if_exists_for_backup_s3_writer
2 parents 9beafc0 + 5633959 commit 376e08c

File tree

660 files changed

+23125
-7316
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

660 files changed

+23125
-7316
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ At a minimum, the following information should be added (but add more as needed)
4343

4444
> Information about CI checks: https://clickhouse.com/docs/en/development/continuous-integration/
4545
46-
#### CI Settings (Only check the boxes if you know what you are doing):
46+
#### CI Settings (Only check the boxes if you know what you are doing)
47+
48+
All builds in Builds_1 and Builds_2 stages are always mandatory
49+
and will run independently of the checks below:
50+
4751
- [ ] <!---ci_set_required--> Allow: All Required Checks
4852
- [ ] <!---ci_include_stateless--> Allow: Stateless tests
4953
- [ ] <!---ci_include_stateful--> Allow: Stateful tests
@@ -57,7 +61,9 @@ At a minimum, the following information should be added (but add more as needed)
5761
- [ ] <!---ci_exclude_fast--> Exclude: Fast test
5862
- [ ] <!---ci_exclude_asan--> Exclude: All with ASAN
5963
- [ ] <!---ci_exclude_tsan|msan|ubsan|coverage--> Exclude: All with TSAN, MSAN, UBSAN, Coverage
60-
- [ ] <!---ci_exclude_aarch64|release|debug--> Exclude: All with aarch64, release, debug
64+
- [ ] <!---ci_exclude_aarch64|release|debug--> Exclude: All with aarch64
65+
- [ ] <!---ci_exclude_release--> Exclude: All with release
66+
- [ ] <!---ci_exclude_debug--> Exclude: All with debug
6167
---
6268
- [ ] <!---ci_include_fuzzer--> Run only fuzzers related jobs (libFuzzer fuzzers, AST fuzzers, etc.)
6369
- [ ] <!---ci_exclude_ast--> Exclude: AST fuzzers

.github/workflows/auto_releases.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ concurrency:
77
group: autoreleases
88

99
on:
10-
# schedule:
11-
# - cron: '0 9 * * *'
10+
schedule:
11+
- cron: '45 11 * * 2,4'
1212
workflow_dispatch:
1313
inputs:
1414
dry-run:
@@ -52,7 +52,7 @@ jobs:
5252
echo 'EOF'
5353
} >> "$GITHUB_OUTPUT"
5454
if [[ "${{ github.event_name }}" == "schedule" ]]; then
55-
echo "DRY_RUN=true" >> "$GITHUB_OUTPUT"
55+
echo "DRY_RUN=false" >> "$GITHUB_OUTPUT"
5656
else
5757
echo "DRY_RUN=${{ github.event.inputs.dry-run }}" >> "$GITHUB_OUTPUT"
5858
fi

CHANGELOG.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
### <a id="2412"></a> ClickHouse release 24.12, 2024-12-19
1919

2020
#### Backward Incompatible Change
21-
* Functions `greatest` and `least` now ignore NULL input values, whereas they previously returned NULL if one of the arguments was NULL. For example, `SELECT greatest(1, 2, NULL)` now returns 2. This makes the behavior compatible with PostgreSQL, but at the same time it breaks the compatiability with MySQL, who returns NULL. [#65519](https://github.com/ClickHouse/ClickHouse/pull/65519) ([kevinyhzou](https://github.com/KevinyhZou)).
22-
* The legacy MongoDB integration based on the Poco driver has been removed. Server setting `use_legacy_mongodb_integration` is obsolete and has no effect anymore. [#71997](https://github.com/ClickHouse/ClickHouse/pull/71997) ([Kirill Nikiforov](https://github.com/allmazz)). The new integration is strictly more capable and powerful.
21+
* Functions `greatest` and `least` now ignore NULL input values, whereas they previously returned NULL if one of the arguments was NULL. For example, `SELECT greatest(1, 2, NULL)` now returns 2. This makes the behavior compatible with PostgreSQL, but at the same time it breaks the compatibility with MySQL which returns NULL. To retain the previous behavior, set setting `least_greatest_legacy_null_behavior` (default: `false`) to `true`. [#65519](https://github.com/ClickHouse/ClickHouse/pull/65519) [#73344](https://github.com/ClickHouse/ClickHouse/pull/73344) ([kevinyhzou](https://github.com/KevinyhZou)).
22+
* A new MongoDB integration is now the default. Users who like to use the legacy MongoDB driver (based on the Poco driver) can enable server setting `use_legacy_mongodb_integration`. [#73359](https://github.com/ClickHouse/ClickHouse/pull/73359) ([Kirill Nikiforov](https://github.com/allmazz).
2323

2424
#### New Feature
2525
* Move `JSON`/`Dynamic`/`Variant` types from experimental features to beta. [#72294](https://github.com/ClickHouse/ClickHouse/pull/72294) ([Pavel Kruglov](https://github.com/Avogar)). We also backported all fixes as well as this change to 24.11.
@@ -63,7 +63,7 @@
6363
* Remove the `allow_experimental_join_condition` setting, allowing non-equi conditions by default. [#69910](https://github.com/ClickHouse/ClickHouse/pull/69910) ([Vladimir Cherkasov](https://github.com/vdimir)).
6464
* Settings from server config (users.xml) now apply on the client too. Useful for format settings, e.g. `date_time_output_format`. [#71178](https://github.com/ClickHouse/ClickHouse/pull/71178) ([Michael Kolupaev](https://github.com/al13n321)).
6565
* Automatic `GROUP BY`/`ORDER BY` to disk based on the server/user memory usage. Controlled with `max_bytes_ratio_before_external_group_by`/`max_bytes_ratio_before_external_sort` query settings. [#71406](https://github.com/ClickHouse/ClickHouse/pull/71406) ([Azat Khuzhin](https://github.com/azat)).
66-
* Adding a new cancellation logic using a singleton object `CancellationChecker` which checks the timeouts for queries. [#69880](https://github.com/ClickHouse/ClickHouse/pull/69880) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
66+
* Adding a new cancellation logic: `CancellationChecker` checks timeouts for every started query and stops them once the timeout has reached. [#69880](https://github.com/ClickHouse/ClickHouse/pull/69880) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
6767
* Support ALTER from `Object` to `JSON`, which means you can easily migrate from the deprecated Object type. [#71784](https://github.com/ClickHouse/ClickHouse/pull/71784) ([Pavel Kruglov](https://github.com/Avogar)).
6868
* Allow unknown values in set that are not present in Enum. Fix [#72662](https://github.com/ClickHouse/ClickHouse/issues/72662). [#72686](https://github.com/ClickHouse/ClickHouse/pull/72686) ([zhanglistar](https://github.com/zhanglistar)).
6969
* Support string search operator (eg., LIKE) for `Enum` data type, implements [#72661](https://github.com/ClickHouse/ClickHouse/issues/72661). [#72732](https://github.com/ClickHouse/ClickHouse/pull/72732) ([zhanglistar](https://github.com/zhanglistar)).
@@ -87,6 +87,7 @@ memory usage issue. [#72490](https://github.com/ClickHouse/ClickHouse/pull/72490
8787
* Add S3 request settings `http_max_fields`, `http_max_field_name_size`, `http_max_field_value_size` and use them while parsing S3 API responses during making a backup or restoring. [#72778](https://github.com/ClickHouse/ClickHouse/pull/72778) ([Vitaly Baranov](https://github.com/vitlibar)).
8888
* Delete table metadata in keeper in Storage S3(Azure)Queue only after last table using this metadata was dropped. [#72810](https://github.com/ClickHouse/ClickHouse/pull/72810) ([Kseniia Sumarokova](https://github.com/kssenii)).
8989
* Added `JoinBuildTableRowCount`/`JoinProbeTableRowCount/JoinResultRowCount` profile events. [#72842](https://github.com/ClickHouse/ClickHouse/pull/72842) ([Vladimir Cherkasov](https://github.com/vdimir)).
90+
* Support subcolumns in MergeTree sorting key and skip indexes. [#72644](https://github.com/ClickHouse/ClickHouse/pull/72644) ([Pavel Kruglov](https://github.com/Avogar)).
9091

9192
#### Bug Fix (user-visible misbehavior in an official stable release)
9293
* Fix possible intersecting parts for MergeTree (after an operation of moving part to the detached directory has been failed, possibly due to operation on object storage). [#70476](https://github.com/ClickHouse/ClickHouse/pull/70476) ([Azat Khuzhin](https://github.com/azat)).

CMakeLists.txt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ option(FAIL_ON_UNSUPPORTED_OPTIONS_COMBINATION
77
"Stop/Fail CMake configuration if some ENABLE_XXX option is defined (either ON or OFF)
88
but is not possible to satisfy" ON)
99

10+
# This allows to compile some code conditionally in the private build while having byte-identical source files.
11+
set (CLICKHOUSE_CLOUD 0)
12+
1013
if(FAIL_ON_UNSUPPORTED_OPTIONS_COMBINATION)
1114
set(RECONFIGURE_MESSAGE_LEVEL FATAL_ERROR)
1215
else()
@@ -269,6 +272,10 @@ else ()
269272
set (ENABLE_BUILD_PATH_MAPPING_DEFAULT ON)
270273
endif ()
271274

275+
if (COMPILER_CACHE STREQUAL "chcache")
276+
set (ENABLE_BUILD_PATH_MAPPING_DEFAULT ON)
277+
endif()
278+
272279
option (ENABLE_BUILD_PATH_MAPPING "Enable remapping of file source paths in debug info, predefined preprocessor macros, and __builtin_FILE(). It's used to generate reproducible builds. See https://reproducible-builds.org/docs/build-path" ${ENABLE_BUILD_PATH_MAPPING_DEFAULT})
273280

274281
if (ENABLE_BUILD_PATH_MAPPING)
@@ -347,10 +354,11 @@ endif()
347354
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-absolute-paths")
348355
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-absolute-paths")
349356

350-
if (NOT ENABLE_TESTS AND NOT SANITIZE AND NOT SANITIZE_COVERAGE AND OS_LINUX)
357+
if (NOT ENABLE_TESTS AND NOT ENABLE_CLANG_TIDY AND NOT SANITIZE AND NOT SANITIZE_COVERAGE AND OS_LINUX)
351358
# https://clang.llvm.org/docs/ThinLTO.html
352359
# Applies to clang and linux only.
353360
# Disabled when building with tests or sanitizers.
361+
# Also disabled with clang-tidy where we don't care about linking
354362
option(ENABLE_THINLTO "Clang-specific link time optimization" ON)
355363
endif()
356364

@@ -463,6 +471,9 @@ message (STATUS "Building for: ${CMAKE_SYSTEM} ${CMAKE_SYSTEM_PROCESSOR} ${CMAKE
463471

464472
add_subdirectory (contrib EXCLUDE_FROM_ALL)
465473

474+
# Ensure that we always use the dummy launchers for our own code.
475+
set_dummy_launchers_if_needed()
476+
466477
if (NOT ENABLE_JEMALLOC)
467478
message (WARNING "Non default allocator is disabled. This is not recommended for production builds.")
468479
endif ()
@@ -592,8 +603,6 @@ endif()
592603
include (cmake/sanitize_targets.cmake)
593604

594605
if (COMPILER_CACHE STREQUAL "chcache")
595-
set (ENABLE_BUILD_PATH_MAPPING_DEFAULT ON)
596-
597606
get_all_targets(all_targets)
598607
set (chcache_targets _cargo-build_chcache cargo-build_chcache cargo-prebuild_chcache)
599608
foreach(target ${all_targets})

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ Every month we get together with the community (users, contributors, customers,
4242
Keep an eye out for upcoming meetups and events around the world. Somewhere else you want us to be? Please feel free to reach out to tyler `<at>` clickhouse `<dot>` com. You can also peruse [ClickHouse Events](https://clickhouse.com/company/news-events) for a list of all upcoming trainings, meetups, speaking engagements, etc.
4343

4444
Upcoming meetups
45-
46-
* [Dubai Meetup](https://www.meetup.com/clickhouse-dubai-meetup-group/events/303096989/) - Feb 3
45+
* [Tokyo Meetup](https://www.meetup.com/clickhouse-tokyo-user-group/events/305126993/) - Jan 23
46+
* [FOSDEM 2025](https://www.fosdem.org/2025/schedule/event/fosdem-2025-6351-how-we-built-a-new-powerful-json-data-type-for-clickhouse/) - Feb 1, 2
47+
* [London Meetup](https://www.meetup.com/clickhouse-london-user-group/events/305146729/) - Feb 5
48+
* [Dubai Meetup](https://www.meetup.com/clickhouse-dubai-meetup-group/events/303096989/) - Feb 10
4749

4850
Recently completed meetups
4951

SECURITY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ The following versions of ClickHouse server are currently supported with securit
1414

1515
| Version | Supported |
1616
|:-|:-|
17+
| 24.12 | ✔️ |
1718
| 24.11 | ✔️ |
1819
| 24.10 | ✔️ |
19-
| 24.9 | ✔️ |
20+
| 24.9 | |
2021
| 24.8 | ✔️ |
2122
| 24.7 ||
2223
| 24.6 ||

base/base/AlignedUnion.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#pragma once
2+
3+
#include <algorithm>
4+
5+
template<std::size_t len, class... Types>
6+
struct AlignedUnion
7+
{
8+
static constexpr std::size_t alignment_value = std::max({alignof(Types)...});
9+
struct Type
10+
{
11+
alignas(alignment_value) char s[std::max({len, sizeof(Types)...})];
12+
};
13+
};
14+
15+
template<std::size_t len, class... Types>
16+
using AlignedUnionT = typename AlignedUnion<len, Types...>::Type;

base/base/unit.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ constexpr size_t GiB = 1024 * MiB;
99
#pragma clang diagnostic ignored "-Wreserved-identifier"
1010

1111
// NOLINTBEGIN(google-runtime-int)
12-
constexpr size_t operator"" _KiB(unsigned long long val) { return val * KiB; }
13-
constexpr size_t operator"" _MiB(unsigned long long val) { return val * MiB; }
14-
constexpr size_t operator"" _GiB(unsigned long long val) { return val * GiB; }
12+
constexpr size_t operator""_KiB(unsigned long long val) { return val * KiB; }
13+
constexpr size_t operator""_MiB(unsigned long long val) { return val * MiB; }
14+
constexpr size_t operator""_GiB(unsigned long long val) { return val * GiB; }
1515
// NOLINTEND(google-runtime-int)
1616

1717
#pragma clang diagnostic pop

base/base/wide_integer_impl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ class numeric_limits<wide::integer<Bits, Signed>>
8585
static constexpr bool has_infinity = false;
8686
static constexpr bool has_quiet_NaN = false;
8787
static constexpr bool has_signaling_NaN = true;
88-
static constexpr std::float_denorm_style has_denorm = std::denorm_absent;
8988
static constexpr bool has_denorm_loss = false;
9089
static constexpr std::float_round_style round_style = std::round_toward_zero;
9190
static constexpr bool is_iec559 = false;

base/poco/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ add_subdirectory (Data)
33
add_subdirectory (Data/ODBC)
44
add_subdirectory (Foundation)
55
add_subdirectory (JSON)
6+
7+
if (USE_MONGODB)
8+
add_subdirectory(MongoDB)
9+
endif()
10+
611
add_subdirectory (Net)
712
add_subdirectory (NetSSL_OpenSSL)
813
add_subdirectory (Redis)

0 commit comments

Comments
 (0)