Skip to content

Commit

Permalink
Addresses comments
Browse files Browse the repository at this point in the history
  • Loading branch information
liancheng committed May 12, 2015
1 parent 5849dd0 commit fa543f3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private[sql] object DataSourceStrategy extends Strategy with Logging {
case PhysicalOperation(projectList, filters, l @ LogicalRelation(t: FSBasedRelation)) =>
val inputPaths = t.paths.map(new Path(_)).flatMap { path =>
val fs = path.getFileSystem(t.sqlContext.sparkContext.hadoopConfiguration)
val qualifiedPath = fs.makeQualified(path)
val qualifiedPath = path.makeQualified(fs.getUri, fs.getWorkingDirectory)
SparkHadoopUtil.get.listLeafStatuses(fs, qualifiedPath).map(_.getPath).filterNot { path =>
val name = path.getName
name.startsWith("_") || name.startsWith(".")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private[sql] case class InsertIntoFSBasedRelation(
val hadoopConf = sqlContext.sparkContext.hadoopConfiguration
val outputPath = new Path(relation.paths.head)
val fs = outputPath.getFileSystem(hadoopConf)
val qualifiedOutputPath = fs.makeQualified(outputPath)
val qualifiedOutputPath = outputPath.makeQualified(fs.getUri, fs.getWorkingDirectory)

val doInsertion = (mode, fs.exists(qualifiedOutputPath)) match {
case (SaveMode.ErrorIfExists, true) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ abstract class OutputWriter {
*
* @constructor This constructor is for internal uses only. The [[PartitionSpec]] argument is for
* implementing metastore table conversion.
* @param paths Base paths of this relation. For partitioned relations, it should be either root
* @param paths Base paths of this relation. For partitioned relations, it should be the root
* directories of all partition directories.
* @param maybePartitionSpec An [[FSBasedRelation]] can be created with an optional
* [[PartitionSpec]], so that partition discovery can be skipped.
Expand Down Expand Up @@ -371,8 +371,8 @@ abstract class FSBasedRelation private[sql](
}

/**
* Schema of this relation. It consists of [[dataSchema]] and all partition columns not appeared
* in [[dataSchema]].
* Schema of this relation. It consists of columns appearing in [[dataSchema]] and all partition
* columns not appearing in [[dataSchema]].
*/
override lazy val schema: StructType = {
val dataSchemaColumnNames = dataSchema.map(_.name.toLowerCase).toSet
Expand Down

0 comments on commit fa543f3

Please sign in to comment.