MCPcopy Create free account
hub / github.com/apache/arrow / SetupEncryptionSchema

Method SetupEncryptionSchema

cpp/src/parquet/encryption/test_encryption_util.cc:178–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176FileEncryptor::FileEncryptor() { schema_ = SetupEncryptionSchema(); }
177
178std::shared_ptr<GroupNode> FileEncryptor::SetupEncryptionSchema() {
179 parquet::schema::NodeVector fields;
180
181 fields.push_back(PrimitiveNode::Make(kBooleanFieldName, Repetition::REQUIRED,
182 Type::BOOLEAN, ConvertedType::NONE));
183
184 fields.push_back(PrimitiveNode::Make(kInt32FieldName, Repetition::REQUIRED, Type::INT32,
185 ConvertedType::TIME_MILLIS));
186
187 fields.push_back(PrimitiveNode::Make(kInt64FieldName, Repetition::REPEATED, Type::INT64,
188 ConvertedType::NONE));
189
190 fields.push_back(PrimitiveNode::Make(kInt96FieldName, Repetition::REQUIRED, Type::INT96,
191 ConvertedType::NONE));
192
193 fields.push_back(PrimitiveNode::Make(kFloatFieldName, Repetition::REQUIRED, Type::FLOAT,
194 ConvertedType::NONE));
195
196 fields.push_back(PrimitiveNode::Make(kDoubleFieldName, Repetition::REQUIRED,
197 Type::DOUBLE, ConvertedType::NONE));
198
199 fields.push_back(PrimitiveNode::Make(kByteArrayFieldName, Repetition::OPTIONAL,
200 Type::BYTE_ARRAY, ConvertedType::NONE));
201
202 fields.push_back(PrimitiveNode::Make(kFixedLenByteArrayFieldName, Repetition::REQUIRED,
203 Type::FIXED_LEN_BYTE_ARRAY, ConvertedType::NONE,
204 kFixedLength));
205
206 return std::static_pointer_cast<GroupNode>(
207 GroupNode::Make("schema", Repetition::REQUIRED, fields));
208}
209
210void FileEncryptor::EncryptFile(
211 std::string file,

Callers

nothing calls this directly

Calls 2

push_backMethod · 0.80
MakeFunction · 0.50

Tested by

no test coverage detected