Repository: spark Updated Branches: refs/heads/master 27850af52 -> f5dd11339
Fix reference to self.names in StructType `names` is not defined in this context, I think you meant `self.names`. davies Author: Alex Angelini <[email protected]> Closes #7766 from angelini/fix_struct_type_names and squashes the following commits: 01543a1 [Alex Angelini] Fix reference to self.names in StructType Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/f5dd1133 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/f5dd1133 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/f5dd1133 Branch: refs/heads/master Commit: f5dd11339fc9a6d11350f63beeca7c14aec169b1 Parents: 27850af Author: Alex Angelini <[email protected]> Authored: Wed Jul 29 22:25:38 2015 -0700 Committer: Reynold Xin <[email protected]> Committed: Wed Jul 29 22:25:38 2015 -0700 ---------------------------------------------------------------------- python/pyspark/sql/types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/f5dd1133/python/pyspark/sql/types.py ---------------------------------------------------------------------- diff --git a/python/pyspark/sql/types.py b/python/pyspark/sql/types.py index b97d50c..8859308 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: --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
