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

    https://github.com/apache/spark/pull/12836#discussion_r61768690
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/api/r/SQLUtils.scala 
---
    @@ -155,6 +155,52 @@ private[sql] object SQLUtils {
         df.mapPartitionsInR(func, packageNames, bv, realSchema)
       }
     
    + /**
    +  * The helper function for gapply() on R side.
    +  */
    + def gapply(
    +    df: DataFrame,
    +    func: Array[Byte],
    +    packageNames: Array[Byte],
    +    broadcastVars: Array[Object],
    +    schema: StructType,
    +    col: String): DataFrame = {
    +
    +   val realSchema =
    +      if (schema == null) {
    +        SERIALIZED_R_DATA_SCHEMA
    +      } else {
    +        schema
    +      }
    --- End diff --
    
    In order to keep it consistent with dapply, I haven't made it one line:
    
https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/api/r/SQLUtils.scala#L142
    
    But we can make it one line, maybe in both cases ?


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