marin-ma commented on code in PR #4952:
URL: https://github.com/apache/incubator-gluten/pull/4952#discussion_r1531597159
##########
gluten-core/src/main/scala/io/glutenproject/execution/GenerateExecTransformerBase.scala:
##########
@@ -26,11 +26,28 @@ import
io.glutenproject.substrait.expression.{ExpressionBuilder, ExpressionNode}
import io.glutenproject.substrait.extensions.{AdvancedExtensionNode,
ExtensionBuilder}
import io.glutenproject.substrait.rel.RelNode
+import org.apache.spark.sql.catalyst.InternalRow
import org.apache.spark.sql.catalyst.expressions._
+import org.apache.spark.sql.catalyst.expressions.codegen.{CodegenContext,
ExprCode}
import org.apache.spark.sql.execution.SparkPlan
+import org.apache.spark.sql.types.StructType
import scala.collection.JavaConverters._
+case class GlutenGeneratorWrapper(unwrapped: Generator) extends Generator {
Review Comment:
After transforming, the `GenerateExec` becomes `ProjectExec(newChild:
GenerateExec)`, and the rule continues to apply on the `newChild:
GenerateExec`, which results in infinite recursion. By adding this wrapper, the
next time the `supportsGenerate` will return false, preventing it from
infinitely applying on the `GenerateExec`
https://github.com/apache/incubator-gluten/pull/4952/files#diff-4ebd3cbecb20dc83596c28d20936d40f48ed1b41f334525fd5b5bdca3ac3bf3fR730
--
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]