Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::ArrowBatchTask Class Reference
Inheritance diagram for duckdb::ArrowBatchTask:
Collaboration diagram for duckdb::ArrowBatchTask:

Public Member Functions

 ArrowBatchTask (ArrowQueryResult &result, vector< idx_t > record_batch_indices, Executor &executor, shared_ptr< Event > event_p, BatchCollectionChunkScanState scan_state, vector< string > names, idx_t batch_size)
 
void ProduceRecordBatches ()
 
TaskExecutionResult ExecuteTask (TaskExecutionMode mode) override
 
string TaskType () const override
 
- Public Member Functions inherited from duckdb::ExecutorTask
 ExecutorTask (Executor &executor, shared_ptr< Event > event)
 
 ExecutorTask (ClientContext &context, shared_ptr< Event > event, const PhysicalOperator &op)
 
void Deschedule () override
 
void Reschedule () override
 Ensures a task is rescheduled to the correct queue.
 
TaskExecutionResult Execute (TaskExecutionMode mode) override
 
- Public Member Functions inherited from duckdb::Task
virtual bool TaskBlockedOnResult () const
 
- Public Member Functions inherited from duckdb::enable_shared_from_this< Task >
shared_ptr< Taskshared_from_this ()
 
shared_ptr< Task constshared_from_this () const
 

Private Attributes

ArrowQueryResultresult
 
vector< idx_trecord_batch_indices
 
shared_ptr< Eventevent
 
idx_t batch_size
 
vector< string > names
 
BatchCollectionChunkScanState scan_state
 

Additional Inherited Members

- Public Attributes inherited from duckdb::ExecutorTask
Executorexecutor
 
shared_ptr< Eventevent
 
unique_ptr< ThreadContextthread_context
 
optional_ptr< const PhysicalOperatorop
 
- Public Attributes inherited from duckdb::Task
optional_ptr< ProducerTokentoken
 
- Protected Member Functions inherited from duckdb::enable_shared_from_this< Task >
 enable_shared_from_this (enable_shared_from_this const &) noexcept
 
enable_shared_from_thisoperator= (enable_shared_from_this const &) noexcept
 

Constructor & Destructor Documentation

◆ ArrowBatchTask()

duckdb::ArrowBatchTask::ArrowBatchTask ( ArrowQueryResult result,
vector< idx_t record_batch_indices,
Executor executor,
shared_ptr< Event event_p,
BatchCollectionChunkScanState  scan_state,
vector< string >  names,
idx_t  batch_size 
)
35439 : ExecutorTask(executor, event_p), result(result), record_batch_indices(std::move(record_batch_indices)),
35440 event(std::move(event_p)), batch_size(batch_size), names(std::move(names)), scan_state(std::move(scan_state)) {
35441}

Member Function Documentation

◆ ProduceRecordBatches()

void duckdb::ArrowBatchTask::ProduceRecordBatches ( )
35443 {
35444 auto &arrays = result.Arrays();
35445 auto arrow_options = executor.context.GetClientProperties();
35446 for (auto &index : record_batch_indices) {
35447 auto &array = arrays[index];
35448 D_ASSERT(array);
35449 const idx_t count = ArrowUtil::FetchChunk(
35450 scan_state, arrow_options, batch_size, &array->arrow_array,
35451 ArrowTypeExtensionData::GetExtensionTypes(event->GetClientContext(), scan_state.Types()));
35452 (void)count;
35453 D_ASSERT(count != 0);
35454 }
35455}
static unordered_map< idx_t, const shared_ptr< ArrowTypeExtensionData > > GetExtensionTypes(ClientContext &context, const vector< LogicalType > &duckdb_types)
This function returns possible extension types to given DuckDB types.
index

◆ ExecuteTask()

TaskExecutionResult duckdb::ArrowBatchTask::ExecuteTask ( TaskExecutionMode  mode)
overridevirtual

Implements duckdb::ExecutorTask.

35457 {
35458 ProduceRecordBatches();
35459 event->FinishTask();
35460 return TaskExecutionResult::TASK_FINISHED;
35461}

◆ TaskType()

string duckdb::ArrowBatchTask::TaskType ( ) const
inlineoverridevirtual

Reimplemented from duckdb::Task.

35362 {
35363 return "ArrowBatchTask";
35364 }

The documentation for this class was generated from the following file: