Skip to content

Commit 0702fa2

Browse files
authored
Merge branch 'master' into alter-to-json
2 parents ce12f65 + 7ea3bcd commit 0702fa2

File tree

665 files changed

+20686
-5878
lines changed

Some content is hidden

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

665 files changed

+20686
-5878
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ website/package-lock.json
159159
/programs/server/store
160160
/programs/server/uuid
161161
/programs/server/coordination
162+
/programs/server/workload
162163

163164
# temporary test files
164165
tests/queries/0_stateless/test_*

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@
332332
url = https://github.com/ClickHouse/usearch.git
333333
[submodule "contrib/SimSIMD"]
334334
path = contrib/SimSIMD
335-
url = https://github.com/ashvardanian/SimSIMD.git
335+
url = https://github.com/ClickHouse/SimSIMD.git
336336
[submodule "contrib/FP16"]
337337
path = contrib/FP16
338338
url = https://github.com/Maratyszcza/FP16.git

CHANGELOG.md

Lines changed: 161 additions & 1 deletion
Large diffs are not rendered by default.

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ string (TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UC)
8888
list(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES)
8989

9090
option (ENABLE_FUZZING "Fuzzy testing using libfuzzer" OFF)
91+
option (ENABLE_FUZZER_TEST "Build testing fuzzers in order to test libFuzzer functionality" OFF)
9192

9293
if (ENABLE_FUZZING)
9394
# Also set WITH_COVERAGE=1 for better fuzzing process

README.md

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,32 +42,19 @@ Keep an eye out for upcoming meetups and events around the world. Somewhere else
4242

4343
Upcoming meetups
4444

