Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
Public Member Functions | |
TupleDescriptor (TupleId id, String debugName) | |
void | addSlot (SlotDescriptor desc) |
TupleId | getId () |
ArrayList< SlotDescriptor > | getSlots () |
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< SlotDescriptor > | slots_ = Lists.newArrayList() |
Path | path_ |
StructType | type_ |
String[] | aliases_ |
boolean | hasExplicitAlias_ |
boolean | isMaterialized_ = true |
boolean | hasMemLayout_ = false |
int | byteSize_ |
int | numNullBytes_ |
float | avgSerializedSize_ |
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.
|
inline |
Definition at line 84 of file TupleDescriptor.java.
References com.cloudera.impala.analysis.TupleDescriptor.debugName_, com.cloudera.impala.analysis.TupleDescriptor.id_, and com.cloudera.impala.analysis.TupleDescriptor.path_.
|
inline |
Definition at line 90 of file TupleDescriptor.java.
References com.cloudera.impala.analysis.TupleDescriptor.hasMemLayout_.
|
inline |
Definition at line 173 of file TupleDescriptor.java.
References com.cloudera.impala.analysis.TupleDescriptor.avgSerializedSize_, com.cloudera.impala.analysis.TupleDescriptor.getAvgSerializedSize(), com.cloudera.impala.catalog.ColumnStats.hasAvgSerializedSize(), com.cloudera.impala.analysis.TupleDescriptor.hasMemLayout_, com.cloudera.impala.analysis.TupleDescriptor.numNullBytes_, offset, and com.cloudera.impala.analysis.TupleDescriptor.slots_.
|
inline |
Definition at line 136 of file TupleDescriptor.java.
References com.cloudera.impala.analysis.TupleDescriptor.byteSize_, com.cloudera.impala.analysis.TupleDescriptor.debugName_, com.cloudera.impala.analysis.TupleDescriptor.getTable(), com.cloudera.impala.analysis.TupleDescriptor.id_, com.cloudera.impala.analysis.TupleDescriptor.isMaterialized_, and com.cloudera.impala.analysis.TupleDescriptor.slots_.
|
inline |
Definition at line 131 of file TupleDescriptor.java.
References com.cloudera.impala.analysis.TupleDescriptor.aliases_.
Referenced by com.cloudera.impala.planner.DataSourceScanNode.getNodeExplainString(), and com.cloudera.impala.planner.HBaseScanNode.getNodeExplainString().
|
inline |
Definition at line 132 of file TupleDescriptor.java.
References com.cloudera.impala.analysis.TupleDescriptor.aliases_.
|
inline |
Definition at line 123 of file TupleDescriptor.java.
References com.cloudera.impala.analysis.TupleDescriptor.avgSerializedSize_.
Referenced by com.cloudera.impala.analysis.TupleDescriptor.computeMemLayout().
|
inline |
Definition at line 122 of file TupleDescriptor.java.
References com.cloudera.impala.analysis.TupleDescriptor.byteSize_.
Referenced by com.cloudera.impala.planner.AnalyticPlanner.SortGroup.SizeLt.compare(), and com.cloudera.impala.analysis.DescriptorTable.copyTupleDescriptor().
|
inline |
Definition at line 95 of file TupleDescriptor.java.
References com.cloudera.impala.analysis.TupleDescriptor.id_.
Referenced by com.cloudera.impala.planner.ScanNode.debugString(), com.cloudera.impala.planner.AnalyticEvalNode.debugString(), com.cloudera.impala.planner.HBaseScanNode.debugString(), com.cloudera.impala.planner.DataSourceScanNode.debugString(), com.cloudera.impala.planner.ScanNode.ScanNode(), com.cloudera.impala.planner.HBaseScanNode.toThrift(), com.cloudera.impala.planner.DataSourceScanNode.toThrift(), and com.cloudera.impala.planner.HdfsScanNode.toThrift().
|
inline |
Definition at line 119 of file TupleDescriptor.java.
References com.cloudera.impala.analysis.TupleDescriptor.path_.
Referenced by com.cloudera.impala.analysis.SlotDescriptor.getAbsolutePath().
|
inline |
Definition at line 96 of file TupleDescriptor.java.
References com.cloudera.impala.analysis.TupleDescriptor.slots_.
Referenced by com.cloudera.impala.planner.HdfsScanNode.computeCosts(), com.cloudera.impala.analysis.DescriptorTable.copyTupleDescriptor(), com.cloudera.impala.planner.HBaseScanNode.createHBaseFilters(), com.cloudera.impala.analysis.AggregateInfo.createSecondPhaseAggInfo(), com.cloudera.impala.analysis.AggregateInfo.createSmaps(), com.cloudera.impala.planner.AnalyticPlanner.createSortInfo(), com.cloudera.impala.analysis.Analyzer.getColumnSlot(), com.cloudera.impala.analysis.AnalyticInfo.getRefdSlots(), com.cloudera.impala.planner.ScanNode.getStatsExplainString(), com.cloudera.impala.planner.ScanNode.isTableMissingColumnStats(), and com.cloudera.impala.analysis.UnionStmt.materializeRequiredSlots().
|
inline |
Definition at line 97 of file TupleDescriptor.java.
References com.cloudera.impala.analysis.TupleDescriptor.path_.
Referenced by com.cloudera.impala.planner.PlanFragment.computeCanAddSlotFilters(), com.cloudera.impala.planner.HdfsScanNode.computeCosts(), com.cloudera.impala.planner.HBaseScanNode.computeScanRangeLocations(), com.cloudera.impala.planner.HBaseScanNode.computeStats(), com.cloudera.impala.planner.DataSourceScanNode.DataSourceScanNode(), com.cloudera.impala.analysis.TupleDescriptor.debugString(), com.cloudera.impala.planner.HBaseScanNode.debugString(), com.cloudera.impala.planner.HdfsScanNode.getDisplayLabelDetail(), com.cloudera.impala.planner.HBaseScanNode.getNodeExplainString(), com.cloudera.impala.planner.HdfsScanNode.getNodeExplainString(), com.cloudera.impala.planner.ScanNode.getStatsExplainString(), com.cloudera.impala.analysis.TupleDescriptor.getTableName(), com.cloudera.impala.planner.ScanNode.isTableMissingTableStats(), com.cloudera.impala.analysis.TupleDescriptor.toThrift(), and com.cloudera.impala.planner.HBaseScanNode.toThrift().
|
inline |
Definition at line 101 of file TupleDescriptor.java.
References com.cloudera.impala.analysis.TupleDescriptor.getTable().
|
inline |
Definition at line 121 of file TupleDescriptor.java.
References com.cloudera.impala.analysis.TupleDescriptor.type_.
|
inline |
Definition at line 130 of file TupleDescriptor.java.
References com.cloudera.impala.analysis.TupleDescriptor.hasExplicitAlias_.
Referenced by com.cloudera.impala.planner.HdfsScanNode.getDisplayLabelDetail(), com.cloudera.impala.analysis.Analyzer.registerTableRef(), and com.cloudera.impala.analysis.TupleDescriptor.setAliases().
|
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_.
|
inline |
Definition at line 124 of file TupleDescriptor.java.
References com.cloudera.impala.analysis.TupleDescriptor.isMaterialized_.
|
inline |
Materialize all slots.
Definition at line 155 of file TupleDescriptor.java.
References com.cloudera.impala.analysis.TupleDescriptor.slots_.
|
inline |
|
inline |
Definition at line 125 of file TupleDescriptor.java.
References com.cloudera.impala.analysis.TupleDescriptor.isMaterialized_.
|
inline |
Definition at line 105 of file TupleDescriptor.java.
References com.cloudera.impala.analysis.Path.destTable(), com.cloudera.impala.analysis.TupleDescriptor.path_, and com.cloudera.impala.analysis.TupleDescriptor.type_.
|
inline |
Definition at line 120 of file TupleDescriptor.java.
References com.cloudera.impala.analysis.TupleDescriptor.type_.
|
inline |
Definition at line 161 of file TupleDescriptor.java.
References com.cloudera.impala.analysis.TupleDescriptor.byteSize_, com.cloudera.impala.analysis.TupleDescriptor.getTable(), com.cloudera.impala.analysis.TupleDescriptor.id_, com.cloudera.impala.analysis.TupleDescriptor.numNullBytes_, and com.cloudera.impala.analysis.TupleDescriptor.path_.
|
private |
Definition at line 67 of file TupleDescriptor.java.
Referenced by com.cloudera.impala.analysis.TupleDescriptor.getAlias(), com.cloudera.impala.analysis.TupleDescriptor.getAliasAsName(), and com.cloudera.impala.analysis.TupleDescriptor.setAliases().
|
private |
Definition at line 82 of file TupleDescriptor.java.
Referenced by com.cloudera.impala.analysis.TupleDescriptor.computeMemLayout(), and com.cloudera.impala.analysis.TupleDescriptor.getAvgSerializedSize().
|
private |
Definition at line 80 of file TupleDescriptor.java.
Referenced by com.cloudera.impala.analysis.TupleDescriptor.debugString(), com.cloudera.impala.analysis.TupleDescriptor.getByteSize(), and com.cloudera.impala.analysis.TupleDescriptor.toThrift().
|
private |
Definition at line 56 of file TupleDescriptor.java.
Referenced by com.cloudera.impala.analysis.TupleDescriptor.debugString(), and com.cloudera.impala.analysis.TupleDescriptor.TupleDescriptor().
|
private |
Definition at line 72 of file TupleDescriptor.java.
Referenced by com.cloudera.impala.analysis.TupleDescriptor.hasExplicitAlias(), and com.cloudera.impala.analysis.TupleDescriptor.setAliases().
|
private |
Definition at line 78 of file TupleDescriptor.java.
Referenced by com.cloudera.impala.analysis.TupleDescriptor.addSlot(), and com.cloudera.impala.analysis.TupleDescriptor.computeMemLayout().
|
private |
Definition at line 55 of file TupleDescriptor.java.
Referenced by com.cloudera.impala.analysis.TupleDescriptor.debugString(), com.cloudera.impala.analysis.TupleDescriptor.getId(), com.cloudera.impala.analysis.TupleDescriptor.toThrift(), and com.cloudera.impala.analysis.TupleDescriptor.TupleDescriptor().
|
private |
Definition at line 75 of file TupleDescriptor.java.
Referenced by com.cloudera.impala.analysis.TupleDescriptor.debugString(), com.cloudera.impala.analysis.TupleDescriptor.isMaterialized(), and com.cloudera.impala.analysis.TupleDescriptor.setIsMaterialized().
|
private |
Definition at line 81 of file TupleDescriptor.java.
Referenced by com.cloudera.impala.analysis.TupleDescriptor.computeMemLayout(), and com.cloudera.impala.analysis.TupleDescriptor.toThrift().
|
private |
Definition at line 61 of file TupleDescriptor.java.
Referenced by com.cloudera.impala.analysis.TupleDescriptor.getPath(), com.cloudera.impala.analysis.TupleDescriptor.getTable(), com.cloudera.impala.analysis.TupleDescriptor.setPath(), com.cloudera.impala.analysis.TupleDescriptor.toThrift(), and com.cloudera.impala.analysis.TupleDescriptor.TupleDescriptor().
|
private |
Definition at line 57 of file TupleDescriptor.java.
Referenced by com.cloudera.impala.analysis.TupleDescriptor.computeMemLayout(), com.cloudera.impala.analysis.TupleDescriptor.debugString(), com.cloudera.impala.analysis.TupleDescriptor.getSlots(), com.cloudera.impala.analysis.TupleDescriptor.isCompatible(), and com.cloudera.impala.analysis.TupleDescriptor.materializeSlots().
|
private |
Definition at line 64 of file TupleDescriptor.java.
Referenced by com.cloudera.impala.analysis.TupleDescriptor.getType(), com.cloudera.impala.analysis.TupleDescriptor.setPath(), and com.cloudera.impala.analysis.TupleDescriptor.setType().