mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-03 13:02:00 +00:00
Update used version of simdjson to 0.9.1
This commit is contained in:
parent
37ce6e26d3
commit
1f4df07e08
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -93,7 +93,7 @@
|
||||
url = https://github.com/ClickHouse-Extras/libunwind.git
|
||||
[submodule "contrib/simdjson"]
|
||||
path = contrib/simdjson
|
||||
url = https://github.com/ClickHouse-Extras/simdjson.git
|
||||
url = https://github.com/simdjson/simdjson.git
|
||||
[submodule "contrib/rapidjson"]
|
||||
path = contrib/rapidjson
|
||||
url = https://github.com/ClickHouse-Extras/rapidjson
|
||||
|
2
contrib/simdjson
vendored
2
contrib/simdjson
vendored
@ -1 +1 @@
|
||||
Subproject commit 3190d66a49059092a1753dc35595923debfc1698
|
||||
Subproject commit 95b4870e20be5f97d9dcf63b23b1c6f520c366c1
|
@ -42,11 +42,11 @@ struct SimdJSONParser
|
||||
ALWAYS_INLINE bool isBool() const { return element.type() == simdjson::dom::element_type::BOOL; }
|
||||
ALWAYS_INLINE bool isNull() const { return element.type() == simdjson::dom::element_type::NULL_VALUE; }
|
||||
|
||||
ALWAYS_INLINE Int64 getInt64() const { return element.get_int64().first; }
|
||||
ALWAYS_INLINE UInt64 getUInt64() const { return element.get_uint64().first; }
|
||||
ALWAYS_INLINE double getDouble() const { return element.get_double().first; }
|
||||
ALWAYS_INLINE bool getBool() const { return element.get_bool().first; }
|
||||
ALWAYS_INLINE std::string_view getString() const { return element.get_string().first; }
|
||||
ALWAYS_INLINE Int64 getInt64() const { return element.get_int64().value_unsafe(); }
|
||||
ALWAYS_INLINE UInt64 getUInt64() const { return element.get_uint64().value_unsafe(); }
|
||||
ALWAYS_INLINE double getDouble() const { return element.get_double().value_unsafe(); }
|
||||
ALWAYS_INLINE bool getBool() const { return element.get_bool().value_unsafe(); }
|
||||
ALWAYS_INLINE std::string_view getString() const { return element.get_string().value_unsafe(); }
|
||||
ALWAYS_INLINE Array getArray() const;
|
||||
ALWAYS_INLINE Object getObject() const;
|
||||
|
||||
@ -75,7 +75,7 @@ struct SimdJSONParser
|
||||
ALWAYS_INLINE Iterator begin() const { return array.begin(); }
|
||||
ALWAYS_INLINE Iterator end() const { return array.end(); }
|
||||
ALWAYS_INLINE size_t size() const { return array.size(); }
|
||||
ALWAYS_INLINE Element operator[](size_t index) const { assert(index < size()); return array.at(index).first; }
|
||||
ALWAYS_INLINE Element operator[](size_t index) const { assert(index < size()); return array.at(index).value_unsafe(); }
|
||||
|
||||
private:
|
||||
simdjson::dom::array array;
|
||||
@ -111,7 +111,7 @@ struct SimdJSONParser
|
||||
if (x.error())
|
||||
return false;
|
||||
|
||||
result = x.first;
|
||||
result = x.value_unsafe();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -137,7 +137,7 @@ struct SimdJSONParser
|
||||
if (document.error())
|
||||
return false;
|
||||
|
||||
result = document.first;
|
||||
result = document.value_unsafe();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -155,12 +155,12 @@ private:
|
||||
|
||||
inline ALWAYS_INLINE SimdJSONParser::Array SimdJSONParser::Element::getArray() const
|
||||
{
|
||||
return element.get_array().first;
|
||||
return element.get_array().value_unsafe();
|
||||
}
|
||||
|
||||
inline ALWAYS_INLINE SimdJSONParser::Object SimdJSONParser::Element::getObject() const
|
||||
{
|
||||
return element.get_object().first;
|
||||
return element.get_object().value_unsafe();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user