16 #ifndef IMPALA_EXEC_DATA_SOURCE_SCAN_NODE_H_
17 #define IMPALA_EXEC_DATA_SOURCE_SCAN_NODE_H_
20 #include <boost/scoped_ptr.hpp>
27 #include "gen-cpp/ExternalDataSource_types.h"
61 virtual void DebugString(
int indentation_level, std::stringstream* out)
const;
std::string scan_handle_
The opaque handle returned by the data source for the scan.
bool InputBatchHasNext()
True if input_batch_ has more rows.
DataSourceScanNode(ObjectPool *pool, const TPlanNode &tnode, const DescriptorTbl &descs)
virtual void Close(RuntimeState *state)
Close the scanner, and report errors.
A tuple with 0 materialised slots is represented as NULL.
virtual Status Open(RuntimeState *state)
Open the data source and initialize the first row batch.
int tuple_idx_
Tuple index in tuple row.
Status ValidateRowBatchSize()
Status MaterializeNextRow(MemPool *mem_pool)
Materializes the next row (next_row_idx_) into tuple_.
boost::scoped_ptr< ExternalDataSourceExecutor > data_source_executor_
Used to call the external data source.
std::vector< int > cols_next_val_idx_
virtual Status Reset(RuntimeState *state)
NYI.
std::vector< SlotDescriptor * > materialized_slots_
std::string DebugString() const
Returns a string representation in DFS order of the plan rooted at this.
const TDataSourceScanNode data_src_node_
Thrift structure describing the data source scan node.
virtual Status GetNext(RuntimeState *state, RowBatch *row_batch, bool *eos)
Fill the next row batch, calls GetNext() on the external scanner.
Tuple * tuple_
Current tuple.
Abstract base class of all scan nodes; introduces SetScanRange().
boost::scoped_ptr< extdatasource::TGetNextResult > input_batch_
Status GetNextInputBatch()
Gets the next batch from the data source, stored in input_batch_.
const TupleDescriptor * tuple_desc_
Descriptor of tuples read.
virtual Status Prepare(RuntimeState *state)
Load the data source library and create the ExternalDataSourceExecutor.