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

Public Member Functions

 HS2ColumnarResultSet (const TResultSetMetadata &metadata, TRowSet *rowset=NULL)
 
virtual ~HS2ColumnarResultSet ()
 
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 Member Functions

void InitColumns ()
 

Private Attributes

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

Detailed Description

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

Constructor & Destructor Documentation

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

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

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

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

Member Function Documentation

virtual Status impala::ImpalaServer::HS2ColumnarResultSet::AddOneRow ( const vector< void * > &  col_values,
const vector< int > &  scales 
)
inlinevirtual

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

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

virtual Status impala::ImpalaServer::HS2ColumnarResultSet::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 149 of file impala-hs2-server.cc.

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

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 int impala::ImpalaServer::HS2ColumnarResultSet::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 162 of file impala-hs2-server.cc.

References metadata_, num_rows_, result_set_, impala::StitchNulls(), impala::ThriftToType(), and impala::TypeToString().

virtual int64_t impala::ImpalaServer::HS2ColumnarResultSet::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 243 of file impala-hs2-server.cc.

References impala::TColumnByteSize().

int64_t impala::ImpalaServer::QueryResultSet::ByteSize ( )
inlineinherited
void impala::ImpalaServer::HS2ColumnarResultSet::InitColumns ( )
inlineprivate

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

References impala::ThriftToType(), and impala::TypeToString().

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

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

Implements impala::ImpalaServer::QueryResultSet.

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

Member Data Documentation

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

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

Referenced by AddRows().

int64_t impala::ImpalaServer::HS2ColumnarResultSet::num_rows_
private

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

Referenced by AddRows().

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

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

TRowSet* impala::ImpalaServer::HS2ColumnarResultSet::result_set_
private

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

Referenced by AddRows().


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