Github user marmbrus commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10133#discussion_r47044561
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects.scala
 ---
    @@ -359,10 +359,27 @@ case class LambdaVariable(value: String, isNull: 
String, dataType: DataType) ext
     case class MapObjects(
         function: AttributeReference => Expression,
         inputData: Expression,
    -    elementType: DataType) extends Expression {
    +    elementType: DataType)(
    +    completeFunctionCopy: Option[Expression] = None) extends Expression {
    --- End diff --
    
    How about we do this instead?  Make the `MapObjects` class have both 
`loopVar` and `function` as constructor arguments.  A custom `apply` method 
will take `AttributeReference => Expression` and construct the object by 
calculating the complete function eagerly.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to