Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
impala::ImpalaServer::QueryResultSet Class Referenceabstract
Inheritance diagram for impala::ImpalaServer::QueryResultSet:
Collaboration diagram for impala::ImpalaServer::QueryResultSet:

Public Member Functions

 QueryResultSet ()
 
virtual ~QueryResultSet ()
 
virtual Status AddOneRow (const std::vector< void * > &row, const std::vector< int > &scales)=0
 
virtual Status AddOneRow (const TResultRow &row)=0
 
virtual int AddRows (const QueryResultSet *other, int start_idx, int num_rows)=0
 
int64_t ByteSize ()
 Returns the approximate size of this result set in bytes. More...
 
virtual int64_t ByteSize (int start_idx, int num_rows)=0
 Returns the approximate size of the given range of rows in bytes. More...
 
virtual size_t size ()=0
 Returns the size of this result set in number of rows. More...
 

Detailed Description

Query result set stores converted rows returned by QueryExecState.fetchRows(). It provides an interface to convert Impala rows to external API rows. It is an abstract class. Subclass must implement AddOneRow().

Definition at line 253 of file impala-server.h.

Constructor & Destructor Documentation

impala::ImpalaServer::QueryResultSet::QueryResultSet ( )
inline

Definition at line 255 of file impala-server.h.

virtual impala::ImpalaServer::QueryResultSet::~QueryResultSet ( )
inlinevirtual

Definition at line 256 of file impala-server.h.

Member Function Documentation

virtual Status impala::ImpalaServer::QueryResultSet::AddOneRow ( const std::vector< void * > &  row,
const std::vector< int > &  scales 
)
pure virtual

Add the row (list of expr value) from a select query to this result set. When a row comes from a select query, the row is in the form of expr values (void*). 'scales' contains the values' scales (# of digits after decimal), with -1 indicating no scale specified.

Referenced by impala::ImpalaServer::QueryExecState::FetchRowsInternal().

virtual Status impala::ImpalaServer::QueryResultSet::AddOneRow ( const TResultRow &  row)
pure virtual

Add the TResultRow to this result set. When a row comes from a DDL/metadata operation, the row in the form of TResultRow.

Implemented in impala::ImpalaServer::HS2RowOrientedResultSet, impala::ImpalaServer::HS2ColumnarResultSet, and impala::ImpalaServer::AsciiQueryResultSet.

virtual int impala::ImpalaServer::QueryResultSet::AddRows ( const QueryResultSet other,
int  start_idx,
int  num_rows 
)
pure virtual

Copies rows in the range [start_idx, start_idx + num_rows) from the other result set into this result set. Returns the number of rows added to this result set. Returns 0 if the given range is out of bounds of the other result set.

Implemented in impala::ImpalaServer::HS2RowOrientedResultSet, impala::ImpalaServer::HS2ColumnarResultSet, and impala::ImpalaServer::AsciiQueryResultSet.

Referenced by impala::ImpalaServer::QueryExecState::FetchRowsInternal().

int64_t impala::ImpalaServer::QueryResultSet::ByteSize ( )
inline

Returns the approximate size of this result set in bytes.

Definition at line 275 of file impala-server.h.

References ByteSize(), and size().

Referenced by ByteSize(), and impala::ImpalaServer::QueryExecState::FetchRowsInternal().

virtual int64_t impala::ImpalaServer::QueryResultSet::ByteSize ( int  start_idx,
int  num_rows 
)
pure virtual

Returns the approximate size of the given range of rows in bytes.

Implemented in impala::ImpalaServer::HS2RowOrientedResultSet, impala::ImpalaServer::HS2ColumnarResultSet, and impala::ImpalaServer::AsciiQueryResultSet.

virtual size_t impala::ImpalaServer::QueryResultSet::size ( )
pure virtual

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