| 62 | constexpr int64_t kOneSecondNanos = 1000000000LL; |
| 63 | |
| 64 | Status AppendStructBatch(const liborc::Type* type, |
| 65 | liborc::ColumnVectorBatch* column_vector_batch, int64_t offset, |
| 66 | int64_t length, ArrayBuilder* abuilder) { |
| 67 | auto builder = checked_cast<StructBuilder*>(abuilder); |
| 68 | auto batch = checked_cast<liborc::StructVectorBatch*>(column_vector_batch); |
| 69 | |
| 70 | const uint8_t* valid_bytes = nullptr; |
| 71 | if (batch->hasNulls) { |
| 72 | valid_bytes = reinterpret_cast<const uint8_t*>(batch->notNull.data()) + offset; |
| 73 | } |
| 74 | RETURN_NOT_OK(builder->AppendValues(length, valid_bytes)); |
| 75 | |
| 76 | for (int i = 0; i < builder->num_fields(); i++) { |
| 77 | RETURN_NOT_OK(AppendBatch(type->getSubtype(i), batch->fields[i], offset, length, |
| 78 | builder->field_builder(i))); |
| 79 | } |
| 80 | return Status::OK(); |
| 81 | } |
| 82 | |
| 83 | Status AppendListBatch(const liborc::Type* type, |
| 84 | liborc::ColumnVectorBatch* column_vector_batch, int64_t offset, |
no test coverage detected