public List<PartitionKey> getPrunedPartitions(String catalogName, Table table, ScalarOperator predicate,
                                                  long limit, TableVersionRange version) {
        Optional<ConnectorMetadata> connectorMetadata = getOptionalMetadata(catalogName);
        if (connectorMetadata.isPresent()) {
            try {
                return connectorMetadata.get().getPrunedPartitions(table, predicate, limit, version);
            } catch (Exception e) {
                LOG.error("Failed to getPrunedPartitions on [{}.{}]", catalogName, table, e);
                throw e;
            }
        }
        return new ArrayList<>();
    }
@Test(expected = StarRocksConnectorException.class)
    public void testGetPrunedPartition() {
        MetadataMgr metadataMgr = AnalyzeTestUtil.getConnectContext().getGlobalStateMgr().getMetadataMgr();
        metadataMgr.getPrunedPartitions("hive_catalog", null, null, -1, TableVersionRange.empty());
    }