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

    https://github.com/apache/spark/pull/16476#discussion_r95055050
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ConditionalExpressionSuite.scala
 ---
    @@ -137,4 +139,48 @@ class ConditionalExpressionSuite extends SparkFunSuite 
with ExpressionEvalHelper
         checkEvaluation(CaseKeyWhen(c6, Seq(c5, c2, c4, c3)), null, row)
         checkEvaluation(CaseKeyWhen(literalNull, Seq(c2, c5, c1, c6)), null, 
row)
       }
    +
    +  test("case field") {
    +    val str1 = Literal("花花世界")
    +    val str2 = Literal("a")
    +    val str3 = Literal("b")
    +    val str4 = Literal("")
    +    val str5 = Literal("999")
    +    val strNull = Literal.create(null, StringType)
    +
    +    val bool1 = Literal(true)
    +    val bool2 = Literal(false)
    +
    +    val int1 = Literal(1)
    +    val int2 = Literal(2)
    +    val int3 = Literal(3)
    +    val int4 = Literal(999)
    +    val intNull = Literal.create(null, IntegerType)
    +
    +    val double1 = Literal(1.221)
    +    val double2 = Literal(1.222)
    +    val double3 = Literal(1.224)
    +
    +    val timeStamp1 = Literal(new Timestamp(2016, 12, 27, 14, 22, 1, 1))
    +    val timeStamp2 = Literal(new Timestamp(1988, 6, 3, 1, 1, 1, 1))
    +    val timeStamp3 = Literal(new Timestamp(1990, 6, 5, 1, 1, 1, 1))
    +
    +    val date1 = Literal(new Date(1949, 1, 1))
    +    val date2 = Literal(new Date(1979, 1, 1))
    +    val date3 = Literal(new Date(1989, 1, 1))
    +
    +    checkEvaluation(Field(Seq(str1, str2, str3, str1)), 3)
    +    checkEvaluation(Field(Seq(str2, str2, str2, str1)), 1)
    +    checkEvaluation(Field(Seq(str4, str4, str4, str1)), 1)
    --- End diff --
    
    same as previous ?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to