Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
Description
See this TODO in the code:
https://github.com/apache/arrow/blob/master/csharp/src/Apache.Arrow/Ipc/ArrowStreamWriter.cs#L445
A simple test case:
// Build schema var schemaBuilder = new Schema.Builder(); schemaBuilder.Field(f => f .Name("Ints") .Nullable(true) .DataType(Int32Type.Default) .Metadata(new Dictionary<string, string> { { "packed", packed ? "true" : "false" } }) ); var indexMetadata = new Dictionary<string, string> { { "index", JsonConvert.SerializeObject(new object()) } }; var schema = schemaBuilder.Metadata(indexMetadata).Build(); Int32Array a = new Int32Array.Builder().Append(5).Append(4).Build(); // Create record batch var recordBatch = new RecordBatch(schema, new IArrowArray[] { a }, a.Length);// Write recordbatch to file using (var stream = File.Create("visits.arrow")) using (var writer = new ArrowFileWriter(stream, recordBatch.Schema)) { writer.WriteRecordBatch(recordBatch); writer.WriteEnd(); }using (var stream = File.OpenRead("visits.arrow")) using (var reader = new ArrowFileReader(stream)) { var batch = reader.ReadNextRecordBatch(); Console.WriteLine(batch.Schema.HasMetadata); }
The above should print `true`, but it prints `false` for HasMetadata.
Attachments
Issue Links
- links to