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

    https://github.com/apache/spark/pull/1586#discussion_r15390523
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ExpressionEvaluationSuite.scala
 ---
    @@ -543,4 +546,46 @@ class ExpressionEvaluationSuite extends FunSuite {
         assert(Substring(s_notNull, Literal(null, IntegerType), Literal(2, 
IntegerType)).nullable === true)
         assert(Substring(s_notNull, Literal(0, IntegerType), Literal(null, 
IntegerType)).nullable === true)
       }
    +
    +  test("Length") {
    +    val row = new GenericRow(Array[Any](null, 0,12, 123, 12.4F, 
12345678901L, 1234567890.2D, "1234567890ABC", "\uF93D\uF936\uF949\uF942"))
    --- End diff --
    
    I think this test would be easier to read if it was written with Literals.  
For example:
    
    ```scala
    checkEvaluation(Length(Literal(null, StringType)), null, row)
    ```
    
    That way the test and the answer are right next to each other.


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

Reply via email to