arrow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject [1/2] arrow git commit: ARROW-482 [Java] Exposing custom field metadata
Date Thu, 11 May 2017 20:49:38 GMT
Repository: arrow
Updated Branches:
  refs/heads/master a8338f1f8 -> 010bd2245


http://git-wip-us.apache.org/repos/asf/arrow/blob/010bd224/java/vector/src/test/java/org/apache/arrow/vector/stream/MessageSerializerTest.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/stream/MessageSerializerTest.java
b/java/vector/src/test/java/org/apache/arrow/vector/stream/MessageSerializerTest.java
index 27879ef..9678423 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/stream/MessageSerializerTest.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/stream/MessageSerializerTest.java
@@ -29,6 +29,7 @@ import java.nio.channels.Channels;
 import java.util.Collections;
 import java.util.List;
 
+import io.netty.buffer.ArrowBuf;
 import org.apache.arrow.memory.BufferAllocator;
 import org.apache.arrow.memory.RootAllocator;
 import org.apache.arrow.vector.file.ArrowBlock;
@@ -40,13 +41,12 @@ import org.apache.arrow.vector.schema.ArrowRecordBatch;
 import org.apache.arrow.vector.types.pojo.ArrowType;
 import org.apache.arrow.vector.types.pojo.DictionaryEncoding;
 import org.apache.arrow.vector.types.pojo.Field;
+import org.apache.arrow.vector.types.pojo.FieldType;
 import org.apache.arrow.vector.types.pojo.Schema;
-import org.junit.Test;
 import org.junit.Rule;
+import org.junit.Test;
 import org.junit.rules.ExpectedException;
 
-import io.netty.buffer.ArrowBuf;
-
 public class MessageSerializerTest {
 
   public static ArrowBuf buf(BufferAllocator alloc, byte[] bytes) {
@@ -79,7 +79,7 @@ public class MessageSerializerTest {
   @Test
   public void testSchemaDictionaryMessageSerialization() throws IOException {
     DictionaryEncoding dictionary = new DictionaryEncoding(9L, false, new ArrowType.Int(8,
true));
-    Field field = new Field("test", true, ArrowType.Utf8.INSTANCE, dictionary, null);
+    Field field = new Field("test", new FieldType(true, ArrowType.Utf8.INSTANCE, dictionary,
null), null);
     Schema schema = new Schema(Collections.singletonList(field));
     ByteArrayOutputStream out = new ByteArrayOutputStream();
     long size = MessageSerializer.serialize(new WriteChannel(Channels.newChannel(out)), schema);
@@ -130,7 +130,7 @@ public class MessageSerializerTest {
 
   public static Schema testSchema() {
     return new Schema(asList(new Field(
-        "testField", true, new ArrowType.Int(8, true), Collections.<Field>emptyList())));
+        "testField", FieldType.nullable(new ArrowType.Int(8, true)), Collections.<Field>emptyList())));
   }
 
   // Verifies batch contents matching test schema.

http://git-wip-us.apache.org/repos/asf/arrow/blob/010bd224/java/vector/src/test/java/org/apache/arrow/vector/types/pojo/TestSchema.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/types/pojo/TestSchema.java
b/java/vector/src/test/java/org/apache/arrow/vector/types/pojo/TestSchema.java
index 56fa73e..84cc107 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/types/pojo/TestSchema.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/types/pojo/TestSchema.java
@@ -47,7 +47,7 @@ import org.junit.Test;
 public class TestSchema {
 
   private static Field field(String name, boolean nullable, ArrowType type, Field... children)
{
-    return new Field(name, nullable, type, asList(children));
+    return new Field(name, new FieldType(nullable, type, null, null), asList(children));
   }
 
   private static Field field(String name, ArrowType type, Field... children) {


Mime
View raw message