You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by rx...@apache.org on 2015/07/30 07:25:42 UTC
spark git commit: Fix reference to self.names in StructType
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 <al...@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
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 <al...@gmail.com>
Authored: Wed Jul 29 22:25:38 2015 -0700
Committer: Reynold Xin <rx...@databricks.com>
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: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org