| 451 | |
| 452 | private: |
| 453 | FileSerializer(std::shared_ptr<ArrowOutputStream> sink, |
| 454 | std::shared_ptr<GroupNode> schema, |
| 455 | std::shared_ptr<WriterProperties> properties, |
| 456 | std::shared_ptr<const KeyValueMetadata> key_value_metadata) |
| 457 | : ParquetFileWriter::Contents(std::move(schema), std::move(key_value_metadata)), |
| 458 | sink_(std::move(sink)), |
| 459 | is_open_(true), |
| 460 | properties_(std::move(properties)), |
| 461 | num_row_groups_(0), |
| 462 | num_rows_(0), |
| 463 | metadata_(FileMetaDataBuilder::Make(&schema_, properties_)) { |
| 464 | PARQUET_ASSIGN_OR_THROW(int64_t position, sink_->Tell()); |
| 465 | if (position == 0) { |
| 466 | StartFile(); |
| 467 | } else { |
| 468 | throw ParquetException("Appending to file not implemented."); |
| 469 | } |
| 470 | if (properties_->content_defined_chunking_enabled()) { |
| 471 | const auto& options = properties_->content_defined_chunking_options(); |
| 472 | for (int i = 0; i < num_columns(); i++) { |
| 473 | content_defined_chunkers_.emplace_back( |
| 474 | internal::LevelInfo::ComputeLevelInfo(schema_.Column(i)), |
| 475 | options.min_chunk_size, options.max_chunk_size, options.norm_level); |
| 476 | } |
| 477 | } |
| 478 | } |
| 479 | |
| 480 | void CloseEncryptedFile(FileEncryptionProperties* file_encryption_properties) { |
| 481 | // Encrypted file with encrypted footer |
nothing calls this directly
no test coverage detected