Copilot commented on code in PR #50568:
URL: https://github.com/apache/arrow/pull/50568#discussion_r3622428810


##########
cpp/src/arrow/integration/json_internal.h:
##########
@@ -80,17 +85,17 @@ namespace arrow::internal::integration::json {
 /// \brief Append integration test Schema format to rapidjson writer

Review Comment:
   The comment still says this appends to a RapidJSON writer, but the API now 
takes arrow::json::JsonWriter (simdjson-based). Update the comment to avoid 
misleading future readers.



##########
cpp/src/arrow/integration/json_internal.cc:
##########
@@ -469,7 +472,7 @@ Status SchemaWriter::VisitType(const DataType& type) {
 
 class ArrayWriter {
  public:
-  ArrayWriter(const std::string& name, const Array& array, RjWriter* writer)
+  ArrayWriter(const std::string& name, const Array& array, JsonWriter* writer)
       : name_(name), array_(array), writer_(writer) {}

Review Comment:
   ArrayWriter has been migrated to JsonWriter, but later in this class there 
are still writer_->String(...) calls casting lengths to rj::SizeType (e.g. 
writer_->String(repr.data(), static_cast<rj::SizeType>(repr.size())) / 
view.size() / v.size()). With JsonWriter::String taking size_t, these casts are 
unnecessary and can truncate very large strings; they also keep RapidJSON types 
in the writer path. Update those calls to pass .size() directly (size_t).



-- 
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