I was testing the following simple arrow flight sql function but continued getting error: UNIMPLEMENTED: acceptPut is not implemented
Pls advise! Thanks!
I am using 26.0.0-202504290223270716-afdd6663
private static void runFlightCallDirectInsert(Location location,
BufferAllocator allocator) throws Exception {
try (FlightClient client = FlightClient.builder(allocator, location)
.build();
FlightSqlClient sqlClientA = new FlightSqlClient(client);) {
CredentialCallOption credentialCallOption = client.authenticateBasicToken(username, password).get();
int newid = Long.valueOf(Instant.now().getEpochSecond()).intValue();
String insertSqlQuery = String.format(
"INSERT INTO \"Nessie-Source\".\"lg-test\".people (id, first_name, last_name, age) values (%d, '%s', '%s', %d)",
newid, "A_" + newid, "B_" + newid, 5);
long insertedCount =
sqlClientA.executeUpdate(insertSqlQuery, credentialCallOption);
String querySql = "SELECT * FROM \"Nessie-Source\".\"lg-test\".people WHERE id >= " + newid;
FlightInfo flightInfo = sqlClientA.execute(querySql, credentialCallOption);
System.out.println("printing results within the transaction client A");
printFlightInfoResults(flightInfo, sqlClientA);
} catch (Exception ex) {
ex.printStackTrace();
}
}