| 64 | } |
| 65 | |
| 66 | ColumnEncryptionProperties::Builder* ColumnEncryptionProperties::Builder::key_id( |
| 67 | std::string key_id) { |
| 68 | // key_id is expected to be in UTF8 encoding |
| 69 | ::arrow::util::InitializeUTF8(); |
| 70 | const uint8_t* data = reinterpret_cast<const uint8_t*>(key_id.c_str()); |
| 71 | if (!::arrow::util::ValidateUTF8(data, key_id.size())) { |
| 72 | throw ParquetException("key id should be in UTF8 encoding"); |
| 73 | } |
| 74 | |
| 75 | DCHECK(!key_id.empty()); |
| 76 | this->key_metadata(std::move(key_id)); |
| 77 | return this; |
| 78 | } |
| 79 | |
| 80 | FileDecryptionProperties::Builder* FileDecryptionProperties::Builder::column_keys( |
| 81 | ColumnPathToDecryptionPropertiesMap column_decryption_properties) { |