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

Public Member Functions

 AsciiQueryResultSet (const TResultSetMetadata &metadata, vector< string > *rowset)
 
 AsciiQueryResultSet (const TResultSetMetadata &metadata)
 
virtual ~AsciiQueryResultSet ()
 
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_
 
vector< string > * result_set_
 
scoped_ptr< vector< string > > owned_result_set_
 

Detailed Description

Definition at line 87 of file impala-beeswax-server.cc.

Constructor & Destructor Documentation

impala::ImpalaServer::AsciiQueryResultSet::AsciiQueryResultSet ( const TResultSetMetadata &  metadata,
vector< string > *  rowset 
)
inline

Definition at line 90 of file impala-beeswax-server.cc.

impala::ImpalaServer::AsciiQueryResultSet::AsciiQueryResultSet ( const TResultSetMetadata &  metadata)
inline

Definition at line 95 of file impala-beeswax-server.cc.

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

Definition at line 100 of file impala-beeswax-server.cc.

Member Function Documentation

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

Definition at line 105 of file impala-beeswax-server.cc.

References impala::OK.

virtual Status impala::ImpalaServer::AsciiQueryResultSet::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 124 of file impala-beeswax-server.cc.

References impala::OK.

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::AsciiQueryResultSet::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 138 of file impala-beeswax-server.cc.

References result_set_.

virtual int64_t impala::ImpalaServer::AsciiQueryResultSet::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 148 of file impala-beeswax-server.cc.

int64_t impala::ImpalaServer::QueryResultSet::ByteSize ( )
inlineinherited
virtual size_t impala::ImpalaServer::AsciiQueryResultSet::size ( )
inlinevirtual

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

Implements impala::ImpalaServer::QueryResultSet.

Definition at line 157 of file impala-beeswax-server.cc.

Member Data Documentation

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

Definition at line 161 of file impala-beeswax-server.cc.

scoped_ptr<vector<string> > impala::ImpalaServer::AsciiQueryResultSet::owned_result_set_
private

Definition at line 168 of file impala-beeswax-server.cc.

vector<string>* impala::ImpalaServer::AsciiQueryResultSet::result_set_
private

Definition at line 165 of file impala-beeswax-server.cc.

Referenced by AddRows().


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