You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by hvanhovell <gi...@git.apache.org> on 2018/04/09 21:33:45 UTC

[GitHub] spark pull request #20046: [SPARK-22362][SQL] Add unit test for Window Aggre...

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

    https://github.com/apache/spark/pull/20046#discussion_r171190314
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/DataFrameWindowFunctionsSuite.scala ---
    @@ -33,6 +35,11 @@ import org.apache.spark.unsafe.types.CalendarInterval
     class DataFrameWindowFunctionsSuite extends QueryTest with SharedSQLContext {
       import testImplicits._
     
    +  private def sortWrappedArrayInRow(d: DataFrame) = d.map {
    +      case Row(key: String, unsorted: mutable.WrappedArray[String]) =>
    --- End diff --
    
    Let's not pattern match against `mutable.WrappedArray` and use `Seq` instead. `mutable.WrappedArray` is pretty much an implementation detail, and pattern matching against it is brittle.


---

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