[GitHub] incubator-carbondata pull request #222: [CARBONDATA-221] Fix the bug of inve...

2016-10-23 Thread Zhangshunyu
GitHub user Zhangshunyu reopened a pull request:

https://github.com/apache/incubator-carbondata/pull/222

[CARBONDATA-221] Fix the bug of inverted index that store inverted index in 
metadata by using Encoding.INVERTED_INDEX.

## Why raise this pr?
1. Problem: In current code, inverted index in ddl info is not stored into 
store, and when we restart the cluster, query might mismatch.
2. To fix problem 1, current code set always true to use inverted index, 
and we can not configure inverted index now. We should fix this problem from 
its root cause.

## How to solve?
Using the Encoding as the indentifier to check whether using inverted 
index, this Encoding is in thrift format now, so we no need to modify the 
thrift format.

Here it is the same to the query logic in  
CompressedDimensionChunkFileBasedReader:
```
if 
(CarbonUtil.hasEncoding(dimensionColumnChunk.get(blockIndex).getEncodingList(),
Encoding.INVERTED_INDEX)) {
  invertedIndexes = CarbonUtil
  
.getUnCompressColumnIndex(dimensionColumnChunk.get(blockIndex).getRowIdPageLength(),
  fileReader.readByteArray(filePath,
  dimensionColumnChunk.get(blockIndex).getRowIdPageOffset(),
  
dimensionColumnChunk.get(blockIndex).getRowIdPageLength()), numberComressor);
  // get the reverse index
  invertedIndexesReverse = getInvertedReverseIndex(invertedIndexes);
}
```
it also use  Encoding.INVERTED_INDEX to check whether one column is use 
inverted index.

## How to test?
Pass all the test cases.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/Zhangshunyu/incubator-carbondata fix_index

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-carbondata/pull/222.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #222


commit c27a8a9e33529e53020c477c70d0c079724070d2
Author: Zhangshunyu 
Date:   2016-09-08T07:48:03Z

Save useInvertedIndex info into thrift store

commit 3c8da81869e1a8eca8bdde3d82bc0a9d185bdc3d
Author: Zhangshunyu 
Date:   2016-09-08T07:48:15Z

Save useInvertedIndex info into thrift store

commit b834e4889f5c5eadcee1c232c1a6070df0c1bf60
Author: Zhangshunyu 
Date:   2016-09-08T09:46:12Z

Fix the judge of no_dic_col

commit e8b338c2a7a9e3e28a591bdfe57a5f704f1496d6
Author: Zhangshunyu 
Date:   2016-09-08T10:04:20Z

add commont




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata pull request #222: [CARBONDATA-221] Fix the bug of inve...

2016-10-23 Thread Zhangshunyu
Github user Zhangshunyu closed the pull request at:

https://github.com/apache/incubator-carbondata/pull/222


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata pull request #222: [CARBONDATA-221] Fix the bug of inve...

2016-10-09 Thread Zhangshunyu
GitHub user Zhangshunyu opened a pull request:

https://github.com/apache/incubator-carbondata/pull/222

[CARBONDATA-221] Fix the bug of inverted index that store inverted index in 
metadata.

## Why raise this pr?
1. Problem: In current code, inverted index in ddl info is not stored into 
store, and when we restart the cluster, query might mismatch.
2. To fix problem 1, current code set always true to use inverted index, 
and we can not configure inverted index now, this is not reasonable. We should 
fix this problem from its root cause.

## How to solve?
Using the Encoding as the indentifier to check whether using inverted 
index, this Encoding is in thrift format now, so we no need to modify the 
thrift format.

## How to test?
Pass all the test cases.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/Zhangshunyu/incubator-carbondata fix_index

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-carbondata/pull/222.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #222


commit c27a8a9e33529e53020c477c70d0c079724070d2
Author: Zhangshunyu 
Date:   2016-09-08T07:48:03Z

Save useInvertedIndex info into thrift store

commit 3c8da81869e1a8eca8bdde3d82bc0a9d185bdc3d
Author: Zhangshunyu 
Date:   2016-09-08T07:48:15Z

Save useInvertedIndex info into thrift store

commit b834e4889f5c5eadcee1c232c1a6070df0c1bf60
Author: Zhangshunyu 
Date:   2016-09-08T09:46:12Z

Fix the judge of no_dic_col

commit e8b338c2a7a9e3e28a591bdfe57a5f704f1496d6
Author: Zhangshunyu 
Date:   2016-09-08T10:04:20Z

add commont




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---