andygrove commented on code in PR #2735:
URL: https://github.com/apache/datafusion-comet/pull/2735#discussion_r2507074619
##########
spark/src/main/scala/org/apache/comet/rules/CometExecRule.scala:
##########
@@ -78,63 +78,49 @@ case class CometExecRule(session: SparkSession) extends
Rule[SparkPlan] {
/**
* Tries to transform a Spark physical plan into a Comet plan.
*
- * This rule traverses bottom-up from the original Spark plan and for each
plan node, there
- * are a few cases to consider:
+ * This rule traverses bottom-up from the original Spark plan and for each
plan node, there are
+ * a few cases to consider:
*
- * 1. The child(ren) of the current node `p` cannot be converted to native
- * In this case, we'll simply return the original Spark plan, since Comet
native
- * execution cannot start from an arbitrary Spark operator (unless it is
special node
- * such as scan or sink such as shuffle exchange, union etc., which are
wrapped by
- * `CometScanWrapper` and `CometSinkPlaceHolder` respectively).
+ * 1. The child(ren) of the current node `p` cannot be converted to native
In this case, we'll
+ * simply return the original Spark plan, since Comet native execution
cannot start from an
+ * arbitrary Spark operator (unless it is special node such as scan or
sink such as shuffle
+ * exchange, union etc., which are wrapped by `CometScanWrapper` and
`CometSinkPlaceHolder`
+ * respectively).
*
- * 2. The child(ren) of the current node `p` can be converted to native
- * There are two sub-cases for this scenario: 1) This node `p` can also be
converted to
- * native. In this case, we'll create a new native Comet operator for `p`
and connect it with
- * its previously converted child(ren); 2) This node `p` cannot be
converted to native. In
- * this case, similar to 1) above, we simply return `p` as it is. Its
child(ren) would still
- * be native Comet operators.
+ * 2. The child(ren) of the current node `p` can be converted to native
There are two sub-cases
+ * for this scenario: 1) This node `p` can also be converted to native. In
this case, we'll
+ * create a new native Comet operator for `p` and connect it with its
previously converted
+ * child(ren); 2) This node `p` cannot be converted to native. In this case,
similar to 1)
+ * above, we simply return `p` as it is. Its child(ren) would still be
native Comet operators.
*
* After this rule finishes, we'll do another pass on the final plan to
convert all adjacent
- * Comet native operators into a single native execution block. Please see
where
- * `convertBlock` is called below.
+ * Comet native operators into a single native execution block. Please see
where `convertBlock`
+ * is called below.
*
* Here are a few examples:
*
- * Scan ======> CometScan
- * | |
- * Filter CometFilter
- * | |
- * HashAggregate CometHashAggregate
- * | |
- * Exchange CometExchange
- * | |
- * HashAggregate CometHashAggregate
- * | |
- * UnsupportedOperator UnsupportedOperator
+ * Scan ======> CometScan
+ * \| | Filter CometFilter
+ * \| | HashAggregate CometHashAggregate
+ * \| | Exchange CometExchange
+ * \| | HashAggregate CometHashAggregate
+ * \| | UnsupportedOperator UnsupportedOperator
Review Comment:
Are these formatting changes intentional?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]