how hive distributes the rows into buckets?