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

    https://github.com/apache/spark/pull/4585#discussion_r24703364
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Column.scala ---
    @@ -576,6 +578,27 @@ trait Column extends DataFrame {
       override def as(alias: Symbol): Column = exprToColumn(Alias(expr, 
alias.name)())
     
       /**
    +   * (Scala-specific) Explodes the column to zero or more rows by the 
provided function.
    +   * {{{
    +   *   val df = Seq(Tuple1("a b c"), Tuple1("d e")).toDataFrame("words")
    +   *   val col = df("words")
    +   *   col.explode("word"){words: String => words.split(" ")}
    +   * }}}
    +   */
    +  def explode[A, B : TypeTag](
    +      outputColumn: String)(
    --- End diff --
    
    this is equivalant to just explode(f).as(outputColumn) right ? in that 
case, i wouldn't use multiline args. just have a single function and let the 
user call as on it. 
    
    (does that break overloading?)


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