diff --git a/python/pyspark/sql/types.py b/python/pyspark/sql/types.py index f7cd4b80ca91..6ab91e65653f 100644 --- a/python/pyspark/sql/types.py +++ b/python/pyspark/sql/types.py @@ -1367,6 +1367,10 @@ class Row(tuple): >>> row = Row(name="Alice", age=11) >>> row Row(age=11, name='Alice') + >>> row = Row(name="Alice", age=11) + >>> another = row(22, "Hyukjin") + >>> another + Row(age=22, name='Hyukjin') >>> row['name'], row['age'] ('Alice', 11) >>> row.name, row.age @@ -1434,7 +1438,7 @@ def conv(obj): # let object acts like class def __call__(self, *args): """create new Row object""" - return _create_row(self, args) + return _create_row(self.__fields__, args) def __getitem__(self, item): if isinstance(item, (int, slice)):