diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/SparkUtilities.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/SparkUtilities.java index fac3cea..ca19fd0 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/SparkUtilities.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/SparkUtilities.java @@ -191,7 +191,7 @@ public static SparkTask createSparkTask(SparkWork work, HiveConf conf) { } /** - * Recursively find all operators under root, that are of class clazz, and + * Recursively find all operators under root, that are of class clazz or are the sub-class of clazz, and * put them in result. * @param result all operators under root that are of class clazz * @param root the root operator under which all operators will be examined @@ -202,7 +202,7 @@ public static void collectOp(Collection> result, Operator root, C if (root == null) { return; } - if (clazz.equals(root.getClass())) { + if (clazz.isAssignableFrom(root.getClass())) { result.add(root); } for (Operator child : root.getChildOperators()) { diff --git a/ql/src/test/results/clientpositive/spark/spark_vectorized_dynamic_partition_pruning.q.out b/ql/src/test/results/clientpositive/spark/spark_vectorized_dynamic_partition_pruning.q.out index f2403aa..453da2f 100644 --- a/ql/src/test/results/clientpositive/spark/spark_vectorized_dynamic_partition_pruning.q.out +++ b/ql/src/test/results/clientpositive/spark/spark_vectorized_dynamic_partition_pruning.q.out @@ -3601,7 +3601,7 @@ STAGE PLANS: Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE value expressions: _col1 (type: string) Execution mode: vectorized - Map 5 + Map 5 Map Operator Tree: TableScan alias: srcpart_date @@ -3620,7 +3620,7 @@ STAGE PLANS: Map-reduce partition columns: _col0 (type: string) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Execution mode: vectorized - Map 6 + Map 6 Map Operator Tree: TableScan alias: srcpart_hour @@ -3639,7 +3639,7 @@ STAGE PLANS: Map-reduce partition columns: _col0 (type: string) Statistics: Num rows: 1 Data size: 172 Basic stats: COMPLETE Column stats: NONE Execution mode: vectorized - Reducer 2 + Reducer 2 Reduce Operator Tree: Join Operator condition map: @@ -4353,20 +4353,6 @@ STAGE PLANS: partition key expr: ds Statistics: Num rows: 2 Data size: 368 Basic stats: COMPLETE Column stats: NONE target work: Map 1 - Select Operator - expressions: _col0 (type: string) - outputColumnNames: _col0 - Statistics: Num rows: 2 Data size: 368 Basic stats: COMPLETE Column stats: NONE - Group By Operator - keys: _col0 (type: string) - mode: hash - outputColumnNames: _col0 - Statistics: Num rows: 2 Data size: 368 Basic stats: COMPLETE Column stats: NONE - Spark Partition Pruning Sink Operator - Target column: ds (string) - partition key expr: ds - Statistics: Num rows: 2 Data size: 368 Basic stats: COMPLETE Column stats: NONE - target work: Map 4 Reducer 13 Execution mode: vectorized Reduce Operator Tree: @@ -4397,20 +4383,6 @@ STAGE PLANS: partition key expr: ds Statistics: Num rows: 2 Data size: 368 Basic stats: COMPLETE Column stats: NONE target work: Map 1 - Select Operator - expressions: _col0 (type: string) - outputColumnNames: _col0 - Statistics: Num rows: 2 Data size: 368 Basic stats: COMPLETE Column stats: NONE - Group By Operator - keys: _col0 (type: string) - mode: hash - outputColumnNames: _col0 - Statistics: Num rows: 2 Data size: 368 Basic stats: COMPLETE Column stats: NONE - Spark Partition Pruning Sink Operator - Target column: ds (string) - partition key expr: ds - Statistics: Num rows: 2 Data size: 368 Basic stats: COMPLETE Column stats: NONE - target work: Map 4 Stage: Stage-1 Spark @@ -6159,7 +6131,7 @@ STAGE PLANS: Spark #### A masked pattern was here #### Vertices: - Map 1 + Map 1 Map Operator Tree: TableScan alias: srcpart @@ -6184,7 +6156,7 @@ STAGE PLANS: Spark #### A masked pattern was here #### Vertices: - Map 2 + Map 2 Map Operator Tree: TableScan alias: srcpart_date @@ -6221,7 +6193,7 @@ STAGE PLANS: Reducer 4 <- Map 3 (GROUP, 1) #### A masked pattern was here #### Vertices: - Map 3 + Map 3 Map Operator Tree: TableScan alias: srcpart_hour @@ -6249,13 +6221,13 @@ STAGE PLANS: outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - sort order: + sort order: Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: bigint) Execution mode: vectorized Local Work: Map Reduce Local Work - Reducer 4 + Reducer 4 Execution mode: vectorized Reduce Operator Tree: Group By Operator