Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
com.cloudera.impala.analysis.TupleDescriptor Class Reference
Collaboration diagram for com.cloudera.impala.analysis.TupleDescriptor:

Public Member Functions

 TupleDescriptor (TupleId id, String debugName)
 
void addSlot (SlotDescriptor desc)
 
TupleId getId ()
 
ArrayList< SlotDescriptorgetSlots ()
 
Table getTable ()
 
TableName getTableName ()
 
void setPath (Path p)
 
Path getPath ()
 
void setType (StructType type)
 
StructType getType ()
 
int getByteSize ()
 
float getAvgSerializedSize ()
 
boolean isMaterialized ()
 
void setIsMaterialized (boolean value)
 
void setAliases (String[] aliases, boolean hasExplicitAlias)
 
boolean hasExplicitAlias ()
 
String getAlias ()
 
TableName getAliasAsName ()
 
String debugString ()
 
void materializeSlots ()
 
TTupleDescriptor toThrift ()
 
void computeMemLayout ()
 
boolean isCompatible (TupleDescriptor desc)
 

Private Attributes

final TupleId id_
 
final String debugName_
 
final ArrayList< SlotDescriptorslots_ = Lists.newArrayList()
 
Path path_
 
StructType type_
 
String[] aliases_
 
boolean hasExplicitAlias_
 
boolean isMaterialized_ = true
 
boolean hasMemLayout_ = false
 
int byteSize_
 
int numNullBytes_
 
float avgSerializedSize_
 

Detailed Description

A collection of slots that are organized in a CPU-friendly memory layout. A slot is a typed placeholder for a single value operated on at runtime. A slot can be named or anonymous. A named slot corresponds directly to a column or field that can be directly referenced in a query by its name. An anonymous slot represents an intermediate value produced during query execution, e.g., aggregation output. A tuple descriptor has an associated type and a list of slots. Its type is a struct that contains as its fields the list of all named slots covered by this tuple. The list of slots tracks the named slots that are actually referenced in a query, as well as all anonymous slots. Although not required, a tuple descriptor typically only has named or anonymous slots and not a mix of both.

For example, every table reference has a corresponding tuple descriptor. The columns of the table are represented by the tuple descriptor's type (struct type with one field per column). The list of slots tracks which of the table's columns are actually referenced. A similar explanation applies for collection references.

A tuple descriptor may be materialized or non-materialized. A non-materialized tuple descriptor acts as a placeholder for 'virtual' table references such as inline views, and must not be materialized at runtime.

Definition at line 54 of file TupleDescriptor.java.

Constructor & Destructor Documentation

com.cloudera.impala.analysis.TupleDescriptor.TupleDescriptor ( TupleId  id,
String  debugName 
)
inline

Member Function Documentation

void com.cloudera.impala.analysis.TupleDescriptor.addSlot ( SlotDescriptor  desc)
inline
TableName com.cloudera.impala.analysis.TupleDescriptor.getAliasAsName ( )
inline
float com.cloudera.impala.analysis.TupleDescriptor.getAvgSerializedSize ( )
inline
Path com.cloudera.impala.analysis.TupleDescriptor.getPath ( )
inline
TableName com.cloudera.impala.analysis.TupleDescriptor.getTableName ( )
inline
StructType com.cloudera.impala.analysis.TupleDescriptor.getType ( )
inline
boolean com.cloudera.impala.analysis.TupleDescriptor.isCompatible ( TupleDescriptor  desc)
inline

Returns true if tuples of type 'this' can be assigned to tuples of type 'desc' (checks that both have the same number of slots and that slots are of the same type)

Definition at line 248 of file TupleDescriptor.java.

References com.cloudera.impala.analysis.TupleDescriptor.slots_.

boolean com.cloudera.impala.analysis.TupleDescriptor.isMaterialized ( )
inline
void com.cloudera.impala.analysis.TupleDescriptor.materializeSlots ( )
inline

Materialize all slots.

Definition at line 155 of file TupleDescriptor.java.

References com.cloudera.impala.analysis.TupleDescriptor.slots_.

void com.cloudera.impala.analysis.TupleDescriptor.setAliases ( String[]  aliases,
boolean  hasExplicitAlias 
)
inline
void com.cloudera.impala.analysis.TupleDescriptor.setIsMaterialized ( boolean  value)
inline
void com.cloudera.impala.analysis.TupleDescriptor.setPath ( Path  p)
inline
void com.cloudera.impala.analysis.TupleDescriptor.setType ( StructType  type)
inline

Member Data Documentation

float com.cloudera.impala.analysis.TupleDescriptor.avgSerializedSize_
private
final String com.cloudera.impala.analysis.TupleDescriptor.debugName_
private
boolean com.cloudera.impala.analysis.TupleDescriptor.hasExplicitAlias_
private
boolean com.cloudera.impala.analysis.TupleDescriptor.hasMemLayout_ = false
private
boolean com.cloudera.impala.analysis.TupleDescriptor.isMaterialized_ = true
private
int com.cloudera.impala.analysis.TupleDescriptor.numNullBytes_
private

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