You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When AppendValues called with empty vector, this would cause memcpy
/// \brief Append a sequence of elements in one shot/// \param[in] values a contiguous C array of values/// \param[in] length the number of values to append/// \param[in] is_valid an std::vector<bool> indicating valid (1) or null/// (0). Equal in length to values/// \return Status
Status AppendValues(const value_type* values, int64_t length,
const std::vector<bool>& is_valid) {
ARROW_RETURN_NOT_OK(Reserve(length));
data_builder_.UnsafeAppend(values, length);
// length_ is update by theseArrayBuilder::UnsafeAppendToBitmap(is_valid);
returnStatus::OK();
}
/// \brief Append a sequence of elements in one shot/// \param[in] values a std::vector of values/// \param[in] is_valid an std::vector<bool> indicating valid (1) or null/// (0). Equal in length to values/// \return Status
Status AppendValues(const std::vector<value_type>& values,
const std::vector<bool>& is_valid) {
returnAppendValues(values.data(), static_cast<int64_t>(values.size()), is_valid);
}
In this case, unsafe append directly memcpy, and when size == 0, it would be a undefined behavior
Component(s)
C++
The text was updated successfully, but these errors were encountered:
Describe the enhancement requested
When
AppendValues
called with empty vector, this would cause memcpyIn this case, unsafe append directly memcpy, and when size == 0, it would be a undefined behavior
Component(s)
C++
The text was updated successfully, but these errors were encountered: