spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rxin <...@git.apache.org>
Subject [GitHub] spark pull request #21416: [SPARK-24371] [SQL] Added isInCollection in DataF...
Date Tue, 29 May 2018 05:24:33 GMT
Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21416#discussion_r191306654
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/ColumnExpressionSuite.scala ---
    @@ -392,9 +396,97 @@ class ColumnExpressionSuite extends QueryTest with SharedSQLContext
{
     
         val df2 = Seq((1, Seq(1)), (2, Seq(2)), (3, Seq(3))).toDF("a", "b")
     
    -    intercept[AnalysisException] {
    +    val e = intercept[AnalysisException] {
           df2.filter($"a".isin($"b"))
         }
    +    Seq("cannot resolve", "due to data type mismatch: Arguments must be same type but
were")
    +      .foreach { s =>
    +        assert(e.getMessage.toLowerCase(Locale.ROOT).contains(s.toLowerCase(Locale.ROOT)))
    +      }
    +  }
    +
    +  test("isInCollection: Scala Collection") {
    --- End diff --
    
    can we simplify the test cases? you are just testing this api as a wrapper. you don't
need to run so many queries for type coercion.


---

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


Mime
View raw message