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

Method Parse

cpp/src/parquet/encryption/key_material.cc:60–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 encoded_wrapped_dek_(encoded_wrapped_dek) {}
59
60KeyMaterial KeyMaterial::Parse(const std::string& key_material_string) {
61 ObjectParser json_parser;
62 ::arrow::Status status = json_parser.Parse(key_material_string);
63 if (!status.ok()) {
64 throw ParquetException("Failed to parse key material " + key_material_string);
65 }
66
67 // External key material - extract "key material type", and make sure it is supported
68 std::string key_material_type;
69 PARQUET_ASSIGN_OR_THROW(key_material_type,
70 json_parser.GetString(kKeyMaterialTypeField));
71 if (kKeyMaterialType1 != key_material_type) {
72 throw ParquetException("Wrong key material type: " + key_material_type + " vs " +
73 kKeyMaterialType1);
74 }
75 // Parse other fields (common to internal and external key material)
76 return Parse(&json_parser);
77}
78
79KeyMaterial KeyMaterial::Parse(const ObjectParser* key_material_json) {
80 // 2. Check if "key material" belongs to file footer key

Callers

nothing calls this directly

Calls 5

ParquetExceptionFunction · 0.85
ParseFunction · 0.50
okMethod · 0.45
GetStringMethod · 0.45
GetBoolMethod · 0.45

Tested by

no test coverage detected