@Override
    public List<String> listPartitionNames(String databaseName, String tableName, TableVersionRange version) {
        OdpsTableName odpsTableName = OdpsTableName.of(databaseName, tableName);
        // TODO: perhaps not good to support users to fetch whole tables?
        List<Partition> partitions = get(partitionCache, odpsTableName);
        if (partitions == null || partitions.isEmpty()) {
            return Collections.emptyList();
        }
        return partitions.stream().map(Partition::getPartitionSpec)
                .map(p -> p.toString(false, true)).collect(
                        Collectors.toList());
    }
@Test
    public void testListPartitionNames() {
        List<String> partitionNames = odpsMetadata.listPartitionNames("project", "tableName", TableVersionRange.empty());
        Assert.assertEquals(Collections.singletonList("p1=a/p2=b"), partitionNames);
    }