You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@carbondata.apache.org by ku...@apache.org on 2019/09/12 04:19:56 UTC
[carbondata] branch master updated: [HOTFIX] Fix NPE on windows
This is an automated email from the ASF dual-hosted git repository.
kunalkapoor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/carbondata.git
The following commit(s) were added to refs/heads/master by this push:
new 1878549 [HOTFIX] Fix NPE on windows
1878549 is described below
commit 1878549fa31b4dbbe5d920bdd774a5d618b2886a
Author: Manhua <ke...@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)
}