[jira] [Commented] (CARBONDATA-221) Store inverted index in metadata

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (CARBONDATA-221) Store inverted index in metadata

Akash R Nilugal (Jira)

    [ https://issues.apache.org/jira/browse/CARBONDATA-221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15599701#comment-15599701 ]

ASF GitHub Bot commented on CARBONDATA-221:
-------------------------------------------

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 <[hidden email]>
Date:   2016-09-08T07:48:03Z

    Save useInvertedIndex info into thrift store

commit 3c8da81869e1a8eca8bdde3d82bc0a9d185bdc3d
Author: Zhangshunyu <[hidden email]>
Date:   2016-09-08T07:48:15Z

    Save useInvertedIndex info into thrift store

commit b834e4889f5c5eadcee1c232c1a6070df0c1bf60
Author: Zhangshunyu <[hidden email]>
Date:   2016-09-08T09:46:12Z

    Fix the judge of no_dic_col

commit e8b338c2a7a9e3e28a591bdfe57a5f704f1496d6
Author: Zhangshunyu <[hidden email]>
Date:   2016-09-08T10:04:20Z

    add commont

----


> Store inverted index in metadata
> --------------------------------
>
>                 Key: CARBONDATA-221
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-221
>             Project: CarbonData
>          Issue Type: Bug
>            Reporter: kumar vishal
>            Assignee: zhangshunyu
>
> Store useInvertedIndex in carbondata metadata and while reading need to set in column schema and in filter we need to handle no inverted index scenario.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)