Open
Description
Describe the bug
binding readable stream on adddatatomap failed
To Reproduce
Steps to reproduce the behavior:
1)getting readable stream response as byte [] from backend python server
2) used parseInBatches and asyncIterator to get batch and push to array
3) after that addDatatomap failed to bind
i have used below backend and fronted code
python
from pyarrow import flight
client = flight.FlightClient('grpc+tcp://localhost:47470')
client.authenticate(HttpDremioClientAuthHandler(username, password))
info = client.get_flight_info(flight.FlightDescriptor.for_command(sql))
reader = client.do_get(info.endpoints[0].ticket)
batches = []
while True:
try:
batch, metadata = reader.read_chunk()
batches.append(batch)
except StopIteration:
break
data = pa.Table.from_batches(batches)
sink = pa.BufferOutputStream()
writer = pa.RecordBatchStreamWriter(sink, data.schema)
writer.write_table(data)
writer.close()
and sending sink.getvalue().to_pybytes() bytes as response
typescript
let response = await fetch("http://localhost:5000/api/")
const values1 = [];
const asyncIterator = await parseInBatches(makeIterator(response), ArrowLoader);
for await (const batch of asyncIterator) {
values1.push(batch)
}
and addDataToMap
--------------
addDataToMap({
datasets: [
{
info: {label: 'Pipeline Arrow', id: 'pipe2071'},
data: processRowObject(values1)
},
],
options: {
keepExistingConfig: true
},
})