Github user marmbrus commented on a diff in the pull request: https://github.com/apache/spark/pull/1586#discussion_r15390556 --- 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")) + val ctr = new AtomicInteger(0) --- End diff -- An `AtomicInteger` is expensive unless you are going to be doing `getAndIncrement` from multiple concurrent threads.
--- 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. ---