aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-contrib <robot-contrib@yandex-team.com>2025-06-05 14:27:07 +0300
committerrobot-contrib <robot-contrib@yandex-team.com>2025-06-05 14:54:48 +0300
commit969a8d37f07078ab66cc458e48972d8138d6e717 (patch)
tree80d0245ae1b44a1288c512bcd6a912722014431f
parent5100d3c0b23af4b8f5ade9b174de774758a03605 (diff)
downloadydb-969a8d37f07078ab66cc458e48972d8138d6e717.tar.gz
Update contrib/libs/simdjson to 3.13.0
commit_hash:c30203c3ffe630324436789272f0d65d573575bc
-rw-r--r--contrib/libs/simdjson/.yandex_meta/devtools.licenses.report30
-rw-r--r--contrib/libs/simdjson/.yandex_meta/override.nix4
-rw-r--r--contrib/libs/simdjson/README.md1
-rw-r--r--contrib/libs/simdjson/include/simdjson/common_defs.h5
-rw-r--r--contrib/libs/simdjson/include/simdjson/error-inl.h17
-rw-r--r--contrib/libs/simdjson/include/simdjson/error.h13
-rw-r--r--contrib/libs/simdjson/include/simdjson/generic/numberparsing.h17
-rw-r--r--contrib/libs/simdjson/include/simdjson/jsonpathutil.h2
-rw-r--r--contrib/libs/simdjson/include/simdjson/simdjson_version.h6
-rw-r--r--contrib/libs/simdjson/ya.make4
10 files changed, 73 insertions, 26 deletions
diff --git a/contrib/libs/simdjson/.yandex_meta/devtools.licenses.report b/contrib/libs/simdjson/.yandex_meta/devtools.licenses.report
index 2aad6abcfaf..6260792f9c9 100644
--- a/contrib/libs/simdjson/.yandex_meta/devtools.licenses.report
+++ b/contrib/libs/simdjson/.yandex_meta/devtools.licenses.report
@@ -42,7 +42,7 @@ BELONGS ya.make
Match type : REFERENCE
Links : http://www.boost.org/LICENSE_1_0.txt, http://www.boost.org/users/license.html, https://spdx.org/licenses/BSL-1.0
Files with this license:
- README.md [235:235]
+ README.md [236:236]
KEEP MIT 0a00f0d66f4f37595306dd8c6a25c63c
BELONGS ya.make
@@ -54,7 +54,7 @@ BELONGS ya.make
Match type : NOTICE
Links : http://opensource.org/licenses/mit-license.php, https://spdx.org/licenses/MIT
Files with this license:
- README.md [231:231]
+ README.md [232:232]
SKIP LicenseRef-scancode-unknown-license-reference 0d48e0b09865a98a90db20ea37b36bb8
BELONGS ya.make
@@ -66,7 +66,7 @@ BELONGS ya.make
Match type : INTRO
Links : https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/unknown-license-reference.LICENSE
Files with this license:
- README.md [239:239]
+ README.md [240:240]
KEEP Apache-2.0 13ec3cccf3036f38df47d2051a825972
BELONGS ya.make
@@ -102,7 +102,7 @@ BELONGS ya.make
Match type : REFERENCE
Links : http://www.apache.org/licenses/, http://www.apache.org/licenses/LICENSE-2.0, https://spdx.org/licenses/Apache-2.0
Files with this license:
- README.md [215:215]
+ README.md [216:216]
SKIP BSL-1.0 2a9212d785cde4078c2f6803e544de21
BELONGS ya.make
@@ -113,7 +113,7 @@ BELONGS ya.make
Match type : REFERENCE
Links : http://www.boost.org/LICENSE_1_0.txt, http://www.boost.org/users/license.html, https://spdx.org/licenses/BSL-1.0
Files with this license:
- README.md [235:235]
+ README.md [236:236]
KEEP MIT 3e1ede6948a97e7ee3d75e0204a567f3
BELONGS ya.make
@@ -125,7 +125,7 @@ BELONGS ya.make
Match type : TAG
Links : http://opensource.org/licenses/mit-license.php, https://spdx.org/licenses/MIT
Files with this license:
- README.md [219:219]
+ README.md [220:220]
SKIP Apache-2.0 500a503129337bb5adf5977ce11879cd
BELONGS ya.make
@@ -137,7 +137,7 @@ BELONGS ya.make
Match type : NOTICE
Links : http://www.apache.org/licenses/, http://www.apache.org/licenses/LICENSE-2.0, https://spdx.org/licenses/Apache-2.0
Files with this license:
- README.md [231:231]
+ README.md [232:232]
SKIP BSL-1.0 77dd56e30840a227692d435b4aecdb95
BELONGS ya.make
@@ -148,11 +148,11 @@ BELONGS ya.make
Match type : REFERENCE
Links : http://www.boost.org/LICENSE_1_0.txt, http://www.boost.org/users/license.html, https://spdx.org/licenses/BSL-1.0
Files with this license:
- README.md [235:235]
+ README.md [236:236]
KEEP MIT 7f0bdbc0a0545831259b66259ac6b604
BELONGS ya.make
-FILE_INCLUDE LICENSE-MIT found in files: README.md at line 218
+FILE_INCLUDE LICENSE-MIT found in files: README.md at line 219
License text:
[licensemit]: LICENSE-MIT
Scancode info:
@@ -161,7 +161,7 @@ FILE_INCLUDE LICENSE-MIT found in files: README.md at line 218
Match type : TAG
Links : http://opensource.org/licenses/mit-license.php, https://spdx.org/licenses/MIT
Files with this license:
- README.md [218:218]
+ README.md [219:219]
KEEP Apache-2.0 82e76bbc1841bd5886297e795c72bfa5
BELONGS ya.make
@@ -173,7 +173,7 @@ BELONGS ya.make
Match type : REFERENCE
Links : http://www.apache.org/licenses/, http://www.apache.org/licenses/LICENSE-2.0, https://spdx.org/licenses/Apache-2.0
Files with this license:
- README.md [231:231]
+ README.md [232:232]
KEEP MIT a6e9f2d79eb73e6e422759b53da6152a
BELONGS ya.make
@@ -208,7 +208,7 @@ BELONGS ya.make
Match type : NOTICE
Links : http://opensource.org/licenses/mit-license.php, https://spdx.org/licenses/MIT
Files with this license:
- README.md [237:237]
+ README.md [238:238]
SKIP Apache-2.0 c23a044f4165feb9568f486ca3b30fc8
BELONGS ya.make
@@ -219,7 +219,7 @@ BELONGS ya.make
Match type : NOTICE
Links : http://www.apache.org/licenses/, http://www.apache.org/licenses/LICENSE-2.0, https://spdx.org/licenses/Apache-2.0
Files with this license:
- README.md [235:235]
+ README.md [236:236]
SKIP BSD-3-Clause d77bd60dc7ee5f9c3b221f6edd94bbac
BELONGS ya.make
@@ -231,7 +231,7 @@ BELONGS ya.make
Match type : REFERENCE
Links : http://www.opensource.org/licenses/BSD-3-Clause, https://spdx.org/licenses/BSD-3-Clause
Files with this license:
- README.md [239:239]
+ README.md [240:240]
SKIP MIT dd09705e3ec59af63c705c8f5f3eadb2
BELONGS ya.make
@@ -243,7 +243,7 @@ BELONGS ya.make
Match type : REFERENCE
Links : http://opensource.org/licenses/mit-license.php, https://spdx.org/licenses/MIT
Files with this license:
- README.md [233:233]
+ README.md [234:234]
KEEP MIT f0fe4686586f118327c3bc63fe4027de
BELONGS ya.make
diff --git a/contrib/libs/simdjson/.yandex_meta/override.nix b/contrib/libs/simdjson/.yandex_meta/override.nix
index a34855ca870..00b337777ac 100644
--- a/contrib/libs/simdjson/.yandex_meta/override.nix
+++ b/contrib/libs/simdjson/.yandex_meta/override.nix
@@ -1,11 +1,11 @@
pkgs: attrs: with pkgs; rec {
- version = "3.12.3";
+ version = "3.13.0";
src = fetchFromGitHub {
owner = "simdjson";
repo = "simdjson";
rev = "v${version}";
- hash = "sha256-/FfaM5BTWKrt2m70+VcUXz//RiZuzxnUOaHOjPJWsGw=";
+ hash = "sha256-Vzw1FpFjg3Tun1Sfk7H4h4tY7lfnjE1Wk+W82K7dcW0=";
};
cmakeFlags = attrs.cmakeFlags ++ [
diff --git a/contrib/libs/simdjson/README.md b/contrib/libs/simdjson/README.md
index d187a54b417..87f2263c33e 100644
--- a/contrib/libs/simdjson/README.md
+++ b/contrib/libs/simdjson/README.md
@@ -63,6 +63,7 @@ Real-world usage
- [fastgron](https://github.com/adamritter/fastgron)
- [WasmEdge](https://wasmedge.org)
- [RonDB](https://github.com/logicalclocks/rondb)
+- [GreptimeDB](https://github.com/GreptimeTeam/greptimedb)
If you are planning to use simdjson in a product, please work from one of our releases.
diff --git a/contrib/libs/simdjson/include/simdjson/common_defs.h b/contrib/libs/simdjson/include/simdjson/common_defs.h
index d0ae083ecba..336a79b8416 100644
--- a/contrib/libs/simdjson/include/simdjson/common_defs.h
+++ b/contrib/libs/simdjson/include/simdjson/common_defs.h
@@ -23,7 +23,7 @@ double from_chars(const char *first, const char* end) noexcept;
}
#ifndef SIMDJSON_EXCEPTIONS
-#if __cpp_exceptions
+#if defined(__cpp_exceptions) || defined(_CPPUNWIND)
#define SIMDJSON_EXCEPTIONS 1
#else
#define SIMDJSON_EXCEPTIONS 0
@@ -226,12 +226,14 @@ double from_chars(const char *first, const char* end) noexcept;
// even if we do not have C++17 support.
#ifdef __cpp_lib_string_view
#define SIMDJSON_HAS_STRING_VIEW
+#include <string_view>
#endif
// Some systems have string_view even if we do not have C++17 support,
// and even if __cpp_lib_string_view is undefined, it is the case
// with Apple clang version 11.
// We must handle it. *This is important.*
+#ifndef _MSC_VER
#ifndef SIMDJSON_HAS_STRING_VIEW
#if defined __has_include
// do not combine the next #if with the previous one (unsafe)
@@ -247,6 +249,7 @@ double from_chars(const char *first, const char* end) noexcept;
#endif // __has_include (<string_view>)
#endif // defined __has_include
#endif // def SIMDJSON_HAS_STRING_VIEW
+#endif // def _MSC_VER
// end of complicated but important routine to try to detect string_view.
//
diff --git a/contrib/libs/simdjson/include/simdjson/error-inl.h b/contrib/libs/simdjson/include/simdjson/error-inl.h
index fe6bf66db0c..73bd4a39d27 100644
--- a/contrib/libs/simdjson/include/simdjson/error-inl.h
+++ b/contrib/libs/simdjson/include/simdjson/error-inl.h
@@ -133,6 +133,23 @@ simdjson_warn_unused simdjson_inline error_code simdjson_result<T>::get(T &value
}
template<typename T>
+simdjson_warn_unused simdjson_inline error_code
+simdjson_result<T>::get(std::string &value) && noexcept
+#if SIMDJSON_SUPPORTS_DESERIALIZATION
+requires (!std::is_same_v<T, std::string>)
+#endif // SIMDJSON_SUPPORTS_DESERIALIZATION
+{
+ // SFINAE : n'active que pour T = std::string_view
+ static_assert(std::is_same<T, std::string_view>::value, "simdjson_result<T>::get(std::string&) n'est disponible que pour T = std::string_view");
+ std::string_view v;
+ error_code error = std::forward<simdjson_result<T>>(*this).get(v);
+ if (!error) {
+ value.assign(v.data(), v.size());
+ }
+ return error;
+}
+
+template<typename T>
simdjson_inline error_code simdjson_result<T>::error() const noexcept {
return internal::simdjson_result_base<T>::error();
}
diff --git a/contrib/libs/simdjson/include/simdjson/error.h b/contrib/libs/simdjson/include/simdjson/error.h
index 4d963d4c248..e2f86f5e7e1 100644
--- a/contrib/libs/simdjson/include/simdjson/error.h
+++ b/contrib/libs/simdjson/include/simdjson/error.h
@@ -196,6 +196,7 @@ struct simdjson_result_base : protected std::pair<T, error_code> {
* @throw simdjson_error if there was an error.
*/
simdjson_inline operator T&&() && noexcept(false);
+
#endif // SIMDJSON_EXCEPTIONS
/**
@@ -252,7 +253,17 @@ struct simdjson_result : public internal::simdjson_result_base<T> {
* @param value The variable to assign the value to. May not be set if there is an error.
*/
simdjson_warn_unused simdjson_inline error_code get(T &value) && noexcept;
-
+//
+ /**
+ * Copy the value to a provided std::string, only enabled for std::string_view.
+ *
+ * @param value The variable to assign the value to. May not be set if there is an error.
+ */
+ simdjson_warn_unused simdjson_inline error_code get(std::string &value) && noexcept
+#if SIMDJSON_SUPPORTS_DESERIALIZATION
+ requires (!std::is_same_v<T, std::string>)
+#endif // SIMDJSON_SUPPORTS_DESERIALIZATION
+ ;
/**
* The error.
*/
diff --git a/contrib/libs/simdjson/include/simdjson/generic/numberparsing.h b/contrib/libs/simdjson/include/simdjson/generic/numberparsing.h
index a6d96d0ba95..9a841013ebe 100644
--- a/contrib/libs/simdjson/include/simdjson/generic/numberparsing.h
+++ b/contrib/libs/simdjson/include/simdjson/generic/numberparsing.h
@@ -647,7 +647,16 @@ simdjson_inline error_code parse_number(const uint8_t *const src, W &writer) {
if (i > uint64_t(INT64_MAX)) {
WRITE_UNSIGNED(i, src, writer);
} else {
- WRITE_INTEGER(negative ? (~i+1) : i, src, writer);
+#if SIMDJSON_MINUS_ZERO_AS_FLOAT
+ if(i == 0 && negative) {
+ // We have to write -0.0 instead of 0
+ WRITE_DOUBLE(-0.0, src, writer);
+ } else {
+ WRITE_INTEGER(negative ? (~i+1) : i, src, writer);
+ }
+#else
+ WRITE_INTEGER(negative ? (~i+1) : i, src, writer);
+#endif
}
if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); }
return SUCCESS;
@@ -1108,6 +1117,12 @@ simdjson_unused simdjson_inline simdjson_result<number_type> get_number_type(con
if (simdjson_unlikely(digit_count == 19 && memcmp(src, smaller_big_integer, 19) > 0)) {
return number_type::big_integer;
}
+#if SIMDJSON_MINUS_ZERO_AS_FLOAT
+ if(digit_count == 1 && src[0] == '0') {
+ // We have to write -0.0 instead of 0
+ return number_type::floating_point_number;
+ }
+#endif
return number_type::signed_integer;
}
// Let us check if we have a big integer (>=2**64).
diff --git a/contrib/libs/simdjson/include/simdjson/jsonpathutil.h b/contrib/libs/simdjson/include/simdjson/jsonpathutil.h
index afcc74ccc1f..557ccdcb9c6 100644
--- a/contrib/libs/simdjson/include/simdjson/jsonpathutil.h
+++ b/contrib/libs/simdjson/include/simdjson/jsonpathutil.h
@@ -2,7 +2,7 @@
#define SIMDJSON_JSONPATHUTIL_H
#include <string>
-#include <string_view>
+#include "simdjson/common_defs.h"
namespace simdjson {
/**
diff --git a/contrib/libs/simdjson/include/simdjson/simdjson_version.h b/contrib/libs/simdjson/include/simdjson/simdjson_version.h
index d71abe45233..f06aa81f9bf 100644
--- a/contrib/libs/simdjson/include/simdjson/simdjson_version.h
+++ b/contrib/libs/simdjson/include/simdjson/simdjson_version.h
@@ -4,7 +4,7 @@
#define SIMDJSON_SIMDJSON_VERSION_H
/** The version of simdjson being used (major.minor.revision) */
-#define SIMDJSON_VERSION "3.12.3"
+#define SIMDJSON_VERSION "3.13.0"
namespace simdjson {
enum {
@@ -15,11 +15,11 @@ enum {
/**
* The minor version (major.MINOR.revision) of simdjson being used.
*/
- SIMDJSON_VERSION_MINOR = 12,
+ SIMDJSON_VERSION_MINOR = 13,
/**
* The revision (major.minor.REVISION) of simdjson being used.
*/
- SIMDJSON_VERSION_REVISION = 3
+ SIMDJSON_VERSION_REVISION = 0
};
} // namespace simdjson
diff --git a/contrib/libs/simdjson/ya.make b/contrib/libs/simdjson/ya.make
index 0b5c9dc6750..cb165b6416b 100644
--- a/contrib/libs/simdjson/ya.make
+++ b/contrib/libs/simdjson/ya.make
@@ -10,9 +10,9 @@ LICENSE(
LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
-VERSION(3.12.3)
+VERSION(3.13.0)
-ORIGINAL_SOURCE(https://github.com/simdjson/simdjson/archive/v3.12.3.tar.gz)
+ORIGINAL_SOURCE(https://github.com/simdjson/simdjson/archive/v3.13.0.tar.gz)
ADDINCL(
GLOBAL contrib/libs/simdjson/include