Skip to content

The flight.NewRecordWriter parameter is ambiguous  #43443

@mac-zhenfang

Description

@mac-zhenfang

Describe the usage question you have. Please include as many useful details as possible.

The func NewRecordWriter(w DataStreamWriter, opts ...ipc.Option) *Writer API indicates the DataStreamWriter is a required parameter, all the others are optional. But in the

func (w *Writer) start() error {
w.started = true

w.mapper.ImportSchema(w.schema)
w.lastWrittenDicts = make(map[int64]arrow.Array)

// write out schema payloads
ps := payloadFromSchema(w.schema, w.mem, &w.mapper)
defer ps.Release()

for _, data := range ps {
	err := w.pw.WritePayload(data)
	if err != nil {
		return err
	}
}

return nil

}

The w.schema looks a required parameter. If it s nil, will report arrow/ipc: unknown error while writing: runtime error: invalid memory address or nil pointer dereference error.

The request is to use the Schema in RecordBatch, instead of a input option

Component(s)

Go

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions