Skip to content

Commit

Permalink
Unsafe Serialization: Null count is always set to 0 (apache#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhztheplayer committed Feb 28, 2022
1 parent 63f4455 commit b8c8d86
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cpp/src/arrow/jniutil/jni_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,10 @@ arrow::Result<std::shared_ptr<arrow::Schema>> FromSchemaByteArray(
}

Status SetMetadataForSingleField(std::shared_ptr<ArrayData> array_data,
std::vector<ipc::internal::FieldMetadata> &nodes_meta,
std::vector<ipc::internal::BufferMetadata> &buffers_meta,
std::shared_ptr<KeyValueMetadata> &custom_metadata) {
nodes_meta.push_back({array_data->length, array_data->null_count, 0L});
std::vector<ipc::internal::FieldMetadata>& nodes_meta,
std::vector<ipc::internal::BufferMetadata>& buffers_meta,
std::shared_ptr<KeyValueMetadata>& custom_metadata) {
nodes_meta.push_back({array_data->length, array_data->GetNullCount(), 0L});

for (size_t i = 0; i < array_data->buffers.size(); i++) {
auto buffer = array_data->buffers.at(i);
Expand Down

0 comments on commit b8c8d86

Please sign in to comment.