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 631941b566ba015921ef2cdc89434f35d88aef5f
Author: Manhua <kevin...@qq.com>
AuthorDate: Thu Sep 5 21:13:28 2019 +0800

    [HOTFIX] Fix NPE on windows
    
    Analyse
    carbon index files are merged but SegmentFile did not update, so it fails 
to get any default datamap for pruning.
    
    The reason for no updated is about path comparison like
    
/[your_path_here]/examples/spark2/target/store/default/source/\Fact\Part0\Segment_0
    vs
    
D:/[your_path_here]/examples/spark2/target/store/default/source/Fact/Part0/Segment_0
    
    Solution
    use the AbsoluteTableIdentifier of table from CarbonMetadata
    instead of the newly created object, keep the path style same
    
    This closes #3377
---
 .../main/scala/org/apache/spark/sql/hive/CarbonFileMetastore.scala    | 4 ++--
 1 file changed, 2 insertions(+), 2 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 684bcbb..900b69c 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
@@ -151,8 +151,8 @@ class CarbonFileMetastore extends CarbonMetaStore {
     val tables = Option(CarbonMetadata.getInstance.getCarbonTable(database, 
tableName))
     tables match {
       case Some(t) =>
-        if (isSchemaRefreshed(absIdentifier, sparkSession)) {
-          readCarbonSchema(absIdentifier, parameters)
+        if (isSchemaRefreshed(t.getAbsoluteTableIdentifier, sparkSession)) {
+          readCarbonSchema(t.getAbsoluteTableIdentifier, parameters)
         } else {
           CarbonRelation(database, tableName, 
CarbonSparkUtil.createSparkMeta(t), t)
         }

Reply via email to