fix window function to support multi-different window partitions