Skip to content

Commit

Permalink
change default value of metadata to None in python
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxr committed Oct 23, 2014
1 parent 611d3c2 commit 1e2abcf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/pyspark/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ class StructField(DataType):
"""

def __init__(self, name, dataType, nullable, metadata={}):
def __init__(self, name, dataType, nullable, metadata=None):
"""Creates a StructField
:param name: the name of this field.
:param dataType: the data type of this field.
Expand All @@ -325,7 +325,7 @@ def __init__(self, name, dataType, nullable, metadata={}):
self.name = name
self.dataType = dataType
self.nullable = nullable
self.metadata = metadata
self.metadata = metadata or {}

def __repr__(self):
return "StructField(%s,%s,%s)" % (self.name, self.dataType,
Expand Down

0 comments on commit 1e2abcf

Please sign in to comment.