OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
arrow Namespace Reference

Namespaces

 fs
 

Functions

key_t get_and_copy_to_shm (const std::shared_ptr< Buffer > &data)
 

Function Documentation

key_t arrow::get_and_copy_to_shm ( const std::shared_ptr< Buffer > &  data)

Definition at line 426 of file ArrowResultSetConverter.cpp.

References anonymous_namespace{ArrowResultSetConverter.cpp}::get_shm().

Referenced by ArrowResultSetConverter::getArrowResult().

426  {
427 #ifdef _MSC_VER
428  throw std::runtime_error("Arrow IPC not yet supported on Windows.");
429 #else
430  auto [key, ipc_ptr] = get_shm(data->size());
431  // copy the arrow records buffer to shared memory
432  // TODO(ptaylor): I'm sure it's possible to tell Arrow's RecordBatchStreamWriter to
433  // write directly to the shared memory segment as a sink
434  memcpy(ipc_ptr, data->data(), data->size());
435  // detach from the shared memory segment
436  shmdt(ipc_ptr);
437  return key;
438 #endif
439 }
std::pair< key_t, void * > get_shm(size_t shmsz)

+ Here is the call graph for this function:

+ Here is the caller graph for this function: