parquet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ziva...@apache.org
Subject [parquet-mr] branch master updated: PARQUET-1557: Replace deprecated Apache Avro methods (#633)
Date Wed, 17 Apr 2019 12:57:54 GMT
This is an automated email from the ASF dual-hosted git repository.

zivanfi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/parquet-mr.git


The following commit(s) were added to refs/heads/master by this push:
     new 62dcc68  PARQUET-1557: Replace deprecated Apache Avro methods (#633)
62dcc68 is described below

commit 62dcc68acaf64012bf731e103be780956f1f446d
Author: Fokko Driesprong <fokko@driesprong.frl>
AuthorDate: Wed Apr 17 14:57:49 2019 +0200

    PARQUET-1557: Replace deprecated Apache Avro methods (#633)
---
 .../main/java/org/apache/parquet/avro/AvroIndexedRecordConverter.java | 2 +-
 .../src/main/java/org/apache/parquet/avro/AvroRecordConverter.java    | 2 +-
 .../java/org/apache/parquet/avro/TestReflectInputOutputFormat.java    | 4 ++--
 .../java/org/apache/parquet/avro/TestSpecificInputOutputFormat.java   | 4 ++--
 .../src/test/java/org/apache/parquet/avro/TestSpecificReadWrite.java  | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/parquet-avro/src/main/java/org/apache/parquet/avro/AvroIndexedRecordConverter.java
b/parquet-avro/src/main/java/org/apache/parquet/avro/AvroIndexedRecordConverter.java
index 48eab4d..4bbf58a 100644
--- a/parquet-avro/src/main/java/org/apache/parquet/avro/AvroIndexedRecordConverter.java
+++ b/parquet-avro/src/main/java/org/apache/parquet/avro/AvroIndexedRecordConverter.java
@@ -104,7 +104,7 @@ class AvroIndexedRecordConverter<T extends IndexedRecord> extends
GroupConverter
       if (field.schema().getType() == Schema.Type.NULL) {
         continue; // skip null since Parquet does not write nulls
       }
-      if (field.defaultValue() == null || model.getDefaultValue(field) == null) {
+      if (field.defaultVal() == null || model.getDefaultValue(field) == null) {
         continue; // field has no default
       }
       recordDefaults.put(field, model.getDefaultValue(field));
diff --git a/parquet-avro/src/main/java/org/apache/parquet/avro/AvroRecordConverter.java b/parquet-avro/src/main/java/org/apache/parquet/avro/AvroRecordConverter.java
index c0d6dc2..93bde65 100644
--- a/parquet-avro/src/main/java/org/apache/parquet/avro/AvroRecordConverter.java
+++ b/parquet-avro/src/main/java/org/apache/parquet/avro/AvroRecordConverter.java
@@ -165,7 +165,7 @@ class AvroRecordConverter<T> extends AvroConverters.AvroGroupConverter
{
       if (field.schema().getType() == Schema.Type.NULL) {
         continue; // skip null since Parquet does not write nulls
       }
-      if (field.defaultValue() == null || this.model.getDefaultValue(field) == null) {
+      if (field.defaultVal() == null || this.model.getDefaultValue(field) == null) {
         continue; // field has no default
       }
       // use this.model because model may be null
diff --git a/parquet-avro/src/test/java/org/apache/parquet/avro/TestReflectInputOutputFormat.java
b/parquet-avro/src/test/java/org/apache/parquet/avro/TestReflectInputOutputFormat.java
index 729f24a..74f949e 100644
--- a/parquet-avro/src/test/java/org/apache/parquet/avro/TestReflectInputOutputFormat.java
+++ b/parquet-avro/src/test/java/org/apache/parquet/avro/TestReflectInputOutputFormat.java
@@ -380,7 +380,7 @@ public class TestReflectInputOutputFormat {
     for (Schema.Field field : ReflectData.get().getSchema(Car.class).getFields()) {
       if (!"optionalExtra".equals(field.name())) {
         fields.add(new Schema.Field(field.name(), field.schema(), field.doc(),
-            field.defaultValue(), field.order()));
+            field.defaultVal(), field.order()));
       }
     }
     projection.setFields(fields);
@@ -441,7 +441,7 @@ public class TestReflectInputOutputFormat {
       // No make!
       if ("engine".equals(field.name()) || "year".equals(field.name()) || "vin".equals(field.name()))
{
         fields.add(new Schema.Field(field.name(), field.schema(), field.doc(),
-            field.defaultValue(), field.order()));
+            field.defaultVal(), field.order()));
       }
     }
     projection.setFields(fields);
diff --git a/parquet-avro/src/test/java/org/apache/parquet/avro/TestSpecificInputOutputFormat.java
b/parquet-avro/src/test/java/org/apache/parquet/avro/TestSpecificInputOutputFormat.java
index a0b58f3..8e89363 100644
--- a/parquet-avro/src/test/java/org/apache/parquet/avro/TestSpecificInputOutputFormat.java
+++ b/parquet-avro/src/test/java/org/apache/parquet/avro/TestSpecificInputOutputFormat.java
@@ -172,7 +172,7 @@ public class TestSpecificInputOutputFormat {
     for (Schema.Field field : Car.SCHEMA$.getFields()) {
       if (!"optionalExtra".equals(field.name())) {
         fields.add(new Schema.Field(field.name(), field.schema(), field.doc(),
-            field.defaultValue(), field.order()));
+            field.defaultVal(), field.order()));
       }
     }
     projection.setFields(fields);
@@ -232,7 +232,7 @@ public class TestSpecificInputOutputFormat {
       // No make!
       if ("engine".equals(field.name()) || "year".equals(field.name()) || "vin".equals(field.name()))
{
         fields.add(new Schema.Field(field.name(), field.schema(), field.doc(),
-            field.defaultValue(), field.order()));
+            field.defaultVal(), field.order()));
       }
     }
     projection.setFields(fields);
diff --git a/parquet-avro/src/test/java/org/apache/parquet/avro/TestSpecificReadWrite.java
b/parquet-avro/src/test/java/org/apache/parquet/avro/TestSpecificReadWrite.java
index 61ab3e3..c0199fa 100644
--- a/parquet-avro/src/test/java/org/apache/parquet/avro/TestSpecificReadWrite.java
+++ b/parquet-avro/src/test/java/org/apache/parquet/avro/TestSpecificReadWrite.java
@@ -188,7 +188,7 @@ public class TestSpecificReadWrite {
       }
 
       //Schema schemaClone = parser.parse(field.schema().toString(false));
-      Schema.Field fieldClone = new Schema.Field(name, field.schema(), field.doc(), field.defaultValue());
+      Schema.Field fieldClone = new Schema.Field(name, field.schema(), field.doc(), field.defaultVal());
       projectedFields.add(fieldClone);
     }
 


Mime
View raw message