@Override
    public List<PartitionInfo> getPartitions(Table table, List<String> partitionNames) {
        if (partitionNames == null || partitionNames.isEmpty()) {
            return Collections.emptyList();
        }
        OdpsTable odpsTable = (OdpsTable) table;
        List<Partition> partitions = get(partitionCache,
                OdpsTableName.of(odpsTable.getDbName(), odpsTable.getTableName()));
        if (partitions == null || partitions.isEmpty()) {
            return Collections.emptyList();
        }
        Set<String> filter = new HashSet<>(partitionNames);
        return partitions.stream()
                .filter(partition -> filter.contains(partition.getPartitionSpec().toString(false, true)))
                .map(OdpsPartition::new).collect(Collectors.toList());
    }
@Test
    public void testGetPartitions() {
        Table table = odpsMetadata.getTable("db", "tbl");
        List<String> partitionNames = odpsMetadata.listPartitionNames("db", "tbl", TableVersionRange.empty());
        List<PartitionInfo> partitions = odpsMetadata.getPartitions(table, partitionNames);
        Assert.assertEquals(1, partitions.size());
        PartitionInfo partitionInfo = partitions.get(0);
        Assert.assertTrue(partitionInfo.getModifiedTime() > 0);
    }