summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorrobot-contrib <[email protected]>2025-06-20 11:22:25 +0300
committerrobot-contrib <[email protected]>2025-06-20 11:39:13 +0300
commit73c10e2d20b77e0980f0f9f155fa8fca5ba929a9 (patch)
tree15253afe471632e60dacecdde8a6ed8a9bff1b44 /contrib
parentebd84bd2813228ef7eed2d6f64d1186b5fae95d3 (diff)
Update contrib/libs/croaring to 4.3.5
commit_hash:fc7197a85c0a70a757d2a351b0cb083bc1d239f0
Diffstat (limited to 'contrib')
-rw-r--r--contrib/libs/croaring/.yandex_meta/override.nix4
-rw-r--r--contrib/libs/croaring/README.md4
-rw-r--r--contrib/libs/croaring/cpp/roaring64map.hh9
-rw-r--r--contrib/libs/croaring/include/roaring/roaring_version.h4
-rw-r--r--contrib/libs/croaring/src/containers/run.c4
-rw-r--r--contrib/libs/croaring/src/roaring64.c10
-rw-r--r--contrib/libs/croaring/ya.make4
7 files changed, 24 insertions, 15 deletions
diff --git a/contrib/libs/croaring/.yandex_meta/override.nix b/contrib/libs/croaring/.yandex_meta/override.nix
index 7c71636d7d5..61730a52030 100644
--- a/contrib/libs/croaring/.yandex_meta/override.nix
+++ b/contrib/libs/croaring/.yandex_meta/override.nix
@@ -1,12 +1,12 @@
pkgs: attrs: with pkgs; with attrs; rec {
pname = "croaring";
- version = "4.3.4";
+ version = "4.3.5";
src = fetchFromGitHub {
owner = "RoaringBitmap";
repo = "CRoaring";
rev = "v${version}";
- hash = "sha256-w3GU91mOjbU5PzDy7L7Pu4fY2pDloFo6UBllYkLII2k=";
+ hash = "sha256-MNBlKAosKZ4wV3vbas77rfGOjTlWxTyluQYaFhES3Ro=";
};
patches = [];
diff --git a/contrib/libs/croaring/README.md b/contrib/libs/croaring/README.md
index 8aae6036733..fce176e1f04 100644
--- a/contrib/libs/croaring/README.md
+++ b/contrib/libs/croaring/README.md
@@ -48,7 +48,7 @@ Bitsets, also called bitmaps, are commonly used as fast data structures. Unfortu
Roaring bitmaps are compressed bitmaps which tend to outperform conventional compressed bitmaps such as WAH, EWAH or Concise.
They are used by several major systems such as [Apache Lucene][lucene] and derivative systems such as [Solr][solr] and
-[Elasticsearch][elasticsearch], [Metamarkets' Druid][druid], [LinkedIn Pinot][pinot], [Netflix Atlas][atlas], [Apache Spark][spark], [OpenSearchServer][opensearchserver], [Cloud Torrent][cloudtorrent], [Whoosh][whoosh], [InfluxDB](https://www.influxdata.com), [Pilosa][pilosa], [Bleve](http://www.blevesearch.com), [Microsoft Visual Studio Team Services (VSTS)][vsts], and eBay's [Apache Kylin][kylin]. The CRoaring library is used in several systems such as [Apache Doris](http://doris.incubator.apache.org), [ClickHouse](https://github.com/ClickHouse/ClickHouse), [Redpanda](https://github.com/redpanda-data/redpanda), and [StarRocks](https://github.com/StarRocks/starrocks). The YouTube SQL Engine, [Google Procella](https://research.google/pubs/pub48388/), uses Roaring bitmaps for indexing.
+[Elasticsearch][elasticsearch], [Metamarkets' Druid][druid], [LinkedIn Pinot][pinot], [Netflix Atlas][atlas], [Apache Spark][spark], [OpenSearchServer][opensearchserver], [Cloud Torrent][cloudtorrent], [Whoosh][whoosh], [InfluxDB](https://www.influxdata.com), [Pilosa][pilosa], [Bleve](http://www.blevesearch.com), [Microsoft Visual Studio Team Services (VSTS)][vsts], and eBay's [Apache Kylin][kylin]. The CRoaring library is used in several systems such as [Apache Doris](http://doris.incubator.apache.org), [ClickHouse](https://github.com/ClickHouse/ClickHouse), [Redpanda](https://github.com/redpanda-data/redpanda), [YDB](https://ydb.tech), and [StarRocks](https://github.com/StarRocks/starrocks). The YouTube SQL Engine, [Google Procella](https://research.google/pubs/pub48388/), uses Roaring bitmaps for indexing.
We published a peer-reviewed article on the design and evaluation of this library:
@@ -1168,7 +1168,7 @@ https://groups.google.com/forum/#!forum/roaring-bitmaps
# Contributing
-When contributing a change to the project, please run `tools/clang-format.sh` after making any changes. A github action runs on all PRs to ensure formatting is consistent with this.
+When contributing a change to the project, please run `tools/run-clangcldocker.sh` after making any changes. A github action runs on all PRs to ensure formatting is consistent with this.
# References about Roaring
diff --git a/contrib/libs/croaring/cpp/roaring64map.hh b/contrib/libs/croaring/cpp/roaring64map.hh
index 7de53cbd45a..9f23a768e7d 100644
--- a/contrib/libs/croaring/cpp/roaring64map.hh
+++ b/contrib/libs/croaring/cpp/roaring64map.hh
@@ -11,6 +11,7 @@
#include <algorithm>
#include <cinttypes> // PRIu64 macro
+#include <climits> // for UINT64_MAX
#include <cstdarg> // for va_list handling in bitmapOf()
#include <cstdio> // for std::printf() in the printf() method
#include <cstring> // for std::memcpy()
@@ -781,6 +782,9 @@ class Roaring64Map {
* Returns true if the bitmap is full (cardinality is max uint64_t + 1).
*/
bool isFull() const {
+ // This function is somewhat absurd. A full 64-bit bitmap would surely
+ // exceed our memory limits.
+#if SIZE_MAX >= UINT64_MAX
// only bother to check if map is fully saturated
//
// we put std::numeric_limits<>::max/min in parentheses
@@ -793,6 +797,11 @@ class Roaring64Map {
return roaring_map_entry.second.isFull();
})
: false;
+#else
+ // if SIZE_MAX < UINT64_MAX, then we cannot represent a full bitmap
+ // in a 64-bit integer, so we return false.
+ return false;
+#endif
}
/**
diff --git a/contrib/libs/croaring/include/roaring/roaring_version.h b/contrib/libs/croaring/include/roaring/roaring_version.h
index 4bb709088f7..a9ee0f9ac43 100644
--- a/contrib/libs/croaring/include/roaring/roaring_version.h
+++ b/contrib/libs/croaring/include/roaring/roaring_version.h
@@ -2,11 +2,11 @@
// /include/roaring/roaring_version.h automatically generated by release.py, do not change by hand
#ifndef ROARING_INCLUDE_ROARING_VERSION
#define ROARING_INCLUDE_ROARING_VERSION
-#define ROARING_VERSION "4.3.4"
+#define ROARING_VERSION "4.3.5"
enum {
ROARING_VERSION_MAJOR = 4,
ROARING_VERSION_MINOR = 3,
- ROARING_VERSION_REVISION = 4
+ ROARING_VERSION_REVISION = 5
};
#endif // ROARING_INCLUDE_ROARING_VERSION
// clang-format on \ No newline at end of file
diff --git a/contrib/libs/croaring/src/containers/run.c b/contrib/libs/croaring/src/containers/run.c
index 9c6b7a4a734..eda671f72c2 100644
--- a/contrib/libs/croaring/src/containers/run.c
+++ b/contrib/libs/croaring/src/containers/run.c
@@ -157,7 +157,7 @@ void run_container_offset(const run_container_t *c, container_t **loc,
lo = run_container_create_given_capacity(lo_cap);
memcpy(lo->runs, c->runs, lo_cap * sizeof(rle16_t));
lo->n_runs = lo_cap;
- for (int i = 0; i < lo_cap; ++i) {
+ for (unsigned int i = 0; i < lo_cap; ++i) {
lo->runs[i].value += offset;
}
*loc = (container_t *)lo;
@@ -167,7 +167,7 @@ void run_container_offset(const run_container_t *c, container_t **loc,
hi = run_container_create_given_capacity(hi_cap);
memcpy(hi->runs, c->runs + pivot, hi_cap * sizeof(rle16_t));
hi->n_runs = hi_cap;
- for (int i = 0; i < hi_cap; ++i) {
+ for (unsigned int i = 0; i < hi_cap; ++i) {
hi->runs[i].value += offset;
}
*hic = (container_t *)hi;
diff --git a/contrib/libs/croaring/src/roaring64.c b/contrib/libs/croaring/src/roaring64.c
index 0d0e818d66e..c9cb2f48747 100644
--- a/contrib/libs/croaring/src/roaring64.c
+++ b/contrib/libs/croaring/src/roaring64.c
@@ -129,8 +129,8 @@ static void extend_containers(roaring64_bitmap_t *r) {
new_capacity = 5 * r->capacity / 4;
}
uint64_t increase = new_capacity - r->capacity;
- r->containers =
- roaring_realloc(r->containers, new_capacity * sizeof(container_t *));
+ r->containers = (container_t **)roaring_realloc(
+ r->containers, new_capacity * sizeof(container_t *));
memset(r->containers + r->capacity, 0, increase * sizeof(container_t *));
r->capacity = new_capacity;
}
@@ -987,8 +987,8 @@ size_t roaring64_bitmap_shrink_to_fit(roaring64_bitmap_t *r) {
}
uint64_t new_capacity = r->first_free;
if (new_capacity < r->capacity) {
- r->containers = roaring_realloc(r->containers,
- new_capacity * sizeof(container_t *));
+ r->containers = (container_t **)roaring_realloc(
+ r->containers, new_capacity * sizeof(container_t *));
freed += (r->capacity - new_capacity) * sizeof(container_t *);
r->capacity = new_capacity;
}
@@ -2454,7 +2454,7 @@ roaring64_bitmap_t *roaring64_bitmap_frozen_view(const char *buf,
maxbytes -= sizeof(r->capacity);
r->containers =
- (container_t *)roaring_malloc(r->capacity * sizeof(container_t *));
+ (container_t **)roaring_malloc(r->capacity * sizeof(container_t *));
// Container element counts.
if (maxbytes < r->capacity * sizeof(uint16_t)) {
diff --git a/contrib/libs/croaring/ya.make b/contrib/libs/croaring/ya.make
index 751b5707c55..7be4ed8883a 100644
--- a/contrib/libs/croaring/ya.make
+++ b/contrib/libs/croaring/ya.make
@@ -10,9 +10,9 @@ LICENSE(
LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
-VERSION(4.3.4)
+VERSION(4.3.5)
-ORIGINAL_SOURCE(https://github.com/RoaringBitmap/CRoaring/archive/v4.3.4.tar.gz)
+ORIGINAL_SOURCE(https://github.com/RoaringBitmap/CRoaring/archive/v4.3.5.tar.gz)
ADDINCL(
GLOBAL contrib/libs/croaring/include