You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@carbondata.apache.org by ra...@apache.org on 2019/01/18 14:58:59 UTC

[carbondata] branch master updated: [HOTFIX] Fixed NPE during query with Local Dictionary

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

ravipesala 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 d51cbc5  [HOTFIX] Fixed NPE during query with Local Dictionary
d51cbc5 is described below

commit d51cbc52691429109bd8e54309d3c2597e210261
Author: kumarvishal09 <ku...@gmail.com>
AuthorDate: Fri Jan 11 15:14:53 2019 +0530

    [HOTFIX] Fixed NPE during query with Local Dictionary
    
    Problem:
    Query is failing with NPE when some blocklet encoded with local dictionary and some without local dictionary.
    Root Cause:
    This is coming because in carbonvectorProxy setDictionary with null it is not setting the dictionary to null because of this it is treated like a local dictionary column but column is not encoded with dictionary.
    Solution:
    Set dictionary to null
    
    This closes #3068
---
 .../main/spark2.1andspark2.2/org/apache/spark/sql/CarbonVectorProxy.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/integration/spark-datasource/src/main/spark2.1andspark2.2/org/apache/spark/sql/CarbonVectorProxy.java b/integration/spark-datasource/src/main/spark2.1andspark2.2/org/apache/spark/sql/CarbonVectorProxy.java
index edb1020..97b7b91 100644
--- a/integration/spark-datasource/src/main/spark2.1andspark2.2/org/apache/spark/sql/CarbonVectorProxy.java
+++ b/integration/spark-datasource/src/main/spark2.1andspark2.2/org/apache/spark/sql/CarbonVectorProxy.java
@@ -311,6 +311,7 @@ public class CarbonVectorProxy {
         vector.setDictionary(dictionaryWrapper);
         this.dictionary = dictionaryWrapper;
       } else {
+        this.dictionary = null;
         vector.setDictionary(null);
       }
     }