You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@parquet.apache.org by GitBox <gi...@apache.org> on 2023/01/12 14:10:27 UTC

[GitHub] [parquet-mr] wgtmac commented on a diff in pull request #1019: PARQUET-2103: Fix crypto exception in print toPrettyJSON

wgtmac commented on code in PR #1019:
URL: https://github.com/apache/parquet-mr/pull/1019#discussion_r1068164918


##########
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/metadata/FileMetaData.java:
##########
@@ -71,7 +79,7 @@ public MessageType getSchema() {
 
   @Override
   public String toString() {
-    return "FileMetaData{schema: "+schema+ ", metadata: " + keyValueMetaData + "}";
+    return "FileMetaData{schema: "+schema+ ", metadata: " + keyValueMetaData + ", encryption: " + encryptionType + "}";

Review Comment:
   ```suggestion
       return "FileMetaData{schema: " + schema + ", metadata: " + keyValueMetaData + ", encryption: " + encryptionType + "}";
   ```



##########
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/metadata/FileMetaData.java:
##########
@@ -50,16 +51,23 @@ public final class FileMetaData implements Serializable {
    * @throws NullPointerException if schema or keyValueMetaData is {@code null}
    */
   public FileMetaData(MessageType schema, Map<String, String> keyValueMetaData, String createdBy) {
-    this(schema, keyValueMetaData, createdBy, null);
+    this(schema, keyValueMetaData, createdBy, EncryptionType.UNENCRYPTED, null);
   }
-  
-  public FileMetaData(MessageType schema, Map<String, String> keyValueMetaData, String createdBy, InternalFileDecryptor fileDecryptor) {
+
+  public FileMetaData(MessageType schema, Map<String, String> keyValueMetaData, String createdBy,
+                      InternalFileDecryptor fileDecryptor) {
+    this(schema, keyValueMetaData, createdBy, null, fileDecryptor);

Review Comment:
   ```suggestion
       this(schema, keyValueMetaData, createdBy, EncryptionType.UNENCRYPTED, fileDecryptor);
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@parquet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org