class PruneDependency[T](rdd: RDD[T], @transient partitionFilterFunc: Int => Boolean)
	  extends NarrowDependency[T](rdd) {

	  @transient
	  val partitions: Array[Partition] = rdd.partitions
	    .filter(s => partitionFilterFunc(s.index)).zipWithIndex
	    .map { case(split, idx) => new PartitionPruningRDDPartition(idx, split) : Partition }

	  override def getParents(partitionId: Int) = {
	    List(partitions(partitionId).asInstanceOf[PartitionPruningRDDPartition].parentSplit.index)
	  }
	}

Partition will filter out some of here,rdd.partitions.size not correct.