45-
* [Oslo Meetup](https://www.meetup.com/open-source-real-time-data-warehouse-real-time-analytics/events/302938622) - October 31
4645
* [Barcelona Meetup](https://www.meetup.com/clickhouse-spain-user-group/events/303096876/) - November 12
4746
* [Ghent Meetup](https://www.meetup.com/clickhouse-belgium-user-group/events/303049405/) - November 19
4847
* [Dubai Meetup](https://www.meetup.com/clickhouse-dubai-meetup-group/events/303096989/) - November 21
4948
* [Paris Meetup](https://www.meetup.com/clickhouse-france-user-group/events/303096434) - November 26
49+
* [Amsterdam Meetup](https://www.meetup.com/clickhouse-netherlands-user-group/events/303638814) - December 3
5050
* [New York Meetup](https://www.meetup.com/clickhouse-new-york-user-group/events/304268174) - December 9
51+
* [San Francisco Meetup](https://www.meetup.com/clickhouse-silicon-valley-meetup-group/events/304286951/) - December 12
5152

5253
Recently completed meetups
5354

5455
* [Madrid Meetup](https://www.meetup.com/clickhouse-spain-user-group/events/303096564/) - October 22
5556
* [Singapore Meetup](https://www.meetup.com/clickhouse-singapore-meetup-group/events/303212064/) - October 3
5657
* [Jakarta Meetup](https://www.meetup.com/clickhouse-indonesia-user-group/events/303191359/) - October 1
57-
* [ClickHouse Guangzhou User Group Meetup](https://mp.weixin.qq.com/s/GSvo-7xUoVzCsuUvlLTpCw) - August 25
58-
* [Seattle Meetup (Statsig)](https://www.meetup.com/clickhouse-seattle-user-group/events/302518075/) - August 27
59-
* [Melbourne Meetup](https://www.meetup.com/clickhouse-australia-user-group/events/302732666/) - August 27
60-
* [Sydney Meetup](https://www.meetup.com/clickhouse-australia-user-group/events/302862966/) - September 5
61-
* [Zurich Meetup](https://www.meetup.com/clickhouse-switzerland-meetup-group/events/302267429/) - September 5
62-
* [San Francisco Meetup (Cloudflare)](https://www.meetup.com/clickhouse-silicon-valley-meetup-group/events/302540575) - September 5
63-
* [Raleigh Meetup (Deutsche Bank)](https://www.meetup.com/triangletechtalks/events/302723486/) - September 9
64-
* [New York Meetup (Rokt)](https://www.meetup.com/clickhouse-new-york-user-group/events/302575342) - September 10
65-
* [Toronto Meetup (Shopify)](https://www.meetup.com/clickhouse-toronto-user-group/events/301490855/) - September 10
66-
* [Chicago Meetup (Jump Capital)](https://lu.ma/43tvmrfw) - September 12
67-
* [London Meetup](https://www.meetup.com/clickhouse-london-user-group/events/302977267) - September 17
68-
* [Austin Meetup](https://www.meetup.com/clickhouse-austin-user-group/events/302558689/) - September 17
69-
* [Bangalore Meetup](https://www.meetup.com/clickhouse-bangalore-user-group/events/303208274/) - September 18
70-
* [Tel Aviv Meetup](https://www.meetup.com/clickhouse-meetup-israel/events/303095121) - September 22
7158

7259
## Recent Recordings
7360
* **Recent Meetup Videos**: [Meetup Playlist](https://www.youtube.com/playlist?list=PL0Z2YDlm0b3iNDUzpY1S3L_iV4nARda_U) Whenever possible recordings of the ClickHouse Community Meetups are edited and presented as individual talks. Current featuring "Modern SQL in 2023", "Fast, Concurrent, and Consistent Asynchronous INSERTS in ClickHouse", and "Full-Text Indices: Design and Experiments"

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.10 | ✔️ |
1718
| 24.9 | ✔️ |
1819
| 24.8 | ✔️ |
19-
| 24.7 | ✔️ |
20+
| 24.7 | |
2021
| 24.6 ||
2122
| 24.5 ||
2223
| 24.4 ||

base/base/StringRef.h

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ using StringRefs = std::vector<StringRef>;
8686
* For more information, see hash_map_string_2.cpp
8787
*/
8888

89-
inline bool compare8(const char * p1, const char * p2)
89+
inline bool compare16(const char * p1, const char * p2)
9090
{
9191
return 0xFFFF == _mm_movemask_epi8(_mm_cmpeq_epi8(
9292
_mm_loadu_si128(reinterpret_cast<const __m128i *>(p1)),
@@ -115,7 +115,7 @@ inline bool compare64(const char * p1, const char * p2)
115115

116116
#elif defined(__aarch64__) && defined(__ARM_NEON)
117117

118-
inline bool compare8(const char * p1, const char * p2)
118+
inline bool compare16(const char * p1, const char * p2)
119119
{
120120
uint64_t mask = getNibbleMask(vceqq_u8(
121121
vld1q_u8(reinterpret_cast<const unsigned char *>(p1)), vld1q_u8(reinterpret_cast<const unsigned char *>(p2))));
@@ -185,13 +185,22 @@ inline bool memequalWide(const char * p1, const char * p2, size_t size)
185185

186186
switch (size / 16) // NOLINT(bugprone-switch-missing-default-case)
187187
{
188-
case 3: if (!compare8(p1 + 32, p2 + 32)) return false; [[fallthrough]];
189-
case 2: if (!compare8(p1 + 16, p2 + 16)) return false; [[fallthrough]];
190-
case 1: if (!compare8(p1, p2)) return false; [[fallthrough]];
188+
case 3:
189+
if (!compare16(p1 + 32, p2 + 32))
190+
return false;
191+
[[fallthrough]];
192+
case 2:
193+
if (!compare16(p1 + 16, p2 + 16))
194+
return false;
195+
[[fallthrough]];
196+
case 1:
197+
if (!compare16(p1, p2))
198+
return false;
199+
[[fallthrough]];
191200
default: ;
192201
}
193202

194-
return compare8(p1 + size - 16, p2 + size - 16);
203+
return compare16(p1 + size - 16, p2 + size - 16);
195204
}
196205

197206
#endif

base/base/chrono_io.h

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,14 @@
44
#include <string>
55
#include <sstream>
66
#include <cctz/time_zone.h>
7+
#include <fmt/core.h>
78

89

910
inline std::string to_string(const std::time_t & time)
1011
{
1112
return cctz::format("%Y-%m-%d %H:%M:%S", std::chrono::system_clock::from_time_t(time), cctz::local_time_zone());
1213
}
1314

14-
template <typename Clock, typename Duration = typename Clock::duration>
15-
std::string to_string(const std::chrono::time_point<Clock, Duration> & tp)
16-
{
17-
// Don't use DateLUT because it shows weird characters for
18-
// TimePoint::max(). I wish we could use C++20 format, but it's not
19-
// there yet.
20-
// return DateLUT::instance().timeToString(std::chrono::system_clock::to_time_t(tp));
21-
22-
auto in_time_t = std::chrono::system_clock::to_time_t(tp);
23-
return to_string(in_time_t);
24-
}
25-
2615
template <typename Rep, typename Period = std::ratio<1>>
2716
std::string to_string(const std::chrono::duration<Rep, Period> & duration)
2817
{
@@ -33,6 +22,20 @@ std::string to_string(const std::chrono::duration<Rep, Period> & duration)
3322
return std::to_string(seconds_as_double.count()) + "s";
3423
}
3524

25+
template <typename Clock, typename Duration = typename Clock::duration>
26+
std::string to_string(const std::chrono::time_point<Clock, Duration> & tp)
27+
{
28+
// Don't use DateLUT because it shows weird characters for
29+
// TimePoint::max(). I wish we could use C++20 format, but it's not
30+
// there yet.
31+
// return DateLUT::instance().timeToString(std::chrono::system_clock::to_time_t(tp));
32+
33+
if constexpr (std::is_same_v<Clock, std::chrono::system_clock>)
34+
return to_string(std::chrono::system_clock::to_time_t(tp));
35+
else
36+
return to_string(tp.time_since_epoch());
37+
}
38+
3639
template <typename Clock, typename Duration = typename Clock::duration>
3740
std::ostream & operator<<(std::ostream & o, const std::chrono::time_point<Clock, Duration> & tp)
3841
{
@@ -44,3 +47,23 @@ std::ostream & operator<<(std::ostream & o, const std::chrono::duration<Rep, Per
4447
{
4548
return o << to_string(duration);
4649
}
50+
51+
template <typename Clock, typename Duration>
52+
struct fmt::formatter<std::chrono::time_point<Clock, Duration>> : fmt::formatter<std::string>
53+
{
54+
template <typename FormatCtx>
55+
auto format(const std::chrono::time_point<Clock, Duration> & tp, FormatCtx & ctx) const
56+
{
57+
return fmt::formatter<std::string>::format(::to_string(tp), ctx);
58+
}
59+
};
60+
61+
template <typename Rep, typename Period>
62+
struct fmt::formatter<std::chrono::duration<Rep, Period>> : fmt::formatter<std::string>
63+
{
64+
template <typename FormatCtx>
65+
auto format(const std::chrono::duration<Rep, Period> & duration, FormatCtx & ctx) const
66+
{
67+
return fmt::formatter<std::string>::format(::to_string(duration), ctx);
68+
}
69+
};

contrib/SimSIMD

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
set(SIMSIMD_PROJECT_DIR "${ClickHouse_SOURCE_DIR}/contrib/SimSIMD")
2-
3-
add_library(_simsimd INTERFACE)
4-
target_include_directories(_simsimd SYSTEM INTERFACE "${SIMSIMD_PROJECT_DIR}/include")
1+
# See contrib/usearch-cmake/CMakeLists.txt, why only enabled on x86
2+
if (ARCH_AMD64)
3+
set(SIMSIMD_PROJECT_DIR "${ClickHouse_SOURCE_DIR}/contrib/SimSIMD")
4+
set(SIMSIMD_SRCS ${SIMSIMD_PROJECT_DIR}/c/lib.c)
5+
add_library(_simsimd ${SIMSIMD_SRCS})
6+
target_include_directories(_simsimd SYSTEM PUBLIC "${SIMSIMD_PROJECT_DIR}/include")
7+
target_compile_definitions(_simsimd PUBLIC SIMSIMD_DYNAMIC_DISPATCH)
8+
endif()

0 commit comments

Comments
 (0)