marin-ma commented on code in PR #4952:
URL: https://github.com/apache/incubator-gluten/pull/4952#discussion_r1531532126


##########
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:
   @liujiayi771 This pull-out logic fully depends on the native implementation 
of Velox library. It's not a general case.



-- 
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]

Reply via email to