taiyang-li commented on code in PR #12486:
URL: https://github.com/apache/gluten/pull/12486#discussion_r3593092516


##########
backends-velox/src/main/scala/org/apache/gluten/execution/ColumnarPartialProjectExec.scala:
##########
@@ -297,6 +297,22 @@ object ColumnarPartialProjectExec {
     HiveUDFTransformer.isHiveUDF(h) && 
!VeloxHiveUDFTransformer.isSupportedHiveUDF(h)
   }
 
+  /**
+   * Returns true for generic catalyst expressions that Velox cannot offload 
and should be pulled
+   * into ColumnarPartialProject, excluding ScalaUDF/HiveUDF and 
non-row-evaluable wrappers.
+   */
+  private def isUnmappedGlutenExpr(expr: Expression): Boolean = expr match {
+    case _: ScalaUDF => false
+    case _ if HiveUDFTransformer.isHiveUDF(expr) => false
+    case _: Literal | _: AttributeReference | _: BoundReference => false
+    case _: NamedExpression => false
+    case _ =>
+      expr.deterministic &&
+      !expr.isInstanceOf[Unevaluable] &&
+      !expr.isInstanceOf[LambdaFunction] &&
+      !ExpressionMappings.expressionsMap.contains(expr.getClass)

Review Comment:
   @jackylee-ch yes, it should be considered. I had a minor refactor later. 
Let's wait for the latest CI.



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