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

    https://github.com/apache/spark/pull/482#discussion_r12263240
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ExpressionEvaluationSuite.scala
 ---
    @@ -246,17 +250,19 @@ class ExpressionEvaluationSuite extends FunSuite {
     
         intercept[Exception] {evaluate(Literal(1) cast BinaryType, null)}
     
    -    assert(("abcdef" cast StringType).nullable === false)
    -    assert(("abcdef" cast BinaryType).nullable === false)
    -    assert(("abcdef" cast BooleanType).nullable === false)
    -    assert(("abcdef" cast TimestampType).nullable === true)
    -    assert(("abcdef" cast LongType).nullable === true)
    -    assert(("abcdef" cast IntegerType).nullable === true)
    -    assert(("abcdef" cast ShortType).nullable === true)
    -    assert(("abcdef" cast ByteType).nullable === true)
    -    assert(("abcdef" cast DecimalType).nullable === true)
    -    assert(("abcdef" cast DoubleType).nullable === true)
    -    assert(("abcdef" cast FloatType).nullable === true)
    +    checkEvaluation(("abcdef" cast StringType).nullable, false)
    --- End diff --
    
    I'm not sure you want to change these.  `nullable` returns a `Boolean`, not 
an `Expression`.  This code is only compiling because the `Boolean` values are 
getting implicitly converted to a `Literal`.


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

Reply via email to