Caused by: org.apache.spark.sql.catalyst.errors.package$TreeNodeException: execute, tree: TungstenExchange hashpartitioning(t293_id#247713L,t293_status#247715,t293_name#247716,t293_account#247718L,t992_anothername#248038,t1580_replaced__geo#247980,t1580_id#247982L,36), None +- TungstenAggregate(key=[t293_id#247713L,t293_status#247715,t293_name#247716,t293_account#247718L,t992_anothername#248038,t1580_replaced__geo#247980,t1580_id#247982L], functions=[], output=[t293_id#247713L,t293_status#247715,t293_name#247716,t293_account#247718L,t992_anothername#248038,t1580_replaced__geo#247980,t1580_id#247982L]) +- Project [t293_id#247713L,t293_status#247715,t293_name#247716,t293_account#247718L,t992_anothername#248038,t1580_replaced__geo#247980,t1580_id#247982L] +- Coalesce 4 +- LeftSemiJoinHash [lower(t293_name#247716)], [lower(t12657_anothername#248040)], None :- BroadcastNestedLoopJoin BuildRight, Inner, None : :- SortMergeJoin [lower(t293_name#247716)], [lower(t992_anothername#248038)] : : :- Sort [lower(t293_name#247716) ASC], false, 0 : : : +- TungstenExchange hashpartitioning(lower(t293_name#247716),36), None : : : +- InMemoryColumnarTableScan [t293_id#247713L,t293_alternative#247714,t293_status#247715,t293_name#247716,t293_anothername__id#247717,t293_account#247718L,t293_alias__broad#247719,t293_shortname#247720], InMemoryRelation [t293_id#247713L,t293_alternative#247714,t293_status#247715,t293_name#247716,t293_anothername__id#247717,t293_account#247718L,t293_alias__broad#247719,t293_shortname#247720], true, 10000, StorageLevel(true, true, false, true, 1), Scan ParquetRelation[t293_id#247713L,t293_alternative#247714,t293_status#247715,t293_name#247716,t293_anothername__id#247717,t293_account#247718L,t293_alias__broad#247719,t293_shortname#247720] InputPaths: file://293__1458232815471.parquet, None : : +- Sort [lower(t992_anothername#248038) ASC], false, 0 : : +- TungstenExchange hashpartitioning(lower(t992_anothername#248038),36), None : : +- Project [t992_anothername#248038,t992_category#247651] : : +- Filter NOT (lower(t992_anothername#248038) = ) : : +- !Generate explode(coalesce(t992_anothername#247650,[])), true, false, [t992_anothername#247650,t992_category#247651,t992_anothername#248038] : : +- ConvertToSafe : : +- InMemoryColumnarTableScan [t992_anothername#247650,t992_category#247651], InMemoryRelation [t992_anothername#247650,t992_category#247651], true, 10000, StorageLevel(true, true, false, true, 1), Scan ParquetRelation[t992_anothername#247650,t992_category#247651] InputPaths: file://992__1458232815471.parquet, None : +- InMemoryColumnarTableScan [t1580_shortname#247978,t1580_name#247979,t1580_replaced__geo#247980,t1580_status#247981,t1580_id#247982L], InMemoryRelation [t1580_shortname#247978,t1580_name#247979,t1580_replaced__geo#247980,t1580_status#247981,t1580_id#247982L], true, 10000, StorageLevel(true, true, false, true, 1), Scan ParquetRelation[t1580_shortname#247978,t1580_name#247979,t1580_replaced__geo#247980,t1580_status#247981,t1580_id#247982L] InputPaths: file://1580__1458232815471.parquet, None +- TungstenExchange hashpartitioning(lower(t12657_anothername#248040),36), None +- Project [t12657_anothername#248040] +- Filter NOT (lower(t12657_anothername#248040) = ) +- !Generate explode(coalesce(t12657_anothername#247677,[])), true, false, [t12657_gen__reg#247676,t12657_anothername#247677,t12657_cat#247678,t12657_anothername#248040] +- ConvertToSafe +- InMemoryColumnarTableScan [t12657_gen__reg#247676,t12657_anothername#247677,t12657_cat#247678], InMemoryRelation [t12657_gen__reg#247676,t12657_anothername#247677,t12657_cat#247678], true, 10000, StorageLevel(true, true, false, true, 1), Scan ParquetRelation[t12657_gen__reg#247676,t12657_anothername#247677,t12657_cat#247678] InputPaths: file://12657__1458232815471.parquet, None at org.apache.spark.sql.catalyst.errors.package$.attachTree(package.scala:49) at org.apache.spark.sql.execution.Exchange.doExecute(Exchange.scala:247) at org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$5.apply(SparkPlan.scala:132) at org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$5.apply(SparkPlan.scala:130) at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:150) at org.apache.spark.sql.execution.SparkPlan.execute(SparkPlan.scala:130) at org.apache.spark.sql.execution.aggregate.TungstenAggregate$$anonfun$doExecute$1.apply(TungstenAggregate.scala:86) at org.apache.spark.sql.execution.aggregate.TungstenAggregate$$anonfun$doExecute$1.apply(TungstenAggregate.scala:80) at org.apache.spark.sql.catalyst.errors.package$.attachTree(package.scala:48) ... 20 more Caused by: java.lang.IllegalArgumentException: Can't zip RDDs with unequal numbers of partitions at org.apache.spark.rdd.ZippedPartitionsBaseRDD.getPartitions(ZippedPartitionsRDD.scala:57) at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:239) at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:237)