aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMechCoder <manojkumarsivaraj334@gmail.com>2015-08-20 10:05:31 -0700
committerXiangrui Meng <meng@databricks.com>2015-08-20 10:05:39 -0700
commit257e9d727874332fd192f6a993f9ea8bf464abf5 (patch)
tree338f24d6ae3a29ce32955ec710a7398b101e2f7b
parent5be517584be0c78dc4641a4aa14ea9da05ed344d (diff)
downloadspark-257e9d727874332fd192f6a993f9ea8bf464abf5.tar.gz
spark-257e9d727874332fd192f6a993f9ea8bf464abf5.tar.bz2
spark-257e9d727874332fd192f6a993f9ea8bf464abf5.zip
[MINOR] [SQL] Fix sphinx warnings in PySpark SQL
Author: MechCoder <manojkumarsivaraj334@gmail.com> Closes #8171 from MechCoder/sql_sphinx. (cherry picked from commit 52c60537a274af5414f6b0340a4bd7488ef35280) Signed-off-by: Xiangrui Meng <meng@databricks.com>
-rw-r--r--python/pyspark/context.py8
-rw-r--r--python/pyspark/sql/types.py4
2 files changed, 7 insertions, 5 deletions
diff --git a/python/pyspark/context.py b/python/pyspark/context.py
index eb5b0bbbda..1b2a52ad64 100644
--- a/python/pyspark/context.py
+++ b/python/pyspark/context.py
@@ -302,10 +302,10 @@ class SparkContext(object):
"""
A unique identifier for the Spark application.
Its format depends on the scheduler implementation.
- (i.e.
- in case of local spark app something like 'local-1433865536131'
- in case of YARN something like 'application_1433865536131_34483'
- )
+
+ * in case of local spark app something like 'local-1433865536131'
+ * in case of YARN something like 'application_1433865536131_34483'
+
>>> sc.applicationId # doctest: +ELLIPSIS
u'local-...'
"""
diff --git a/python/pyspark/sql/types.py b/python/pyspark/sql/types.py
index c083bf8990..ed4e5b594b 100644
--- a/python/pyspark/sql/types.py
+++ b/python/pyspark/sql/types.py
@@ -467,9 +467,11 @@ class StructType(DataType):
"""
Construct a StructType by adding new elements to it to define the schema. The method accepts
either:
+
a) A single parameter which is a StructField object.
b) Between 2 and 4 parameters as (name, data_type, nullable (optional),
- metadata(optional). The data_type parameter may be either a String or a DataType object
+ metadata(optional). The data_type parameter may be either a String or a
+ DataType object.
>>> struct1 = StructType().add("f1", StringType(), True).add("f2", StringType(), True, None)
>>> struct2 = StructType([StructField("f1", StringType(), True),\