You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "Surbhi-Vijay (via GitHub)" <gi...@apache.org> on 2025/04/21 12:45:01 UTC

[PR] Fallback pandas udf when input is not an instance of AttributeReference [incubator-gluten]

Surbhi-Vijay opened a new pull request, #9385:
URL: https://github.com/apache/incubator-gluten/pull/9385

   ## What changes were proposed in this pull request?
   Fallback Pandas UDF when the input is not an instance of `AttributeReference`.
   Example => `udf(1)`  `udf(count(null))`
   
   We had encountered this error while trying to run Pandas testcases in `GlutenSQLQueryTestSuite`.
   
   The testcase was failing due to the commit: [[GLUTEN-5696] Add preprojection support for ArrowEvalPythonExec by yma11 · Pull Request #5697 · apache/incubator-gluten · GitHub](https://github.com/apache/incubator-gluten/pull/5697) where it expects each input to be `AttributeReference`
   
   ## How was this patch tested?
   Tested by running Pandas testcases in our internal setup.
   
   It is difficult to add the testcase for it as of now here. Once the support for running PySpark Pandas testcases is available, this scenario would be covered.
   


-- 
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-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL] Fallback pandas udf when input is not an instance of AttributeReference [incubator-gluten]

Posted by "Surbhi-Vijay (via GitHub)" <gi...@apache.org>.
Surbhi-Vijay commented on code in PR #9385:
URL: https://github.com/apache/incubator-gluten/pull/9385#discussion_r2059932340


