You need to rewrite the source here as well. Otherwise we want prune columns on anything below a DistinctLimit. You should basically copy what rewriteLimit is doing