HyukjinKwon commented on a change in pull request #25496:  [PYTHON][WIP] 
pyspark schema.toDDL() and DataType.fromDDL(ddl)
URL: https://github.com/apache/spark/pull/25496#discussion_r345152630
 
 

 ##########
 File path: python/pyspark/sql/types.py
 ##########
 @@ -92,6 +92,23 @@ def fromInternal(self, obj):
         """
         return obj
 
+    @Since(3.0)
+    def toDDL(self):
+        """
+        Returns a string containing a schema in DDL format.
+        """
+        sc = SparkContext._active_spark_context
+        dt = 
sc._jvm.__getattr__("org.apache.spark.sql.types.DataType$").__getattr__("MODULE$")
 
 Review comment:
   DataType here is purely without JVM access actually. We should probably try 
to avoid such access.

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