We ran into this too. Dremio is smart about pruning partitions if you filter on dir0, but if you run functions like max against directories, Dremio will actually create records with just the directory name once per row in the partition. Most of our performance challenges were around appropriate partition pruning (filters on dir0) rather than the thing you’re doing, so I don’t recall if that’s being prioritized in any way… They do know about it though.