List<PCollectionImpl<?>> parents = getParents();
JavaRDD[] rdds = new JavaRDD[parents.size()];
for (int i = 0; i < rdds.length; i++) {
if (parents.get(i) instanceof PTableBase) {
JavaPairRDD prdd = (JavaPairRDD) ((SparkCollection) parents.get(i)).getJavaRDDLike(runtime);
rdds[i] = prdd.mapPartitions(new FlatMapPairDoFn(IdentityFn.getInstance(), runtime.getRuntimeContext()));
} else {
rdds[i] = (JavaRDD) ((SparkCollection) parents.get(i)).getJavaRDDLike(runtime);
}
}
return runtime.getSparkContext().union(rdds);