[
https://issues.apache.org/jira/browse/CARBONDATA-29?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15358941#comment-15358941
]
ASF GitHub Bot commented on CARBONDATA-29:
------------------------------------------
Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/10#discussion_r69297811
--- Diff:
processing/src/main/java/org/carbondata/processing/store/writer/CarbonFactDataWriterImplForIntIndexAndAggBlock.java
---
@@ -106,12 +111,36 @@ public NodeHolder
buildDataNodeHolder(IndexStorage<int[]>[] keyStorageArray, byt
}
totalKeySize += keyLengths[i];
- if (isComplexType[i] || isDictionaryColumn[i]) {
- allMinValue[i] = keyStorageArray[i].getMin();
- allMaxValue[i] = keyStorageArray[i].getMax();
+ if(isUseInvertedIndex[i]) {
+ if (isComplexType[i] || isDictionaryColumn[i]) {
+ allMinValue[i] = keyStorageArray[i].getMin();
+ allMaxValue[i] = keyStorageArray[i].getMax();
+ } else {
+ allMinValue[i] =
updateMinMaxForNoDictionary(keyStorageArray[i].getMin());
+ allMaxValue[i] =
updateMinMaxForNoDictionary(keyStorageArray[i].getMax());
+ }
} else {
- allMinValue[i] =
updateMinMaxForNoDictionary(keyStorageArray[i].getMin());
- allMaxValue[i] =
updateMinMaxForNoDictionary(keyStorageArray[i].getMax());
+ byte[][] minmaxArray = keyStorageArray[i].getKeyBlock();
--- End diff --
Move the code of calculating min max to the
`BlockIndexerStorageForNoInvertedIndex`. It already has method to get min and
max so better calculate there and make it available to `getMin` and `getMax`
methods.
> Make inverted index can be configurable
> ---------------------------------------
>
> Key: CARBONDATA-29
> URL: https://issues.apache.org/jira/browse/CARBONDATA-29
> Project: CarbonData
> Issue Type: New Feature
> Reporter: zhangshunyu
> Assignee: zhangshunyu
>
> We should make inverted index can be configurable, the user can use a
> parameter to open/close this function during loading data.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)