liujiayi771 commented on code in PR #4952: URL: https://github.com/apache/incubator-gluten/pull/4952#discussion_r1531529571
########## backends-velox/src/main/scala/io/glutenproject/backendsapi/velox/SparkPlanExecApiImpl.scala: ########## @@ -659,4 +662,81 @@ class SparkPlanExecApiImpl extends SparkPlanExecApi { ): GenerateExecTransformerBase = { GenerateExecTransformer(generator, requiredChildOutput, outer, generatorOutput, child) } + + override def genPreProjectForGenerate(generate: GenerateExec): SparkPlan = { + if (supportsGenerate(generate)) { + val newGeneratorChild = generate.generator.asInstanceOf[UnaryExpression].child match { + case attr: Attribute => attr + case expr @ (Literal(_, _) | CreateMap(_, _) | CreateArray(_, _)) => + Alias(expr, generatePreAliasName)() + case other => + throw new UnsupportedOperationException( Review Comment: I find that in your initial commit, the main logic codes are put in pull-out rule. Why do you move it to `SparkPlanExecApi` now? I think it’s better for `SparkPlanExecApi` to only control whether it's necessary to pull out. -- 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: commits-unsubscr...@gluten.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@gluten.apache.org For additional commands, e-mail: commits-h...@gluten.apache.org