MCPcopy Create free account
hub / github.com/apache/impala / FetchBatch

Method FetchBatch

be/src/exec/data-source-scan-node.cc:127–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127Status SharedJdbcConnection::FetchBatch(extdatasource::TGetNextResult* result) {
128 // Fast path: another thread already exhausted the stream.
129 if (eos_.load(std::memory_order_acquire)) {
130 result->__set_eos(true);
131 return Status::OK();
132 }
133
134 extdatasource::TGetNextParams params;
135 params.__set_scan_handle(scan_handle_);
136
137 // Multiple threads may call GetNext() concurrently. Serialization is provided by
138 // the Java-side fetchLock in JdbcRecordIterator::fetchBatch(), so only one thread
139 // holds the JDBC cursor at a time. Batch conversion happens in parallel in C++.
140 RETURN_IF_ERROR(executor_.GetNext(params, result));
141 if (result->eos) eos_.store(true, std::memory_order_release);
142 return StatusFromThrift(result->status);
143}
144
145Status SharedJdbcConnection::Close(const extdatasource::TCloseParams& params,
146 extdatasource::TCloseResult* result) {

Callers 1

GetNextInputBatchMethod · 0.80

Calls 5

OKFunction · 0.85
StatusFromThriftFunction · 0.85
loadMethod · 0.45
GetNextMethod · 0.45
storeMethod · 0.45

Tested by

no test coverage detected