/** * Gets the HdfsPartition matching the given partition spec. Returns null if no match was found. */ public HdfsPartition getPartition(List<PartitionKeyValue> partitionSpec) { List<TPartitionKeyValue> partitionKeyValues = Lists.newArrayList(); for (PartitionKeyValue kv : partitionSpec) { String value = PartitionKeyValue.getPartitionKeyValueString( kv.getLiteralValue(), getNullPartitionKeyValue()); partitionKeyValues.add(new TPartitionKeyValue(kv.getColName(), value)); } return getPartitionFromThriftPartitionSpec(partitionKeyValues); }