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