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

Function ReadByteArray

cpp/src/parquet/decoder.cc:472–487  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

470// own data.
471
472static inline int64_t ReadByteArray(const uint8_t* data, int64_t data_size,
473 ByteArray* out) {
474 if (ARROW_PREDICT_FALSE(data_size < 4)) {
475 ParquetException::EofException();
476 }
477 const int32_t len = SafeLoadAs<int32_t>(data);
478 if (len < 0) {
479 throw ParquetException("Invalid BYTE_ARRAY value");
480 }
481 const int64_t consumed_length = static_cast<int64_t>(len) + 4;
482 if (ARROW_PREDICT_FALSE(data_size < consumed_length)) {
483 ParquetException::EofException();
484 }
485 *out = ByteArray{static_cast<uint32_t>(len), data + 4};
486 return consumed_length;
487}
488
489template <>
490inline int DecodePlain<ByteArray>(const uint8_t* data, int64_t data_size, int num_values,

Callers 1

DecodePlain<ByteArray>Function · 0.85

Calls 1

ParquetExceptionFunction · 0.85

Tested by

no test coverage detected