Github user yhuai commented on a diff in the pull request:
https://github.com/apache/spark/pull/1598#discussion_r15618206
--- Diff: python/pyspark/sql.py ---
@@ -273,21 +234,11 @@ def __init__(self, name, dataType, nullable):
self.nullable = nullable
def __repr__(self):
- return "StructField(" + self.name + "," + \
- self.dataType.__repr__() + "," + \
- str(self.nullable).lower() + ")"
+ return "StructField(%s,%r,%s)" % (self.name, self.dataType,
+ str(self.nullable).lower())
- def __eq__(self, other):
- return (isinstance(other, self.__class__) and
- self.name == other.name and
- self.dataType == other.dataType and
- self.nullable == other.nullable)
-
- def __ne__(self, other):
- return not self.__eq__(other)
-
-class StructType(object):
+class StructType(DataType):
"""Spark SQL StructType
The data type representing namedtuple values.
--- End diff --
Should we change it to `The data type representing rows.`?
---
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.
---