ajantha-bhat opened a new pull request #3675: [CARBONDATA-3744] Fix select 
query failure issue when warehouse directory is default (not configured) in 
cluster
URL: https://github.com/apache/carbondata/pull/3675
 
 
    ### Why is this PR needed?
   select query fails when warehouse directory is default (not configured) with 
below callstak.
   
   ```
   0: jdbc:hive2://localhost:10000> create table ab(age int) stored as 
carbondata;
   ---------+
   Result
   ---------+
   ---------+
   No rows selected (0.093 seconds)
   0: jdbc:hive2://localhost:10000> select count from ab;
   Error: org.apache.spark.sql.catalyst.analysis.NoSuchTableException: Table or 
view 'ab' not found in database 'tpch'; (state=,code=0)
   
   caused by
   java.io.FileNotFoundException: File 
hdfs://localhost:54311/home/root1/tools/spark-2.3.4-bin-hadoop2.7/spark-warehouse/tpch.db/ab/Metadata
 does not exist.
   ```
   
    ### What changes were proposed in this PR?
   When the spark.sql.warehouse.dir is not configured, default local file 
system SPARK_HOME is used. But the describe table shows with HDFS prefix in 
cluster. 
   
   Reason is we are removing the local filesystem scheme , so when table path 
is read we add HDFS prefix in cluster. instead if we keep the scheme issue will 
not come.    
   
   
    ### Does this PR introduce any user interface change?
    - No
   
    ### Is any new testcase added?
    - No. Happens only in cluster with HDFS or OBS.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to