public long getEstimatedRowCount(Table table, List<PartitionKey> partitionKeys) {
        HiveMetaStoreTable hmsTbl = (HiveMetaStoreTable) table;
        List<Partition> partitions = hmsTbl.isUnPartitioned() ?
                Lists.newArrayList(hmsOps.getPartition(hmsTbl.getDbName(), hmsTbl.getTableName(), Lists.newArrayList())) :
                Lists.newArrayList(hmsOps.getPartitionByPartitionKeys(table, partitionKeys).values());

        List<RemoteFileInfo> remoteFileInfos =
                fileOps.getRemoteFileInfoForStats(table, partitions, GetRemoteFilesParams.newBuilder().build());
        long totalBytes = 0;
        for (RemoteFileInfo remoteFileInfo : remoteFileInfos) {
            for (RemoteFileDesc fileDesc : remoteFileInfo.getFiles()) {
                totalBytes += fileDesc.getLength();
            }
        }

        List<Column> dataColumns = table.getColumns().stream()
                .filter(column -> hmsTbl.getDataColumnNames().contains(column.getName()))
                .collect(Collectors.toList());

        if (totalBytes <= 0) {
            return 1;
        }

        long presentRowNums = totalBytes / dataColumns.stream().mapToInt(column -> column.getType().getTypeSize()).sum();
        long presentPartitionSize = remoteFileInfos.size();
        return presentRowNums / presentPartitionSize * partitionKeys.size();
    }
@Test
    public void testEstimatedRowCount() throws AnalysisException {
        FeConstants.runningUnitTest = true;
        HiveTable hiveTable = (HiveTable) hmsOps.getTable("db1", "table1");

        List<String> partitionNames = Lists.newArrayList("col1=1", "col1=2");
        Map<String, Partition> partitions = metastore.getPartitionsByNames("db1", "table1", partitionNames);
        fileOps.getRemoteFiles(hiveTable, Lists.newArrayList(partitions.values()), GetRemoteFilesParams.newBuilder().build());
        PartitionKey hivePartitionKey1 = PartitionUtil.createPartitionKey(
                Lists.newArrayList("1"), hiveTable.getPartitionColumns());
        PartitionKey hivePartitionKey2 = PartitionUtil.createPartitionKey(
                Lists.newArrayList("2"), hiveTable.getPartitionColumns());
        long res = statisticsProvider.getEstimatedRowCount(hiveTable, Lists.newArrayList(hivePartitionKey1, hivePartitionKey2));
        Assert.assertEquals(10, res);
    }