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

    https://github.com/apache/spark/pull/7546#discussion_r35066508
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/StringExpressionsSuite.scala
 ---
    @@ -353,7 +353,7 @@ class StringExpressionsSuite extends SparkFunSuite with 
ExpressionEvalHelper {
       test("FORMAT") {
         val f = 'f.string.at(0)
         val d1 = 'd.int.at(1)
    -    val s1 = 's.int.at(2)
    +    val s1 = 's.string.at(2)
     
         val row1 = create_row("aa%d%s", 12, "cc")
         val row2 = create_row(null, 12, "cc")
    --- End diff --
    
    What do we expect, if an Integer value is null? `printf` itself has no 
problems with null, but for codeGen we have a primitive value like `int` 
instead of `Integer`. One approach for solving this might be to box all values 
again and set it to null, if `isNull` return true. Another approach might be to 
return null if one argument is null


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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to