You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by HyukjinKwon <gi...@git.apache.org> on 2017/05/08 13:19:11 UTC

[GitHub] spark pull request #17880: [SPARK-20620][TEST]Improve some unit tests for Nu...

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

    https://github.com/apache/spark/pull/17880#discussion_r115244928
  
    --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercionSuite.scala ---
    @@ -484,24 +484,50 @@ class TypeCoercionSuite extends PlanTest {
       }
     
       test("coalesce casts") {
    -    ruleTest(TypeCoercion.FunctionArgumentConversion,
    -      Coalesce(Literal(1.0)
    -        :: Literal(1)
    -        :: Literal.create(1.0, FloatType)
    -        :: Nil),
    -      Coalesce(Cast(Literal(1.0), DoubleType)
    -        :: Cast(Literal(1), DoubleType)
    -        :: Cast(Literal.create(1.0, FloatType), DoubleType)
    -        :: Nil))
    -    ruleTest(TypeCoercion.FunctionArgumentConversion,
    -      Coalesce(Literal(1L)
    -        :: Literal(1)
    -        :: Literal(new java.math.BigDecimal("1000000000000000000000"))
    -        :: Nil),
    -      Coalesce(Cast(Literal(1L), DecimalType(22, 0))
    -        :: Cast(Literal(1), DecimalType(22, 0))
    -        :: Cast(Literal(new java.math.BigDecimal("1000000000000000000000")), DecimalType(22, 0))
    -        :: Nil))
    +    val rule = TypeCoercion.FunctionArgumentConversion
    +
    +    val intLit = Literal(1)
    +    val LongLit = Literal.create(1L)
    --- End diff --
    
    (I guess this should be `longLit `)


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

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