HyukjinKwon commented on a change in pull request #27774: [SPARK-31023][SQL] 
Support foldable schemas by `from_json`
URL: https://github.com/apache/spark/pull/27774#discussion_r387357883
 
 

 ##########
 File path: 
sql/core/src/test/scala/org/apache/spark/sql/JsonFunctionsSuite.scala
 ##########
 @@ -653,4 +653,18 @@ class JsonFunctionsSuite extends QueryTest with 
SharedSparkSession {
       assert(json_tuple_result === len)
     }
   }
+
+  test("support foldable schema by from_json") {
+    val options = Map[String, String]().asJava
+    val schema = regexp_replace(lit("dpt_org_id INT, dpt_org_city STRING"), 
"dpt_org_", "")
 
 Review comment:
   Actually, I intentionally didn't make it foldable at that time because the 
schema will be given as a string in almost all cases. I couldn't come up with 
the case where the foldable expression is used.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to