[SPARK-20090][FOLLOW-UP] Revert the deprecation of names in PySpark

## What changes were proposed in this pull request?
Deprecating the field `name` in PySpark is not expected. This PR is to revert the change.

## How was this patch tested?
N/A

Author: gatorsmile <gatorsmile@gmail.com>

Closes #20595 from gatorsmile/removeDeprecate.
This commit is contained in:
gatorsmile 2018-02-13 15:05:13 +09:00 committed by hyukjinkwon
parent f17b936f0d
commit 407f672496

View file

@ -455,9 +455,6 @@ class StructType(DataType):
Iterating a :class:`StructType` will iterate its :class:`StructField`\\s. Iterating a :class:`StructType` will iterate its :class:`StructField`\\s.
A contained :class:`StructField` can be accessed by name or position. A contained :class:`StructField` can be accessed by name or position.
.. note:: `names` attribute is deprecated in 2.3. Use `fieldNames` method instead
to get a list of field names.
>>> struct1 = StructType([StructField("f1", StringType(), True)]) >>> struct1 = StructType([StructField("f1", StringType(), True)])
>>> struct1["f1"] >>> struct1["f1"]
StructField(f1,StringType,true) StructField(f1,StringType,true)