The current partitioned HJ and Agg implementation does not check what's the size of the hash table that it is going to be created. There are cases where the hash table of a partition to be needed to be larger than 1GB. In that case due to
IMPALA-1619 we have to fail the query (for more info look the work-around IMPALA-2065).
Instead of failing the query we may try to repartition that large partition in an effort to create HTs smaller than 1GB.
For example in PartitionedHashJoinNode::Partition::BuildHashTableInternal