thisisnic commented on code in PR #49712:
URL: https://github.com/apache/arrow/pull/49712#discussion_r3197409096


##########
python/pyarrow/src/arrow/python/python_to_arrow.cc:
##########
@@ -826,7 +826,8 @@ class PyDictionaryConverter<U, enable_if_has_string_view<U>>
     } else {
       ARROW_RETURN_NOT_OK(
           PyValue::Convert(this->value_type_, this->options_, value, view_));
-      return this->value_builder_->Append(view_.bytes, 
static_cast<int32_t>(view_.size));
+      return this->value_builder_->Append(
+          std::string_view(view_.bytes, static_cast<size_t>(view_.size)));

Review Comment:
   The old code passed `(const char*, int32_t)` which matches 
`StringBuilder::Append` but not `StringViewBuilder::Append` (which takes 
`int64_t`). Switching to `std::string_view` works for both builder types.



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