##########
backends-velox/src/main/scala/org/apache/spark/api/python/ColumnarArrowEvalPythonExec.scala:
##########
@@ -311,19 +323,11 @@ case class ColumnarArrowEvalPythonExec(
           input =>
             input.map {
               e =>
-                if (!e.isInstanceOf[AttributeReference]) {
-                  throw new GlutenException(
-                    "ColumnarArrowEvalPythonExec should only have [AttributeReference] inputs.")
-                } else if (allInputs.exists(_.semanticEquals(e))) {
+                if (allInputs.exists(_.semanticEquals(e))) {
                   allInputs.indexWhere(_.semanticEquals(e))
                 } else {
-                  var offset: Int = -1
-                  offset = child.output.indexWhere(
+                  val offset = child.output.indexWhere(
                     _.exprId.equals(e.asInstanceOf[AttributeReference].exprId))
-                  if (offset == -1) {

Review Comment:
   `AttributeReference` will always have `exprId`. We do not need to check for it explicitly.
   ![image](https://github.com/user-attachments/assets/62679694-6309-43fc-b545-290cd7a92372)
   



-- 
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-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL] Fallback pandas udf when input is not an instance of AttributeReference [incubator-gluten]

Posted by "jinchengchenghh (via GitHub)" <gi...@apache.org>.
jinchengchenghh merged PR #9385:
URL: https://github.com/apache/incubator-gluten/pull/9385


-- 
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-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL] Fallback pandas udf when input is not an instance of AttributeReference [incubator-gluten]

Posted by "jinchengchenghh (via GitHub)" <gi...@apache.org>.
jinchengchenghh commented on code in PR #9385:
URL: https://github.com/apache/incubator-gluten/pull/9385#discussion_r2059888747


##########
backends-velox/src/main/scala/org/apache/spark/api/python/ColumnarArrowEvalPythonExec.scala:
##########
@@ -311,19 +323,11 @@ case class ColumnarArrowEvalPythonExec(
           input =>
             input.map {
               e =>
-                if (!e.isInstanceOf[AttributeReference]) {
-                  throw new GlutenException(
-                    "ColumnarArrowEvalPythonExec should only have [AttributeReference] inputs.")
-                } else if (allInputs.exists(_.semanticEquals(e))) {
+                if (allInputs.exists(_.semanticEquals(e))) {
                   allInputs.indexWhere(_.semanticEquals(e))
                 } else {
-                  var offset: Int = -1
-                  offset = child.output.indexWhere(
+                  val offset = child.output.indexWhere(
                     _.exprId.equals(e.asInstanceOf[AttributeReference].exprId))
-                  if (offset == -1) {

Review Comment:
   Also check if the exprId exists in `doValidateInternal`.



-- 
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-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL] Fallback pandas udf when input is not an instance of AttributeReference [incubator-gluten]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #9385:
URL: https://github.com/apache/incubator-gluten/pull/9385#issuecomment-2818342161

   <!--
     Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
     distributed with this work for additional information
     regarding copyright ownership.  The ASF licenses this file
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICEGJ-2.0
   
     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
     specific language governing permissions and limitations
     under the License.
   -->
   
   Thanks for opening a pull request!
   
   Could you open an issue for this pull request on Github Issues?
   
   https://github.com/apache/incubator-gluten/issues
   
   Then could you also rename ***commit message*** and ***pull request title*** in the following format?
   
       [GLUTEN-${ISSUES_ID}][COMPONENT]feat/fix: ${detailed message}
   
   See also:
   
     * [Other pull requests](https://github.com/apache/incubator-gluten/pulls/)
   
   


-- 
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-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL] Fallback pandas udf when input is not an instance of AttributeReference [incubator-gluten]

Posted by "Surbhi-Vijay (via GitHub)" <gi...@apache.org>.
Surbhi-Vijay commented on PR #9385:
URL: https://github.com/apache/incubator-gluten/pull/9385#issuecomment-2818344035

   cc: @zhouyuan @yma11 


-- 
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-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL] Fallback pandas udf when input is not an instance of AttributeReference [incubator-gluten]

Posted by "jinchengchenghh (via GitHub)" <gi...@apache.org>.
jinchengchenghh commented on code in PR #9385:
URL: https://github.com/apache/incubator-gluten/pull/9385#discussion_r2059929585


##########
backends-velox/src/main/scala/org/apache/spark/api/python/ColumnarArrowEvalPythonExec.scala:
##########
@@ -211,12 +211,28 @@ case class ColumnarArrowEvalPythonExec(
     child: SparkPlan,
     evalType: Int)
   extends EvalPythonExec
-  with GlutenPlan {
+  with ValidatablePlan {
 
   override def batchType(): Convention.BatchType = ArrowJavaBatch
 
   override def rowType0(): Convention.RowType = Convention.RowType.None
 
+  override protected def doValidateInternal(): ValidationResult = {
+    val (_, inputs) = udfs.map(collectFunctions).unzip
+    inputs.foreach {
+      input =>
+        input.foreach {
+          case e: AttributeReference if e.exprId != null =>

Review Comment:
   Not check the exprId is null, check the exprId exists in child output
   if child.output.exists(o => o.exprId == e.exprId)



-- 
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-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL] Fallback pandas udf when input is not an instance of AttributeReference [incubator-gluten]

Posted by "Surbhi-Vijay (via GitHub)" <gi...@apache.org>.
Surbhi-Vijay commented on code in PR #9385:
URL: https://github.com/apache/incubator-gluten/pull/9385#discussion_r2059924081


##########
backends-velox/src/main/scala/org/apache/spark/api/python/ColumnarArrowEvalPythonExec.scala:
##########
@@ -311,19 +323,11 @@ case class ColumnarArrowEvalPythonExec(
           input =>
             input.map {
               e =>
-                if (!e.isInstanceOf[AttributeReference]) {
-                  throw new GlutenException(
-                    "ColumnarArrowEvalPythonExec should only have [AttributeReference] inputs.")
-                } else if (allInputs.exists(_.semanticEquals(e))) {
+                if (allInputs.exists(_.semanticEquals(e))) {
                   allInputs.indexWhere(_.semanticEquals(e))
                 } else {
-                  var offset: Int = -1
-                  offset = child.output.indexWhere(
+                  val offset = child.output.indexWhere(
                     _.exprId.equals(e.asInstanceOf[AttributeReference].exprId))
-                  if (offset == -1) {

Review Comment:
   Added check in doValidateInternal().



-- 
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-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL] Fallback pandas udf when input is not an instance of AttributeReference [incubator-gluten]

Posted by "Surbhi-Vijay (via GitHub)" <gi...@apache.org>.
Surbhi-Vijay commented on code in PR #9385:
URL: https://github.com/apache/incubator-gluten/pull/9385#discussion_r2059938507


##########
backends-velox/src/main/scala/org/apache/spark/api/python/ColumnarArrowEvalPythonExec.scala:
##########
@@ -311,19 +323,11 @@ case class ColumnarArrowEvalPythonExec(
           input =>
             input.map {
               e =>
-                if (!e.isInstanceOf[AttributeReference]) {
-                  throw new GlutenException(
-                    "ColumnarArrowEvalPythonExec should only have [AttributeReference] inputs.")
-                } else if (allInputs.exists(_.semanticEquals(e))) {
+                if (allInputs.exists(_.semanticEquals(e))) {
                   allInputs.indexWhere(_.semanticEquals(e))
                 } else {
-                  var offset: Int = -1
-                  offset = child.output.indexWhere(
+                  val offset = child.output.indexWhere(
                     _.exprId.equals(e.asInstanceOf[AttributeReference].exprId))
-                  if (offset == -1) {

Review Comment:
   Previously, it was checking if the expression id is matching or not. Do you want me to add this equal exprId check in doValidateInternal ?
   ```
    var offset: Int = -1
                     offset = child.output.indexWhere(
                       _.exprId.equals(e.asInstanceOf[AttributeReference].exprId))
                     if (offset == -1) {
                       throw new GlutenException(
                         "ColumnarArrowEvalPythonExec can't find referred input col.")
                     }
   ```



-- 
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-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL] Fallback pandas udf when input is not an instance of AttributeReference [incubator-gluten]

Posted by "jinchengchenghh (via GitHub)" <gi...@apache.org>.
jinchengchenghh commented on code in PR #9385:
URL: https://github.com/apache/incubator-gluten/pull/9385#discussion_r2058505548


##########
backends-velox/src/main/scala/org/apache/spark/api/python/ColumnarArrowEvalPythonExec.scala:
##########
@@ -211,12 +212,27 @@ case class ColumnarArrowEvalPythonExec(
     child: SparkPlan,
     evalType: Int)
   extends EvalPythonExec
-  with GlutenPlan {
+  with GlutenPlan
+  with ValidatablePlan {

Review Comment:
   Remove GlutenPlan, ValidatablePlan extends GlutenPlan



##########
backends-velox/src/main/scala/org/apache/spark/api/python/ColumnarArrowEvalPythonExec.scala:
##########
@@ -211,12 +212,27 @@ case class ColumnarArrowEvalPythonExec(
     child: SparkPlan,
     evalType: Int)
   extends EvalPythonExec
-  with GlutenPlan {
+  with GlutenPlan
+  with ValidatablePlan {
 
   override def batchType(): Convention.BatchType = ArrowJavaBatch
 
   override def rowType0(): Convention.RowType = Convention.RowType.None
 
+  override protected def doValidateInternal(): ValidationResult = {
+    val (_, inputs) = udfs.map(collectFunctions).unzip
+    inputs.map {

Review Comment:
   inputs.foreach



##########
backends-velox/src/main/scala/org/apache/spark/api/python/ColumnarArrowEvalPythonExec.scala:
##########
@@ -211,12 +212,27 @@ case class ColumnarArrowEvalPythonExec(
     child: SparkPlan,
     evalType: Int)
   extends EvalPythonExec
-  with GlutenPlan {
+  with GlutenPlan
+  with ValidatablePlan {
 
   override def batchType(): Convention.BatchType = ArrowJavaBatch
 
   override def rowType0(): Convention.RowType = Convention.RowType.None
 
+  override protected def doValidateInternal(): ValidationResult = {
+    val (_, inputs) = udfs.map(collectFunctions).unzip
+    inputs.map {
+      input =>
+        input.map {
+          e =>
+            if (!e.isInstanceOf[AttributeReference]) {

Review Comment:
   Can you also check `ColumnarArrowEvalPythonExec can't find referred input col.` in `doExecuteColumnar`? And remove the checks from `doExecuteColumnar`



-- 
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-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL] Fallback pandas udf when input is not an instance of AttributeReference [incubator-gluten]

Posted by "Surbhi-Vijay (via GitHub)" <gi...@apache.org>.
Surbhi-Vijay commented on code in PR #9385:
URL: https://github.com/apache/incubator-gluten/pull/9385#discussion_r2059636499


##########
backends-velox/src/main/scala/org/apache/spark/api/python/ColumnarArrowEvalPythonExec.scala:
##########
@@ -211,12 +211,26 @@ case class ColumnarArrowEvalPythonExec(
     child: SparkPlan,
     evalType: Int)
   extends EvalPythonExec
-  with GlutenPlan {
+  with ValidatablePlan {
 
   override def batchType(): Convention.BatchType = ArrowJavaBatch
 
   override def rowType0(): Convention.RowType = Convention.RowType.None
 
+  override protected def doValidateInternal(): ValidationResult = {
+    val (_, inputs) = udfs.map(collectFunctions).unzip
+    inputs.foreach {
+      input =>
+        input.foreach {
+          e =>
+            if (!e.isInstanceOf[AttributeReference]) {

Review Comment:
   Changed as suggested, thanks



-- 
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-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL] Fallback pandas udf when input is not an instance of AttributeReference [incubator-gluten]

Posted by "Surbhi-Vijay (via GitHub)" <gi...@apache.org>.
Surbhi-Vijay commented on code in PR #9385:
URL: https://github.com/apache/incubator-gluten/pull/9385#discussion_r2059979932


##########
backends-velox/src/main/scala/org/apache/spark/api/python/ColumnarArrowEvalPythonExec.scala:
##########
@@ -211,12 +211,28 @@ case class ColumnarArrowEvalPythonExec(
     child: SparkPlan,
     evalType: Int)
   extends EvalPythonExec
-  with GlutenPlan {
+  with ValidatablePlan {
 
   override def batchType(): Convention.BatchType = ArrowJavaBatch
 
   override def rowType0(): Convention.RowType = Convention.RowType.None
 
+  override protected def doValidateInternal(): ValidationResult = {
+    val (_, inputs) = udfs.map(collectFunctions).unzip
+    inputs.foreach {
+      input =>
+        input.foreach {
+          case e: AttributeReference if e.exprId != null =>

Review Comment:
   Got confused previously, added the condition now in doValidateInternal.



-- 
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-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL] Fallback pandas udf when input is not an instance of AttributeReference [incubator-gluten]

Posted by "Surbhi-Vijay (via GitHub)" <gi...@apache.org>.
Surbhi-Vijay commented on code in PR #9385:
URL: https://github.com/apache/incubator-gluten/pull/9385#discussion_r2059635416


##########
backends-velox/src/main/scala/org/apache/spark/api/python/ColumnarArrowEvalPythonExec.scala:
##########
@@ -211,12 +212,27 @@ case class ColumnarArrowEvalPythonExec(
     child: SparkPlan,
     evalType: Int)
   extends EvalPythonExec
-  with GlutenPlan {
+  with GlutenPlan
+  with ValidatablePlan {
 
   override def batchType(): Convention.BatchType = ArrowJavaBatch
 
   override def rowType0(): Convention.RowType = Convention.RowType.None
 
+  override protected def doValidateInternal(): ValidationResult = {
+    val (_, inputs) = udfs.map(collectFunctions).unzip
+    inputs.map {
+      input =>
+        input.map {
+          e =>
+            if (!e.isInstanceOf[AttributeReference]) {

Review Comment:
   Removed the check and verified that all pyspark testcases are passing in internal setup.



-- 
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-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL] Fallback pandas udf when input is not an instance of AttributeReference [incubator-gluten]

Posted by "Surbhi-Vijay (via GitHub)" <gi...@apache.org>.
Surbhi-Vijay commented on code in PR #9385:
URL: https://github.com/apache/incubator-gluten/pull/9385#discussion_r2059976391


##########
backends-velox/src/main/scala/org/apache/spark/api/python/ColumnarArrowEvalPythonExec.scala:
##########
@@ -311,19 +323,11 @@ case class ColumnarArrowEvalPythonExec(
           input =>
             input.map {
               e =>
-                if (!e.isInstanceOf[AttributeReference]) {
-                  throw new GlutenException(
-                    "ColumnarArrowEvalPythonExec should only have [AttributeReference] inputs.")
-                } else if (allInputs.exists(_.semanticEquals(e))) {
+                if (allInputs.exists(_.semanticEquals(e))) {
                   allInputs.indexWhere(_.semanticEquals(e))
                 } else {
-                  var offset: Int = -1
-                  offset = child.output.indexWhere(
+                  val offset = child.output.indexWhere(
                     _.exprId.equals(e.asInstanceOf[AttributeReference].exprId))
-                  if (offset == -1) {

Review Comment:
   Added as suggested.



-- 
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-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL] Fallback pandas udf when input is not an instance of AttributeReference [incubator-gluten]

Posted by "Surbhi-Vijay (via GitHub)" <gi...@apache.org>.
Surbhi-Vijay commented on code in PR #9385:
URL: https://github.com/apache/incubator-gluten/pull/9385#discussion_r2058660651


##########
backends-velox/src/main/scala/org/apache/spark/api/python/ColumnarArrowEvalPythonExec.scala:
##########
@@ -211,12 +212,27 @@ case class ColumnarArrowEvalPythonExec(
     child: SparkPlan,
     evalType: Int)
   extends EvalPythonExec
-  with GlutenPlan {
+  with GlutenPlan
+  with ValidatablePlan {

Review Comment:
   Resolved, thanks.



-- 
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-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL] Fallback pandas udf when input is not an instance of AttributeReference [incubator-gluten]

Posted by "jinchengchenghh (via GitHub)" <gi...@apache.org>.
jinchengchenghh commented on code in PR #9385:
URL: https://github.com/apache/incubator-gluten/pull/9385#discussion_r2058686932


##########
backends-velox/src/main/scala/org/apache/spark/api/python/ColumnarArrowEvalPythonExec.scala:
##########
@@ -211,12 +211,26 @@ case class ColumnarArrowEvalPythonExec(
     child: SparkPlan,
     evalType: Int)
   extends EvalPythonExec
-  with GlutenPlan {
+  with ValidatablePlan {
 
   override def batchType(): Convention.BatchType = ArrowJavaBatch
 
   override def rowType0(): Convention.RowType = Convention.RowType.None
 
+  override protected def doValidateInternal(): ValidationResult = {
+    val (_, inputs) = udfs.map(collectFunctions).unzip
+    inputs.foreach {
+      input =>
+        input.foreach {
+          e =>
+            if (!e.isInstanceOf[AttributeReference]) {

Review Comment:
   Please use match case here



-- 
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-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org