Skip to content

Commit 9fe8dc9

Browse files
committed
[SPARK-11678][SQL][DOCS] Document basePath in the programming guide.
This PR adds document for `basePath`, which is a new parameter used by `HadoopFsRelation`. The compiled doc is shown below. ![image](https://cloud.githubusercontent.com/assets/2072857/11673132/1ba01192-9dcb-11e5-98d9-ac0b4e92e98c.png) JIRA: https://issues.apache.org/jira/browse/SPARK-11678 Author: Yin Huai <yhuai@databricks.com> Closes apache#10211 from yhuai/basePathDoc. (cherry picked from commit ac8cdf1) Signed-off-by: Yin Huai <yhuai@databricks.com>
1 parent d86a88d commit 9fe8dc9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/sql-programming-guide.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,6 +1233,13 @@ infer the data types of the partitioning columns. For these use cases, the autom
12331233
can be configured by `spark.sql.sources.partitionColumnTypeInference.enabled`, which is default to
12341234
`true`. When type inference is disabled, string type will be used for the partitioning columns.
12351235

1236+
Starting from Spark 1.6.0, partition discovery only finds partitions under the given paths
1237+
by default. For the above example, if users pass `path/to/table/gender=male` to either
1238+
`SQLContext.read.parquet` or `SQLContext.read.load`, `gender` will not be considered as a
1239+
partitioning column. If users need to specify the base path that partition discovery
1240+
should start with, they can set `basePath` in the data source options. For example,
1241+
when `path/to/table/gender=male` is the path of the data and
1242+
users set `basePath` to `path/to/table/`, `gender` will be a partitioning column.
12361243

12371244
### Schema Merging
12381245

0 commit comments

Comments
 (0)