kou commented on code in PR #50905:
URL: https://github.com/apache/arrow/pull/50905#discussion_r3809057594


##########
cpp/src/arrow/extension/opaque.cc:
##########
@@ -65,34 +64,83 @@ std::string OpaqueType::Serialize() const {
 
 Result<std::shared_ptr<DataType>> OpaqueType::Deserialize(
     std::shared_ptr<DataType> storage_type, const std::string& 
serialized_data) const {
-  rapidjson::Document document;
-  const auto& parsed = document.Parse(serialized_data.data(), 
serialized_data.length());
-  if (parsed.HasParseError()) {
+  simdjson::padded_string padded_json(serialized_data);
+  simdjson::ondemand::parser parser;
+  simdjson::ondemand::document document;
+
+  if (auto error = parser.iterate(padded_json).get(document);
+      error != simdjson::SUCCESS) {

Review Comment:
   Can we use `internal::ResolveSimdjsonResult()` for this case?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to