private PartitionReferenceResolver preparePartitionResolver(
ReferenceResolver referenceResolver, List<ReferenceInfo> partitionColumns) {
List<PartitionExpression> partitionExpressions = new ArrayList<>(partitionColumns.size());
int idx = 0;
for (ReferenceInfo partitionedByColumn : partitionColumns) {
partitionExpressions.add(new PartitionExpression(partitionedByColumn, idx));
idx++;
}
return new PartitionReferenceResolver(referenceResolver, partitionExpressions);
}