-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Description
Describe the enhancement requested
Subissue of #43549
For types of
arrow/cpp/src/parquet/arrow/reader_internal.cc
Lines 378 to 392 in 5ad0b3e
| std::shared_ptr<Array> TransferZeroCopy(RecordReader* reader, | |
| const std::shared_ptr<Field>& field) { | |
| std::shared_ptr<::arrow::ArrayData> data; | |
| if (field->nullable()) { | |
| std::vector<std::shared_ptr<Buffer>> buffers = {reader->ReleaseIsValid(), | |
| reader->ReleaseValues()}; | |
| data = std::make_shared<::arrow::ArrayData>(field->type(), reader->values_written(), | |
| std::move(buffers), reader->null_count()); | |
| } else { | |
| std::vector<std::shared_ptr<Buffer>> buffers = {nullptr, reader->ReleaseValues()}; | |
| data = std::make_shared<::arrow::ArrayData>(field->type(), reader->values_written(), | |
| std::move(buffers), /*null_count=*/0); | |
| } | |
| return ::arrow::MakeArray(data); | |
| } |
arrow/cpp/src/parquet/arrow/reader_internal.cc
Lines 796 to 800 in 5ad0b3e
| case ::arrow::Type::INT32: | |
| case ::arrow::Type::INT64: | |
| case ::arrow::Type::FLOAT: | |
| case ::arrow::Type::DOUBLE: | |
| result = TransferZeroCopy(reader, value_field); |
Int32Int64FloatDouble
arrow/cpp/src/parquet/arrow/reader_internal.cc
Lines 887 to 898 in 5ad0b3e
| case ::arrow::Type::TIMESTAMP: { | |
| const ::arrow::TimestampType& timestamp_type = | |
| checked_cast<::arrow::TimestampType&>(*value_field->type()); | |
| if (descr->physical_type() == ::parquet::Type::INT96) { | |
| RETURN_NOT_OK( | |
| TransferInt96(reader, pool, value_field, &result, timestamp_type.unit())); | |
| } else { | |
| switch (timestamp_type.unit()) { | |
| case ::arrow::TimeUnit::MILLI: | |
| case ::arrow::TimeUnit::MICRO: | |
| case ::arrow::TimeUnit::NANO: | |
| result = TransferZeroCopy(reader, value_field); |
Timestamp[milli]Timestamp[micro]Timestamp[nano]
Component(s)
C++, Parquet