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

    https://github.com/apache/spark/pull/10133#discussion_r47058196
  
    --- 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 --
    
    I know that during our offline discussion, I said this alternative sounded 
good, but later on I realized that this was equivalent to another solution I 
tried before, and it doesn't work because making `function: Expression` a 
constructor argument forces the analyzer to resolve `function` eagerly, while 
the `loopVar` inside `function` can't be resolved during analysis phase.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to