Github user KanakaKumar commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2666#discussion_r213330337
--- Diff:
integration/spark-datasource/src/main/scala/org/apache/spark/sql/carbondata/execution/datasources/SparkCarbonFileFormat.scala
---
@@ -79,10 +79,22 @@ class SparkCarbonFileFormat extends FileFormat
options: Map[String, String],
files: Seq[FileStatus]): Option[StructType] = {
val tablePath = options.get("path") match {
- case Some(path) => path
- case _ =>
FileFactory.getUpdatedFilePath(files.head.getPath.getParent.toUri.toString)
+ case Some(path) =>
+ val defaultFsUrl =
+
sparkSession.sparkContext.hadoopConfiguration.get(CarbonCommonConstants.FS_DEFAULT_FS)
+ if (defaultFsUrl == null) {
+ path
+ } else {
+ defaultFsUrl + CarbonCommonConstants.FILE_SEPARATOR + path
--- End diff --
Check if the path already has schema prefix before adding the defaultFSURL
( hdfs://, s3a:/,etc/)
---