asheeshgarg commented on issue #14721:
URL: https://github.com/apache/arrow/issues/14721#issuecomment-1325575846
While using the Example
try(VectorSchemaRoot vectorSchemaRoot = VectorSchemaRoot.create(schema,
allocator);
VarCharVector varCharVector = (VarCharVector)
vectorSchemaRoot.getVector("name")) {
varCharVector.allocateNew(3);
varCharVector.setSafe(0,"Ronald".getBytes("utf-8"));
varCharVector.setSafe(1, "David".getBytes("utf-8"));
varCharVector.setSafe(2, "Francisco".getBytes("utf-8"));
vectorSchemaRoot.setRowCount(3);
FlightClient.ClientStreamListener listener =
flightClient.startPut(
FlightDescriptor.path("profiles"),
vectorSchemaRoot, new AsyncPutListener());
listener.putNext();
varCharVector.setSafe(0, "Manuel".getBytes());
varCharVector.setSafe(1, "Felipe".getBytes());
varCharVector.setSafe(2, "JJ".getBytes());
vectorSchemaRoot.setRowCount(3);
listener.putNext();
listener.completed();
listener.getResult();
System.out.println("C2: Client (Populate Data): Wrote 2
batches with 3 rows each");
}
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]