public UnionTreeWriter(int columnId, ObjectInspector inspector, TypeDescription schema, StreamFactory writer, bool nullable) : base(columnId, inspector, schema, writer, nullable) { IList<ObjectInspector> choices = null; if (inspector != null) { UnionObjectInspector insp = (UnionObjectInspector)inspector; choices = insp.getObjectInspectors(); } IList<TypeDescription> children = schema.getChildren(); childrenWriters = new TreeWriter[children.Count]; for (int i = 0; i < childrenWriters.Length; ++i) { childrenWriters[i] = createTreeWriter( choices != null ? choices[i] : null, children[i], writer, true); } tags = new RunLengthByteWriter(writer.createStream(columnId, OrcProto.Stream.Types.Kind.DATA)); recordPosition(rowIndexPosition); }
public ByteTreeWriter(int columnId, ObjectInspector inspector, TypeDescription schema, StreamFactory writer, bool nullable) : base(columnId, inspector, schema, writer, nullable) { this.writer = new RunLengthByteWriter(writer.createStream(id, OrcProto.Stream.Types.Kind.DATA)); recordPosition(rowIndexPosition); }