lidavidm commented on a change in pull request #11466:
URL: https://github.com/apache/arrow/pull/11466#discussion_r741076570



##########
File path: cpp/src/arrow/compute/exec/expression.cc
##########
@@ -512,7 +511,31 @@ Result<Datum> ExecuteScalarExpression(const Expression& 
expr, const ExecBatch& i
       return MakeNullScalar(null());
     }
 
-    const Datum& field = input[param->index];
+    Datum field = input[param->indices[0]];
+    for (auto it = param->indices.begin() + 1; it != param->indices.end(); 
++it) {

Review comment:
       It skips the first index and I don't think it'd be clearer overall to 
avoid the explicit iterator.




-- 
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: github-unsubscr...@arrow.apache.org

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


Reply via email to