suppose the original rdd contains 10 partitions, 0 - 9, partitionFilterFunc is n % 2 = 0, 

then filter(s => partitionFilterFunc(s.index)) returns a list (split1, split3, split5, split7, split9), zipWithIndex will return  ((split1, 0), (split3, 1), (split5, 2), (split7, 3), (split9, 4))

.map { case(split, idx) => new PartitionPruningRDDPartition(idx, split) : Partition } takes 0, 1, 2, 3, 4 as idx....so the index space is still continuous......