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