public PartitionsStatsResult deepCopy() { return new PartitionsStatsResult(this); }
result = new PartitionsStatsResult(map); } finally { endFunction("get_partitions_statistics_req", result == null, null, tblName);
public PartitionsStatsResult deepCopy() { return new PartitionsStatsResult(this); }
public PartitionsStatsResult deepCopy() { return new PartitionsStatsResult(this); }
public PartitionsStatsResult deepCopy() { return new PartitionsStatsResult(this); }
@Override public PartitionsStatsResult get_partitions_statistics_req(PartitionsStatsRequest request) throws MetaException, NoSuchObjectException, TException { String dbName = request.getDbName().toLowerCase(); String tblName = request.getTblName().toLowerCase(); startFunction("get_partitions_statistics_req: db=" + dbName + " table=" + tblName); PartitionsStatsResult result = null; List<String> lowerCaseColNames = new ArrayList<String>(request.getColNames().size()); for (String colName : request.getColNames()) { lowerCaseColNames.add(colName.toLowerCase()); } List<String> lowerCasePartNames = new ArrayList<String>(request.getPartNames().size()); for (String partName : request.getPartNames()) { lowerCasePartNames.add(lowerCaseConvertPartName(partName)); } try { List<ColumnStatistics> stats = getMS().getPartitionColumnStatistics( dbName, tblName, lowerCasePartNames, lowerCaseColNames); Map<String, List<ColumnStatisticsObj>> map = new HashMap<String, List<ColumnStatisticsObj>>(); for (ColumnStatistics stat : stats) { map.put(stat.getStatsDesc().getPartName(), stat.getStatsObj()); } result = new PartitionsStatsResult(map); } finally { endFunction("get_partitions_statistics_req: ", result == null, null, tblName); } return result; }
@Override public PartitionsStatsResult get_partitions_statistics_req(PartitionsStatsRequest request) throws MetaException, NoSuchObjectException, TException { String dbName = request.getDbName().toLowerCase(); String tblName = request.getTblName().toLowerCase(); startFunction("get_partitions_statistics_req: db=" + dbName + " table=" + tblName); PartitionsStatsResult result = null; List<String> lowerCaseColNames = new ArrayList<String>(request.getColNames().size()); for (String colName : request.getColNames()) { lowerCaseColNames.add(colName.toLowerCase()); } List<String> lowerCasePartNames = new ArrayList<String>(request.getPartNames().size()); for (String partName : request.getPartNames()) { lowerCasePartNames.add(lowerCaseConvertPartName(partName)); } try { List<ColumnStatistics> stats = getMS().getPartitionColumnStatistics( dbName, tblName, lowerCasePartNames, lowerCaseColNames); Map<String, List<ColumnStatisticsObj>> map = new HashMap<String, List<ColumnStatisticsObj>>(); for (ColumnStatistics stat : stats) { map.put(stat.getStatsDesc().getPartName(), stat.getStatsObj()); } result = new PartitionsStatsResult(map); } finally { endFunction("get_partitions_statistics_req: ", result == null, null, tblName); } return result; }
@Override public PartitionsStatsResult get_partitions_statistics_req(PartitionsStatsRequest request) throws TException { String catName = request.isSetCatName() ? request.getCatName().toLowerCase() : getDefaultCatalog(conf); String dbName = request.getDbName().toLowerCase(); String tblName = request.getTblName().toLowerCase(); startFunction("get_partitions_statistics_req", ": table=" + getCatalogQualifiedTableName(catName, dbName, tblName)); PartitionsStatsResult result = null; List<String> lowerCaseColNames = new ArrayList<>(request.getColNames().size()); for (String colName : request.getColNames()) { lowerCaseColNames.add(colName.toLowerCase()); } List<String> lowerCasePartNames = new ArrayList<>(request.getPartNames().size()); for (String partName : request.getPartNames()) { lowerCasePartNames.add(lowerCaseConvertPartName(partName)); } try { List<ColumnStatistics> stats = getMS().getPartitionColumnStatistics( catName, dbName, tblName, lowerCasePartNames, lowerCaseColNames); Map<String, List<ColumnStatisticsObj>> map = new HashMap<>(); for (ColumnStatistics stat : stats) { map.put(stat.getStatsDesc().getPartName(), stat.getStatsObj()); } result = new PartitionsStatsResult(map); } finally { endFunction("get_partitions_statistics_req", result == null, null, tblName); } return result; }