tianchen92 commented on a change in pull request #7231: URL: https://github.com/apache/arrow/pull/7231#discussion_r433729367
########## File path: java/vector/src/test/java/org/apache/arrow/vector/ipc/TestArrowReaderWriter.java ########## @@ -751,4 +754,43 @@ public void testChannelReadFullyEos() throws IOException { assertEquals(10, arrBuf.getInt(0)); } } + + @Test + public void testCustomMetaData() throws IOException { + + VarCharVector vector = newVarCharVector("varchar1", allocator); + vector.allocateNewSafe(); + ValueVectorDataPopulator.setVector(vector, "foo", "bar", "baz"); + + List<Field> fields = Arrays.asList(vector.getField()); + List<FieldVector> vectors = Collections2.asImmutableList(vector); + Map<String, String> metadata = new HashMap<>(); + metadata.put("key1", "value1"); + metadata.put("key2", "value2"); + try (VectorSchemaRoot root = new VectorSchemaRoot(fields, vectors, vector.getValueCount()); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + ArrowFileWriter writer = new ArrowFileWriter(root, null, newChannel(out), metadata);) { + + writer.start(); + writer.writeBatch(); Review comment: also removed, thanks ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org