spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [spark] HyukjinKwon commented on a change in pull request #29720: [SPARK-32849][PYSPARK] Add default values for non-required keys when creating StructType
Date Sat, 12 Sep 2020 20:47:21 GMT

HyukjinKwon commented on a change in pull request #29720:
URL: https://github.com/apache/spark/pull/29720#discussion_r486794529



##########
File path: python/pyspark/sql/types.py
##########
@@ -305,7 +305,7 @@ def jsonValue(self):
     @classmethod
     def fromJson(cls, json):
         return ArrayType(_parse_datatype_json_value(json["elementType"]),
-                         json["containsNull"])
+                         json.get("containsNull", True))

Review comment:
       Just to clarify, does this cause any user-facing error? This isn't an API so we're
good if it works internally.

##########
File path: python/pyspark/sql/types.py
##########
@@ -305,7 +305,7 @@ def jsonValue(self):
     @classmethod
     def fromJson(cls, json):

Review comment:
       Just to clarify, does this cause any user-facing error? As long as we can roundtrip
jsonValue and fromJson, I think we're good.

##########
File path: python/pyspark/sql/types.py
##########
@@ -305,7 +305,7 @@ def jsonValue(self):
     @classmethod
     def fromJson(cls, json):
         return ArrayType(_parse_datatype_json_value(json["elementType"]),
-                         json["containsNull"])
+                         json.get("containsNull", True))

Review comment:
       Just to clarify, does this cause any user-facing error? This isn't an API so we're
good if it works internally.

##########
File path: python/pyspark/sql/types.py
##########
@@ -305,7 +305,7 @@ def jsonValue(self):
     @classmethod
     def fromJson(cls, json):

Review comment:
       Just to clarify, does this cause any user-facing error? As long as we can roundtrip
jsonValue and fromJson, I think we're good.

##########
File path: python/pyspark/sql/types.py
##########
@@ -305,7 +305,7 @@ def jsonValue(self):
     @classmethod
     def fromJson(cls, json):
         return ArrayType(_parse_datatype_json_value(json["elementType"]),
-                         json["containsNull"])
+                         json.get("containsNull", True))

Review comment:
       Just to clarify, does this cause any user-facing error? This isn't an API so we're
good if it works internally.

##########
File path: python/pyspark/sql/types.py
##########
@@ -305,7 +305,7 @@ def jsonValue(self):
     @classmethod
     def fromJson(cls, json):

Review comment:
       Just to clarify, does this cause any user-facing error? As long as we can roundtrip
jsonValue and fromJson, I think we're good.

##########
File path: python/pyspark/sql/types.py
##########
@@ -305,7 +305,7 @@ def jsonValue(self):
     @classmethod
     def fromJson(cls, json):
         return ArrayType(_parse_datatype_json_value(json["elementType"]),
-                         json["containsNull"])
+                         json.get("containsNull", True))

Review comment:
       Just to clarify, does this cause any user-facing error? This isn't an API so we're
good if it works internally.

##########
File path: python/pyspark/sql/types.py
##########
@@ -305,7 +305,7 @@ def jsonValue(self):
     @classmethod
     def fromJson(cls, json):

Review comment:
       Just to clarify, does this cause any user-facing error? As long as we can roundtrip
jsonValue and fromJson, I think we're good.

##########
File path: python/pyspark/sql/types.py
##########
@@ -305,7 +305,7 @@ def jsonValue(self):
     @classmethod
     def fromJson(cls, json):
         return ArrayType(_parse_datatype_json_value(json["elementType"]),
-                         json["containsNull"])
+                         json.get("containsNull", True))

Review comment:
       Just to clarify, does this cause any user-facing error? This isn't an API so we're
good if it works internally.

##########
File path: python/pyspark/sql/types.py
##########
@@ -305,7 +305,7 @@ def jsonValue(self):
     @classmethod
     def fromJson(cls, json):

Review comment:
       Just to clarify, does this cause any user-facing error? As long as we can roundtrip
jsonValue and fromJson, I think we're good.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message