class PartitionReferenceResolver implements ReferenceResolver<PartitionExpression> {

    private final Map<ReferenceIdent, PartitionExpression> expressionMap;
    private final List<PartitionExpression> partitionExpressions;

    public PartitionReferenceResolver(List<PartitionExpression> partitionExpressions) {
        this.partitionExpressions = partitionExpressions;
        this.expressionMap = new HashMap<>(partitionExpressions.size(), 1.0f);
        for (PartitionExpression partitionExpression : partitionExpressions) {
            expressionMap.put(partitionExpression.reference().ident(), partitionExpression);
        }
    }

    @Override
    public PartitionExpression getImplementation(Reference ref) {<FILL_FUNCTION_BODY>}

    public List<PartitionExpression> expressions() {
        return partitionExpressions;
    }
}

        PartitionExpression expression = expressionMap.get(ref.ident());
        assert expression != null : "granularity < PARTITION should have been resolved already";
        return expression;
    
<no_super_class>