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

    https://github.com/apache/spark/pull/13778#discussion_r69699166
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala
 ---
    @@ -346,14 +346,47 @@ case class LambdaVariable(value: String, isNull: 
String, dataType: DataType) ext
     object MapObjects {
       private val curId = new java.util.concurrent.atomic.AtomicInteger()
     
    +  /**
    +   * Construct an instance of MapObjects case class.
    +   *
    +   * @param function The function applied on the collection elements.
    +   * @param inputData An expression that when evaluated returns a 
collection object.
    +   * @param elementType The data type of elements in the collection.
    +   */
       def apply(
           function: Expression => Expression,
           inputData: Expression,
           elementType: DataType): MapObjects = {
         val loopValue = "MapObjects_loopValue" + curId.getAndIncrement()
         val loopIsNull = "MapObjects_loopIsNull" + curId.getAndIncrement()
         val loopVar = LambdaVariable(loopValue, loopIsNull, elementType)
    -    MapObjects(loopValue, loopIsNull, elementType, function(loopVar), 
inputData)
    +    MapObjects(loopValue, loopIsNull, elementType, function(loopVar), 
inputData, None)
    --- End diff --
    
    It is possibly that inputData is unresolved yet. We can't just pass in the 
data type of inputData. So I still make inputDataType as Option[DataType] below.


---
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