Skip to content

Commit

Permalink
Update R client to some macro renaming in C++ client. (#4439)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcferretti authored Sep 5, 2023
1 parent 3cfeacb commit d3b2147
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions R/rdeephaven/src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ class TableHandleWrapper {
std::shared_ptr<arrow::flight::FlightStreamReader> fsr = internal_tbl_hdl.GetFlightStreamReader();

std::vector<std::shared_ptr<arrow::RecordBatch>> empty_record_batches;
deephaven::client::utility::OkOrThrow(DEEPHAVEN_EXPR_MSG(fsr->ReadAll(&empty_record_batches)));
deephaven::client::utility::OkOrThrow(DEEPHAVEN_LOCATION_EXPR(fsr->ReadAll(&empty_record_batches)));

std::shared_ptr<arrow::RecordBatchReader> record_batch_reader = arrow::RecordBatchReader::Make(empty_record_batches).ValueOrDie();
ArrowArrayStream* stream_ptr = new ArrowArrayStream();
Expand Down Expand Up @@ -438,17 +438,17 @@ class ClientWrapper {
auto ticket = internal_tbl_hdl_mngr.NewTicket();
auto fd = deephaven::client::utility::ConvertTicketToFlightDescriptor(ticket);

deephaven::client::utility::OkOrThrow(DEEPHAVEN_EXPR_MSG(wrapper.FlightClient()->DoPut(options, fd, schema, &fsw, &fmr)));
deephaven::client::utility::OkOrThrow(DEEPHAVEN_LOCATION_EXPR(wrapper.FlightClient()->DoPut(options, fd, schema, &fsw, &fmr)));
while(true) {
std::shared_ptr<arrow::RecordBatch> this_batch;
deephaven::client::utility::OkOrThrow(DEEPHAVEN_EXPR_MSG(record_batch_reader->ReadNext(&this_batch)));
deephaven::client::utility::OkOrThrow(DEEPHAVEN_LOCATION_EXPR(record_batch_reader->ReadNext(&this_batch)));
if (this_batch == nullptr) {
break;
}
deephaven::client::utility::OkOrThrow(DEEPHAVEN_EXPR_MSG(fsw->WriteRecordBatch(*this_batch)));
deephaven::client::utility::OkOrThrow(DEEPHAVEN_LOCATION_EXPR(fsw->WriteRecordBatch(*this_batch)));
}
deephaven::client::utility::OkOrThrow(DEEPHAVEN_EXPR_MSG(fsw->DoneWriting()));
deephaven::client::utility::OkOrThrow(DEEPHAVEN_EXPR_MSG(fsw->Close()));
deephaven::client::utility::OkOrThrow(DEEPHAVEN_LOCATION_EXPR(fsw->DoneWriting()));
deephaven::client::utility::OkOrThrow(DEEPHAVEN_LOCATION_EXPR(fsw->Close()));

auto new_tbl_hdl = internal_tbl_hdl_mngr.MakeTableHandleFromTicket(ticket);
return new TableHandleWrapper(new_tbl_hdl);
Expand Down

0 comments on commit d3b2147

Please sign in to comment.