[GitHub] carbondata pull request #995: [CARBONDATA-1123] Rename interface and variabl...
GitHub user jackylk opened a pull request: https://github.com/apache/carbondata/pull/995 [CARBONDATA-1123] Rename interface and variable for RLE encoding This PR improve the readability in RLE encoding implementation. No logic is changed in this PR. Verify with all testsuites You can merge this pull request into a Git repository by running: $ git pull https://github.com/jackylk/incubator-carbondata rle Alternatively you can review and apply these changes as the patch at: https://github.com/apache/carbondata/pull/995.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 #995 commit d48ff3de335e3638653c14da83e7f34329a55c4a Author: jackylk Date: 2017-06-06T04:13:47Z rename RLE --- 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] carbondata pull request #995: [CARBONDATA-1123] Rename interface and variabl...
Github user QiangCai commented on a diff in the pull request: https://github.com/apache/carbondata/pull/995#discussion_r121879498 --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/columnar/BlockIndexerStorageForNoInvertedIndex.java --- @@ -38,26 +37,26 @@ private byte[] max; public BlockIndexerStorageForNoInvertedIndex(byte[][] keyBlockInput) { --- End diff -- rename parameter keyBlockInput --- 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] carbondata pull request #995: [CARBONDATA-1123] Rename interface and variabl...
Github user QiangCai commented on a diff in the pull request: https://github.com/apache/carbondata/pull/995#discussion_r121880914 --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/columnar/BlockIndexerStorageForInt.java --- @@ -27,25 +27,26 @@ public class BlockIndexerStorageForInt implements IndexStorage { private boolean alreadySorted; - private int[] dataAfterComp; + private int[] rowIdPage; - private int[] indexMap; + private int[] rowIdRlePage; - private byte[][] keyBlock; + private byte[][] dataPage; - private int[] dataIndexMap; + private int[] dataRlePage; private int totalSize; - public BlockIndexerStorageForInt(byte[][] keyBlock, boolean compressData, boolean isNoDictionary, + public BlockIndexerStorageForInt(byte[][] dataPage, boolean rleOnData, boolean isNoDictionary, boolean isSortRequired) { -ColumnWithIntIndex[] columnWithIndexs = createColumnWithIndexArray(keyBlock, isNoDictionary); +ColumnWithIntIndex[] dataWithRowId = createColumnWithIndexArray(dataPage, isNoDictionary); if (isSortRequired) { - Arrays.sort(columnWithIndexs); + Arrays.sort(dataWithRowId); } -compressMyOwnWay(extractDataAndReturnIndexes(columnWithIndexs, keyBlock)); -if (compressData) { - compressDataMyOwnWay(columnWithIndexs); +int[] rowIds = extractDataAndReturnIndexes(dataWithRowId, dataPage); --- End diff -- suggest to change: extractDataAndReturnIndexes => extractDataAndReturnRowIds --- 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] carbondata pull request #995: [CARBONDATA-1123] Rename interface and variabl...
Github user QiangCai commented on a diff in the pull request: https://github.com/apache/carbondata/pull/995#discussion_r121883050 --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/columnar/BlockIndexerStorageForShort.java --- @@ -193,13 +194,13 @@ private void compressDataMyOwnWay(ColumnWithShortIndex[] indexes) { map.add(counter); // if rle is index size is more than 70% then rle wont give any benefit // so better to avoid rle index and write data as it is -boolean useRle = (((list.size() + map.size()) * 100) / indexes.length) < 70; +boolean useRle = (((list.size() + map.size()) * 100) / dataWithRowId.length) < 70; if (useRle) { - this.keyBlock = convertToKeyArray(list); - dataIndexMap = convertToArray(map); + this.dataPage = convertToKeyArray(list); --- End diff -- convertToDataPage --- 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] carbondata pull request #995: [CARBONDATA-1123] Rename interface and variabl...
Github user QiangCai commented on a diff in the pull request: https://github.com/apache/carbondata/pull/995#discussion_r121882250 --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/columnar/BlockIndexerStorageForShort.java --- @@ -27,25 +27,26 @@ private boolean alreadySorted; - private short[] dataAfterComp; + private short[] rowIdPage; - private short[] indexMap; + private short[] rowIdRlePage; - private byte[][] keyBlock; + private byte[][] dataPage; - private short[] dataIndexMap; + private short[] dataRlePage; private int totalSize; - public BlockIndexerStorageForShort(byte[][] keyBlock, boolean compressData, + public BlockIndexerStorageForShort(byte[][] dataPage, boolean rleOnData, boolean isNoDictionary, boolean isSortRequired) { -ColumnWithShortIndex[] columnWithIndexs = createColumnWithIndexArray(keyBlock, isNoDictionary); +ColumnWithShortIndex[] dataWithRowId = createColumnWithIndexArray(dataPage, isNoDictionary); --- End diff -- ColumnWithShortIndex => ColumnWithShortRowId createColumnWithIndexArray => createColumnWithRowId --- 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] carbondata pull request #995: [CARBONDATA-1123] Rename interface and variabl...
Github user QiangCai commented on a diff in the pull request: https://github.com/apache/carbondata/pull/995#discussion_r121879268 --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/columnar/BlockIndexerStorageForNoInvertedIndexForShort.java --- @@ -38,42 +38,42 @@ public BlockIndexerStorageForNoInvertedIndexForShort(byte[][] keyBlockInput, --- End diff -- rename parameter keyBlockInput --- 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] carbondata pull request #995: [CARBONDATA-1123] Rename interface and variabl...
Github user QiangCai commented on a diff in the pull request: https://github.com/apache/carbondata/pull/995#discussion_r121879795 --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/columnar/BlockIndexerStorageForShort.java --- @@ -71,14 +72,14 @@ public BlockIndexerStorageForShort(byte[][] keyBlock, boolean compressData, return columnWithIndexs; } - private short[] extractDataAndReturnIndexes(ColumnWithShortIndex[] columnWithIndexs, + private short[] extractDataAndReturnRowId(ColumnWithShortIndex[] dataWithRowId, byte[][] keyBlock) { --- End diff -- rename parameter keyBlock, and line 58 also need --- 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] carbondata pull request #995: [CARBONDATA-1123] Rename interface and variabl...
Github user QiangCai commented on a diff in the pull request: https://github.com/apache/carbondata/pull/995#discussion_r121882386 --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/columnar/BlockIndexerStorageForShort.java --- @@ -27,25 +27,26 @@ private boolean alreadySorted; - private short[] dataAfterComp; + private short[] rowIdPage; - private short[] indexMap; + private short[] rowIdRlePage; - private byte[][] keyBlock; + private byte[][] dataPage; - private short[] dataIndexMap; + private short[] dataRlePage; private int totalSize; - public BlockIndexerStorageForShort(byte[][] keyBlock, boolean compressData, + public BlockIndexerStorageForShort(byte[][] dataPage, boolean rleOnData, boolean isNoDictionary, boolean isSortRequired) { -ColumnWithShortIndex[] columnWithIndexs = createColumnWithIndexArray(keyBlock, isNoDictionary); +ColumnWithShortIndex[] dataWithRowId = createColumnWithIndexArray(dataPage, isNoDictionary); if (isSortRequired) { - Arrays.sort(columnWithIndexs); + Arrays.sort(dataWithRowId); } -compressMyOwnWay(extractDataAndReturnIndexes(columnWithIndexs, keyBlock)); -if (compressData) { - compressDataMyOwnWay(columnWithIndexs); +short[] rowIds = extractDataAndReturnRowId(dataWithRowId, dataPage); --- End diff -- extractDataAndReturnRowId => extractDataAndReturnRowIds --- 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] carbondata pull request #995: [CARBONDATA-1123] Rename interface and variabl...
Github user QiangCai commented on a diff in the pull request: https://github.com/apache/carbondata/pull/995#discussion_r121880639 --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/columnar/BlockIndexerStorageForInt.java --- @@ -27,25 +27,26 @@ public class BlockIndexerStorageForInt implements IndexStorage { private boolean alreadySorted; - private int[] dataAfterComp; + private int[] rowIdPage; - private int[] indexMap; + private int[] rowIdRlePage; - private byte[][] keyBlock; + private byte[][] dataPage; - private int[] dataIndexMap; + private int[] dataRlePage; private int totalSize; - public BlockIndexerStorageForInt(byte[][] keyBlock, boolean compressData, boolean isNoDictionary, + public BlockIndexerStorageForInt(byte[][] dataPage, boolean rleOnData, boolean isNoDictionary, boolean isSortRequired) { -ColumnWithIntIndex[] columnWithIndexs = createColumnWithIndexArray(keyBlock, isNoDictionary); +ColumnWithIntIndex[] dataWithRowId = createColumnWithIndexArray(dataPage, isNoDictionary); --- End diff -- suggest to change as following. ColumnWithIntIndex => ColumnWithRowId createColumnWithIndexArray => createColumnWithRowId --- 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] carbondata pull request #995: [CARBONDATA-1123] Rename interface and variabl...
Github user QiangCai commented on a diff in the pull request: https://github.com/apache/carbondata/pull/995#discussion_r121881594 --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/columnar/BlockIndexerStorageForInt.java --- @@ -189,11 +190,11 @@ private void compressDataMyOwnWay(ColumnWithIntIndex[] indexes) { } map.add(start); map.add(counter); -this.keyBlock = convertToKeyArray(list); -if (indexes.length == keyBlock.length) { - dataIndexMap = new int[0]; +this.dataPage = convertToKeyArray(list); --- End diff -- convertToDataPage --- 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] carbondata pull request #995: [CARBONDATA-1123] Rename interface and variabl...
Github user QiangCai commented on a diff in the pull request: https://github.com/apache/carbondata/pull/995#discussion_r121873409 --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/columnar/BlockIndexerStorageForInt.java --- @@ -73,14 +74,14 @@ public BlockIndexerStorageForInt(byte[][] keyBlock, boolean compressData, boolea return columnWithIndexs; } - private int[] extractDataAndReturnIndexes(ColumnWithIntIndex[] columnWithIndexs, + private int[] extractDataAndReturnIndexes(ColumnWithIntIndex[] dataWithRowId, byte[][] keyBlock) { --- End diff -- rename parameter keyBlock, and line 58 also need --- 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] carbondata pull request #995: [CARBONDATA-1123] Rename interface and variabl...
Github user asfgit closed the pull request at: https://github.com/apache/carbondata/pull/995 --- 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. ---