Optimize aggregations over partition keys into simple metadata queries

Queries with the following shape are executed against partition metadata

```sql
SELECT min(key), max(key) FROM t
SELECT DISTINCT key FROM t
```
Is that what comes out for null partition keys? In that case, we just need to add a null to the row.