diff options
author | Alex Angelini <alex.louis.angelini@gmail.com> | 2015-07-29 22:25:38 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2015-07-29 22:25:38 -0700 |
commit | f5dd11339fc9a6d11350f63beeca7c14aec169b1 (patch) | |
tree | 295598772df960c5f48219e9cc8077b9515d3c12 /python/pyspark | |
parent | 27850af5255352cebd933ed3cc3d82c9ff6e9b62 (diff) | |
download | spark-f5dd11339fc9a6d11350f63beeca7c14aec169b1.tar.gz spark-f5dd11339fc9a6d11350f63beeca7c14aec169b1.tar.bz2 spark-f5dd11339fc9a6d11350f63beeca7c14aec169b1.zip |
Fix reference to self.names in StructType
`names` is not defined in this context, I think you meant `self.names`.
davies
Author: Alex Angelini <alex.louis.angelini@gmail.com>
Closes #7766 from angelini/fix_struct_type_names and squashes the following commits:
01543a1 [Alex Angelini] Fix reference to self.names in StructType
Diffstat (limited to 'python/pyspark')
-rw-r--r-- | python/pyspark/sql/types.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/pyspark/sql/types.py b/python/pyspark/sql/types.py index b97d50c945..8859308d66 100644 --- a/python/pyspark/sql/types.py +++ b/python/pyspark/sql/types.py @@ -531,7 +531,7 @@ class StructType(DataType): if self._needSerializeFields: if isinstance(obj, dict): - return tuple(f.toInternal(obj.get(n)) for n, f in zip(names, self.fields)) + return tuple(f.toInternal(obj.get(n)) for n, f in zip(self.names, self.fields)) elif isinstance(obj, (tuple, list)): return tuple(f.toInternal(v) for f, v in zip(self.fields, obj)) else: |