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

Public Member Functions

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

Private Attributes

const TResultSetMetadata & metadata_
 
TRowSet * result_set_
 
scoped_ptr< TRowSet > owned_result_set_
 

Detailed Description

Definition at line 312 of file impala-hs2-server.cc.

Constructor & Destructor Documentation

impala::ImpalaServer::HS2RowOrientedResultSet::HS2RowOrientedResultSet ( const TResultSetMetadata &  metadata,
TRowSet *  rowset = NULL 
)
inline

Definition at line 315 of file impala-hs2-server.cc.

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

Definition at line 323 of file impala-hs2-server.cc.

Member Function Documentation

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

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::HS2RowOrientedResultSet::AddOneRow ( const vector< void * > &  col_values,
const vector< int > &  scales 
)
inlinevirtual

Definition at line 326 of file impala-hs2-server.cc.

References impala::ExprValueToHS2TColumnValue(), and impala::OK.

virtual Status impala::ImpalaServer::HS2RowOrientedResultSet::AddOneRow ( const TResultRow &  row)
inlinevirtual

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

Implements impala::ImpalaServer::QueryResultSet.

Definition at line 340 of file impala-hs2-server.cc.

References impala::OK, and impala::TColumnValueToHS2TColumnValue().

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

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.

Implements impala::ImpalaServer::QueryResultSet.

Definition at line 353 of file impala-hs2-server.cc.

References result_set_.

int64_t impala::ImpalaServer::QueryResultSet::ByteSize ( )
inlineinherited
virtual int64_t impala::ImpalaServer::HS2RowOrientedResultSet::ByteSize ( int  start_idx,
int  num_rows 
)
inlinevirtual

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

Implements impala::ImpalaServer::QueryResultSet.

Definition at line 364 of file impala-hs2-server.cc.

References impala::ByteSize().

virtual size_t impala::ImpalaServer::HS2RowOrientedResultSet::size ( )
inlinevirtual

Returns the size of this result set in number of rows.

Implements impala::ImpalaServer::QueryResultSet.

Definition at line 374 of file impala-hs2-server.cc.

Member Data Documentation

const TResultSetMetadata& impala::ImpalaServer::HS2RowOrientedResultSet::metadata_
private

Definition at line 378 of file impala-hs2-server.cc.

scoped_ptr<TRowSet> impala::ImpalaServer::HS2RowOrientedResultSet::owned_result_set_
private

Definition at line 385 of file impala-hs2-server.cc.

TRowSet* impala::ImpalaServer::HS2RowOrientedResultSet::result_set_
private

Definition at line 382 of file impala-hs2-server.cc.

Referenced by AddRows().


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