| 565 | } |
| 566 | |
| 567 | void UpdateEncryption(int8_t module_type) { |
| 568 | switch (module_type) { |
| 569 | case encryption::kColumnMetaData: { |
| 570 | meta_encryptor_->UpdateAad(encryption::CreateModuleAad( |
| 571 | meta_encryptor_->file_aad(), module_type, row_group_ordinal_, column_ordinal_, |
| 572 | kNonPageOrdinal)); |
| 573 | break; |
| 574 | } |
| 575 | case encryption::kDataPage: { |
| 576 | encryption::QuickUpdatePageAad(page_ordinal_, &data_page_aad_); |
| 577 | data_encryptor_->UpdateAad(data_page_aad_); |
| 578 | break; |
| 579 | } |
| 580 | case encryption::kDataPageHeader: { |
| 581 | encryption::QuickUpdatePageAad(page_ordinal_, &data_page_header_aad_); |
| 582 | meta_encryptor_->UpdateAad(data_page_header_aad_); |
| 583 | break; |
| 584 | } |
| 585 | case encryption::kDictionaryPageHeader: { |
| 586 | meta_encryptor_->UpdateAad(encryption::CreateModuleAad( |
| 587 | meta_encryptor_->file_aad(), module_type, row_group_ordinal_, column_ordinal_, |
| 588 | kNonPageOrdinal)); |
| 589 | break; |
| 590 | } |
| 591 | case encryption::kDictionaryPage: { |
| 592 | data_encryptor_->UpdateAad(encryption::CreateModuleAad( |
| 593 | data_encryptor_->file_aad(), module_type, row_group_ordinal_, column_ordinal_, |
| 594 | kNonPageOrdinal)); |
| 595 | break; |
| 596 | } |
| 597 | default: |
| 598 | throw ParquetException("Unknown module type in UpdateEncryption"); |
| 599 | } |
| 600 | } |
| 601 | |
| 602 | std::shared_ptr<ArrowOutputStream> sink_; |
| 603 | ColumnChunkMetaDataBuilder* metadata_; |
no test coverage detected