Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
Public Member Functions | |
ColumnStats (Type colType) | |
ColumnStats | add (ColumnStats other) |
void | setAvgSerializedSize (float avgSize) |
void | setMaxSize (long maxSize) |
long | getNumDistinctValues () |
void | setNumDistinctValues (long numDistinctValues) |
void | setNumNulls (long numNulls) |
double | getAvgSerializedSize () |
double | getAvgSize () |
long | getMaxSize () |
boolean | hasNulls () |
long | getNumNulls () |
boolean | hasAvgSerializedSize () |
boolean | hasMaxSize () |
boolean | hasNumDistinctValues () |
boolean | hasStats () |
boolean | update (Type colType, ColumnStatisticsData statsData) |
void | update (Type colType, TColumnStats stats) |
TColumnStats | toThrift () |
String | toString () |
Static Public Member Functions | |
static ColumnStats | fromExpr (Expr expr) |
static boolean | isSupportedColType (Type colType) |
Private Member Functions | |
void | initColStats (Type colType) |
Private Attributes | |
double | avgSize_ |
double | avgSerializedSize_ |
long | maxSize_ |
long | numDistinctValues_ |
long | numNulls_ |
Static Private Attributes | |
static final Logger | LOG = LoggerFactory.getLogger(ColumnStats.class) |
static final Set< PrimitiveType > | SUPPORTED_COL_TYPES |
Statistics for a single column.
Definition at line 39 of file ColumnStats.java.
|
inline |
Definition at line 58 of file ColumnStats.java.
References com.cloudera.impala.catalog.ColumnStats.initColStats().
Referenced by com.cloudera.impala.catalog.ColumnStats.fromExpr().
|
inline |
Adds other's numDistinctValues and numNulls to this ColumnStats. If this or other's stats are invalid, sets the corresponding stat to invalid, Returns this with the updated stats. This method is used to aggregate stats for slots that originate from multiple source slots, e.g., those produced by union queries.
Definition at line 107 of file ColumnStats.java.
References com.cloudera.impala.catalog.ColumnStats.numDistinctValues_, and com.cloudera.impala.catalog.ColumnStats.numNulls_.
Referenced by com.cloudera.impala.catalog.ColumnStats.toString().
|
inlinestatic |
Creates ColumnStats from the given expr. Sets numDistinctValues and if the expr is a SlotRef also numNulls.
Definition at line 84 of file ColumnStats.java.
References com.cloudera.impala.catalog.ColumnStats.ColumnStats(), and com.cloudera.impala.analysis.Expr.getType().
|
inline |
Definition at line 128 of file ColumnStats.java.
References com.cloudera.impala.catalog.ColumnStats.avgSerializedSize_.
|
inline |
Definition at line 129 of file ColumnStats.java.
References com.cloudera.impala.catalog.ColumnStats.avgSize_.
|
inline |
Definition at line 130 of file ColumnStats.java.
References com.cloudera.impala.catalog.ColumnStats.maxSize_.
|
inline |
Definition at line 123 of file ColumnStats.java.
References com.cloudera.impala.catalog.ColumnStats.numDistinctValues_.
|
inline |
Definition at line 132 of file ColumnStats.java.
References com.cloudera.impala.catalog.ColumnStats.numNulls_.
|
inline |
Definition at line 133 of file ColumnStats.java.
References com.cloudera.impala.catalog.ColumnStats.avgSerializedSize_.
Referenced by com.cloudera.impala.analysis.TupleDescriptor.computeMemLayout().
|
inline |
Definition at line 134 of file ColumnStats.java.
References com.cloudera.impala.catalog.ColumnStats.maxSize_.
|
inline |
Definition at line 131 of file ColumnStats.java.
References com.cloudera.impala.catalog.ColumnStats.numNulls_.
|
inline |
Definition at line 135 of file ColumnStats.java.
References com.cloudera.impala.catalog.ColumnStats.numDistinctValues_.
Referenced by com.cloudera.impala.planner.HashJoinNode.getJoinCardinality(), and com.cloudera.impala.planner.HashJoinNode.getNdv().
|
inline |
Definition at line 136 of file ColumnStats.java.
References com.cloudera.impala.catalog.ColumnStats.numDistinctValues_, and com.cloudera.impala.catalog.ColumnStats.numNulls_.
|
inlineprivate |
Initializes all column stats values as "unknown". For fixed-length type (those which don't need additional storage besides the slot they occupy), sets avgSerializedSize and maxSize to their slot size.
Definition at line 67 of file ColumnStats.java.
References com.cloudera.impala.catalog.ColumnStats.avgSerializedSize_, com.cloudera.impala.catalog.ColumnStats.avgSize_, com.cloudera.impala.catalog.Type.isFixedLengthType(), com.cloudera.impala.catalog.ColumnStats.maxSize_, com.cloudera.impala.catalog.ColumnStats.numDistinctValues_, and com.cloudera.impala.catalog.ColumnStats.numNulls_.
Referenced by com.cloudera.impala.catalog.ColumnStats.ColumnStats(), and com.cloudera.impala.catalog.ColumnStats.update().
|
inlinestatic |
Returns true if the given PrimitiveType supports column stats updates.
Definition at line 221 of file ColumnStats.java.
References com.cloudera.impala.catalog.Type.isScalarType().
Referenced by com.cloudera.impala.catalog.Table.loadAllColumnStats(), and com.cloudera.impala.catalog.ColumnStats.update().
|
inline |
Definition at line 121 of file ColumnStats.java.
|
inline |
Definition at line 122 of file ColumnStats.java.
|
inline |
Definition at line 124 of file ColumnStats.java.
|
inline |
Definition at line 127 of file ColumnStats.java.
|
inline |
Definition at line 249 of file ColumnStats.java.
References com.cloudera.impala.catalog.ColumnStats.add(), com.cloudera.impala.catalog.ColumnStats.avgSerializedSize_, com.cloudera.impala.catalog.ColumnStats.maxSize_, com.cloudera.impala.catalog.ColumnStats.numDistinctValues_, and com.cloudera.impala.catalog.ColumnStats.numNulls_.
|
inline |
|
inline |
Updates the stats with the given ColumnStatisticsData. If the ColumnStatisticsData is not compatible with the given colType, all stats are initialized based on initColStats(). Returns false if the ColumnStatisticsData data was incompatible with the given column type, otherwise returns true.
Definition at line 145 of file ColumnStats.java.
References com.cloudera.impala.catalog.ColumnStats.avgSerializedSize_, com.cloudera.impala.catalog.ColumnStats.avgSize_, com.cloudera.impala.catalog.Type.getPrimitiveType(), com.cloudera.impala.catalog.ColumnStats.initColStats(), com.cloudera.impala.catalog.ColumnStats.isSupportedColType(), com.cloudera.impala.catalog.ColumnStats.maxSize_, com.cloudera.impala.catalog.ColumnStats.numDistinctValues_, and com.cloudera.impala.catalog.ColumnStats.numNulls_.
|
inline |
Definition at line 227 of file ColumnStats.java.
References com.cloudera.impala.catalog.ColumnStats.avgSerializedSize_, com.cloudera.impala.catalog.ColumnStats.avgSize_, com.cloudera.impala.catalog.PrimitiveType.BINARY, com.cloudera.impala.catalog.Type.getPrimitiveType(), com.cloudera.impala.catalog.ColumnStats.initColStats(), com.cloudera.impala.catalog.ColumnStats.maxSize_, com.cloudera.impala.catalog.ColumnStats.numDistinctValues_, and com.cloudera.impala.catalog.ColumnStats.numNulls_.
|
private |
Definition at line 53 of file ColumnStats.java.
Referenced by com.cloudera.impala.catalog.ColumnStats.getAvgSerializedSize(), com.cloudera.impala.catalog.ColumnStats.hasAvgSerializedSize(), com.cloudera.impala.catalog.ColumnStats.initColStats(), com.cloudera.impala.catalog.ColumnStats.toString(), and com.cloudera.impala.catalog.ColumnStats.update().
|
private |
|
staticprivate |
Definition at line 40 of file ColumnStats.java.
|
private |
Definition at line 54 of file ColumnStats.java.
Referenced by com.cloudera.impala.catalog.ColumnStats.getMaxSize(), com.cloudera.impala.catalog.ColumnStats.hasMaxSize(), com.cloudera.impala.catalog.ColumnStats.initColStats(), com.cloudera.impala.catalog.ColumnStats.toString(), com.cloudera.impala.catalog.ColumnStats.toThrift(), and com.cloudera.impala.catalog.ColumnStats.update().
|
private |
Definition at line 55 of file ColumnStats.java.
Referenced by com.cloudera.impala.catalog.ColumnStats.add(), com.cloudera.impala.catalog.ColumnStats.getNumDistinctValues(), com.cloudera.impala.catalog.ColumnStats.hasNumDistinctValues(), com.cloudera.impala.catalog.ColumnStats.hasStats(), com.cloudera.impala.catalog.ColumnStats.initColStats(), com.cloudera.impala.catalog.ColumnStats.toString(), com.cloudera.impala.catalog.ColumnStats.toThrift(), and com.cloudera.impala.catalog.ColumnStats.update().
|
private |
Definition at line 56 of file ColumnStats.java.
Referenced by com.cloudera.impala.catalog.ColumnStats.add(), com.cloudera.impala.catalog.ColumnStats.getNumNulls(), com.cloudera.impala.catalog.ColumnStats.hasNulls(), com.cloudera.impala.catalog.ColumnStats.hasStats(), com.cloudera.impala.catalog.ColumnStats.initColStats(), com.cloudera.impala.catalog.ColumnStats.toString(), com.cloudera.impala.catalog.ColumnStats.toThrift(), and com.cloudera.impala.catalog.ColumnStats.update().
|
staticprivate |
Definition at line 43 of file ColumnStats.java.