MCPcopy Create free account
hub / github.com/apache/impala / setTableStats

Method setTableStats

fe/src/main/java/org/apache/impala/catalog/Table.java:459–469  ·  view source on GitHub ↗

Sets 'tableStats_' by extracting the table statistics from the given HMS table.

(org.apache.hadoop.hive.metastore.api.Table msTbl)

Source from the content-addressed store, hash-verified

457 * Sets 'tableStats_' by extracting the table statistics from the given HMS table.
458 */
459 public void setTableStats(org.apache.hadoop.hive.metastore.api.Table msTbl) {
460 long rowCount = FeCatalogUtils.getRowCount(msTbl.getParameters());
461 if (testStats_ != null) {
462 tableStats_.setTotal_file_bytes(testStats_.getTotalSize());
463 testMetadataScale_ = (double) testStats_.getNumRows() / rowCount;
464 rowCount = testStats_.getNumRows();
465 } else {
466 tableStats_.setTotal_file_bytes(FeCatalogUtils.getTotalSize(msTbl.getParameters()));
467 }
468 tableStats_.setNum_rows(rowCount);
469 }
470
471 public void addColumn(Column col) {
472 colsByPos_.add(col);

Callers 8

setStatsMethod · 0.80
loadMethod · 0.80
loadTableMetadataMethod · 0.80
loadMethod · 0.80
loadMethod · 0.80
loadMethod · 0.80
createCtasTargetMethod · 0.80
loadMethod · 0.80

Calls 4

getRowCountMethod · 0.95
getTotalSizeMethod · 0.95
getParametersMethod · 0.65
getNumRowsMethod · 0.65

Tested by 1

setStatsMethod · 0.64