Sets 'tableStats_' by extracting the table statistics from the given HMS table.
(org.apache.hadoop.hive.metastore.api.Table msTbl)
| 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); |