Skip to content

Commit fa543f3

Browse files
committed
Addresses comments
1 parent 5849dd0 commit fa543f3

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

sql/core/src/main/scala/org/apache/spark/sql/sources/DataSourceStrategy.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ private[sql] object DataSourceStrategy extends Strategy with Logging {
9090
case PhysicalOperation(projectList, filters, l @ LogicalRelation(t: FSBasedRelation)) =>
9191
val inputPaths = t.paths.map(new Path(_)).flatMap { path =>
9292
val fs = path.getFileSystem(t.sqlContext.sparkContext.hadoopConfiguration)
93-
val qualifiedPath = fs.makeQualified(path)
93+
val qualifiedPath = path.makeQualified(fs.getUri, fs.getWorkingDirectory)
9494
SparkHadoopUtil.get.listLeafStatuses(fs, qualifiedPath).map(_.getPath).filterNot { path =>
9595
val name = path.getName
9696
name.startsWith("_") || name.startsWith(".")

sql/core/src/main/scala/org/apache/spark/sql/sources/commands.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ private[sql] case class InsertIntoFSBasedRelation(
7171
val hadoopConf = sqlContext.sparkContext.hadoopConfiguration
7272
val outputPath = new Path(relation.paths.head)
7373
val fs = outputPath.getFileSystem(hadoopConf)
74-
val qualifiedOutputPath = fs.makeQualified(outputPath)
74+
val qualifiedOutputPath = outputPath.makeQualified(fs.getUri, fs.getWorkingDirectory)
7575

7676
val doInsertion = (mode, fs.exists(qualifiedOutputPath)) match {
7777
case (SaveMode.ErrorIfExists, true) =>

sql/core/src/main/scala/org/apache/spark/sql/sources/interfaces.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ abstract class OutputWriter {
301301
*
302302
* @constructor This constructor is for internal uses only. The [[PartitionSpec]] argument is for
303303
* implementing metastore table conversion.
304-
* @param paths Base paths of this relation. For partitioned relations, it should be either root
304+
* @param paths Base paths of this relation. For partitioned relations, it should be the root
305305
* directories of all partition directories.
306306
* @param maybePartitionSpec An [[FSBasedRelation]] can be created with an optional
307307
* [[PartitionSpec]], so that partition discovery can be skipped.
@@ -371,8 +371,8 @@ abstract class FSBasedRelation private[sql](
371371
}
372372

373373
/**
374-
* Schema of this relation. It consists of [[dataSchema]] and all partition columns not appeared
375-
* in [[dataSchema]].
374+
* Schema of this relation. It consists of columns appearing in [[dataSchema]] and all partition
375+
* columns not appearing in [[dataSchema]].
376376
*/
377377
override lazy val schema: StructType = {
378378
val dataSchemaColumnNames = dataSchema.map(_.name.toLowerCase).toSet

0 commit comments

Comments
 (0)