sadikovi commented on PR #38090:
URL: https://github.com/apache/spark/pull/38090#issuecomment-1278263090

   @MaxGekk I have addressed your comments, could you review again?
   
   I think there is still an issue with complex fields:
   ```scala
   test("SPARK-40646") {
     val st = new StructType()
       .add("c1", MapType(StringType, new StructType().add("a1", LongType)))
       .add("c2", StringType)
   
     // Map "c2" has "k2" key that is a string, not an integer.
     val df = Seq("""{"c1": {"k1": {"a1": 1}, "k2": {"a1": "A"}, "k3": {"a1": 
2}}}, "c2": "abc"}""").toDF("c0")
     checkAnswer(
       df.select(from_json($"c0", st)),
       Row(Row(null, "abc"))
     )
   }
   ```
   
   would return `null, null` instead of `null, "abc"`. 
   
   Would it be okay to address that case in the follow-up? It might require a 
bit of time to fix that case.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to