This is an automated email from the ASF dual-hosted git repository.

ravipesala pushed a commit to branch branch-1.6
in repository https://gitbox.apache.org/repos/asf/carbondata.git

commit d509cd19e3a9249f18c6b8b0ab2bbe19df017e65
Author: manishnalla1994 <[email protected]>
AuthorDate: Thu Aug 29 12:00:11 2019 +0530

    [CARBONDATA-3507] Fix Create Table As Select Failure in Spark-2.3
    
    Problem: Create table as select fails with Spark-2.3.
    Cause: When creating the table location path the function
    removes the "hdfs://" part from the path and then stores it,
    due to which in later stages the file is treated as a Local Carbon File.
    Solution: Get the original table path without removing the prefix.
    
    This closes #3368
---
 .../main/scala/org/apache/spark/sql/hive/CarbonFileMetastore.scala    | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git 
a/integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonFileMetastore.scala
 
b/integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonFileMetastore.scala
index b19b11c..684bcbb 100644
--- 
a/integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonFileMetastore.scala
+++ 
b/integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonFileMetastore.scala
@@ -567,9 +567,7 @@ class CarbonFileMetastore extends CarbonMetaStore {
         }
         val tableLocation = catalogTable.storage.locationUri match {
           case tableLoc@Some(uri) =>
-            if (tableLoc.get.isInstanceOf[URI]) {
-              
FileFactory.getUpdatedFilePath(tableLoc.get.asInstanceOf[URI].getPath)
-            }
+            FileFactory.getUpdatedFilePath(tableLoc.get.toString)
           case None =>
             CarbonEnv.getTablePath(tableIdentifier.database, 
tableIdentifier.table)(sparkSession)
         }

Reply via email to