Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/19324#discussion_r141031193
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/WholeStageCodegenExec.scala
---
@@ -197,11 +197,14 @@ trait CodegenSupport extends SparkPlan {
*
* This should be override by subclass to support codegen.
*
- * For example, Filter will generate the code like this:
+ * Note: The operator should not assume the existence of an outer
processing loop,
+ * which it can jump from with "continue;"!
*
+ * For example, filter could generate this:
* # code to evaluate the predicate expression, result is isNull1 and
value2
- * if (isNull1 || !value2) continue;
- * # call consume(), which will call parent.doConsume()
+ * if (!isNull1 && value2) {
--- End diff --
this may lead to deeply nested code, but I don't have a better idea for now.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]