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

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< PrimitiveTypeSUPPORTED_COL_TYPES
 

Detailed Description

Statistics for a single column.

Definition at line 39 of file ColumnStats.java.

Constructor & Destructor Documentation

com.cloudera.impala.catalog.ColumnStats.ColumnStats ( Type  colType)
inline

Member Function Documentation

ColumnStats com.cloudera.impala.catalog.ColumnStats.add ( ColumnStats  other)
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().

static ColumnStats com.cloudera.impala.catalog.ColumnStats.fromExpr ( Expr  expr)
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().

double com.cloudera.impala.catalog.ColumnStats.getAvgSerializedSize ( )
inline
double com.cloudera.impala.catalog.ColumnStats.getAvgSize ( )
inline
long com.cloudera.impala.catalog.ColumnStats.getMaxSize ( )
inline
long com.cloudera.impala.catalog.ColumnStats.getNumDistinctValues ( )
inline
long com.cloudera.impala.catalog.ColumnStats.getNumNulls ( )
inline
boolean com.cloudera.impala.catalog.ColumnStats.hasAvgSerializedSize ( )
inline
boolean com.cloudera.impala.catalog.ColumnStats.hasMaxSize ( )
inline
boolean com.cloudera.impala.catalog.ColumnStats.hasNulls ( )
inline
boolean com.cloudera.impala.catalog.ColumnStats.hasNumDistinctValues ( )
inline
boolean com.cloudera.impala.catalog.ColumnStats.hasStats ( )
inline
void com.cloudera.impala.catalog.ColumnStats.initColStats ( Type  colType)
inlineprivate
static boolean com.cloudera.impala.catalog.ColumnStats.isSupportedColType ( Type  colType)
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().

void com.cloudera.impala.catalog.ColumnStats.setAvgSerializedSize ( float  avgSize)
inline

Definition at line 121 of file ColumnStats.java.

void com.cloudera.impala.catalog.ColumnStats.setMaxSize ( long  maxSize)
inline

Definition at line 122 of file ColumnStats.java.

void com.cloudera.impala.catalog.ColumnStats.setNumDistinctValues ( long  numDistinctValues)
inline

Definition at line 124 of file ColumnStats.java.

void com.cloudera.impala.catalog.ColumnStats.setNumNulls ( long  numNulls)
inline

Definition at line 127 of file ColumnStats.java.

boolean com.cloudera.impala.catalog.ColumnStats.update ( Type  colType,
ColumnStatisticsData  statsData 
)
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_.

Member Data Documentation

final Logger com.cloudera.impala.catalog.ColumnStats.LOG = LoggerFactory.getLogger(ColumnStats.class)
staticprivate

Definition at line 40 of file ColumnStats.java.


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