MCPcopy Create free account
hub / github.com/apache/arrow / WriteArrowZeroCopy

Method WriteArrowZeroCopy

cpp/src/parquet/column_writer.cc:1528–1545  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1526 ArrowWriteContext* ctx, bool maybe_parent_nulls);
1527
1528 Status WriteArrowZeroCopy(const int16_t* def_levels, const int16_t* rep_levels,
1529 int64_t num_levels, const ::arrow::Array& array,
1530 ArrowWriteContext* ctx, bool maybe_parent_nulls) {
1531 const auto& data = checked_cast<const ::arrow::PrimitiveArray&>(array);
1532 const T* values = data.data()->GetValues<T>(1);
1533 bool no_nulls =
1534 this->descr()->schema_node()->is_required() || (array.null_count() == 0);
1535
1536 if (!maybe_parent_nulls && no_nulls) {
1537 PARQUET_CATCH_NOT_OK(
1538 WriteBatchInternal(num_levels, def_levels, rep_levels, values));
1539 } else {
1540 PARQUET_CATCH_NOT_OK(WriteBatchSpacedInternal(num_levels, def_levels, rep_levels,
1541 data.null_bitmap_data(),
1542 data.offset(), values));
1543 }
1544 return Status::OK();
1545 }
1546
1547 Status WriteArrowTimestamps(const int16_t* def_levels, const int16_t* rep_levels,
1548 int64_t num_levels, const ::arrow::Array& values,

Callers

nothing calls this directly

Calls 5

descrMethod · 0.95
OKFunction · 0.50
dataMethod · 0.45
null_countMethod · 0.45
offsetMethod · 0.45

Tested by

no test coverage detected