| 820 | } |
| 821 | |
| 822 | TEST(TestWriter, NullValuesBuffer) { |
| 823 | std::shared_ptr<::arrow::io::BufferOutputStream> sink = CreateOutputStream(); |
| 824 | |
| 825 | const auto item_node = schema::PrimitiveNode::Make( |
| 826 | "item", Repetition::REQUIRED, LogicalType::Int(32, true), Type::INT32); |
| 827 | const auto list_node = |
| 828 | schema::GroupNode::Make("list", Repetition::REPEATED, {item_node}); |
| 829 | const auto column_node = schema::GroupNode::Make( |
| 830 | "array_of_ints_column", Repetition::OPTIONAL, {list_node}, LogicalType::List()); |
| 831 | const auto schema_node = |
| 832 | schema::GroupNode::Make("schema", Repetition::REQUIRED, {column_node}); |
| 833 | |
| 834 | auto file_writer = ParquetFileWriter::Open( |
| 835 | sink, std::dynamic_pointer_cast<schema::GroupNode>(schema_node)); |
| 836 | auto group_writer = file_writer->AppendRowGroup(); |
| 837 | auto column_writer = group_writer->NextColumn(); |
| 838 | auto typed_writer = dynamic_cast<Int32Writer*>(column_writer); |
| 839 | |
| 840 | const int64_t num_values = 1; |
| 841 | const int16_t def_levels[] = {0}; |
| 842 | const int16_t rep_levels[] = {0}; |
| 843 | const uint8_t valid_bits[] = {0}; |
| 844 | const int64_t valid_bits_offset = 0; |
| 845 | const int32_t* values = nullptr; |
| 846 | |
| 847 | typed_writer->WriteBatchSpaced(num_values, def_levels, rep_levels, valid_bits, |
| 848 | valid_bits_offset, values); |
| 849 | } |
| 850 | |
| 851 | TYPED_TEST(TestPrimitiveWriter, RequiredPlainChecksum) { |
| 852 | this->TestRequiredWithSettings(Encoding::PLAIN, Compression::UNCOMPRESSED, |
nothing calls this directly
no test coverage detected