[GitHub] incubator-carbondata pull request #70: [CARBONDATA-154] Fix the bug of block...
Github user ravipesala commented on a diff in the pull request: https://github.com/apache/incubator-carbondata/pull/70#discussion_r74554497 --- Diff: core/src/main/java/org/carbondata/scan/filter/FilterUtil.java --- @@ -669,27 +669,14 @@ public static DimColumnFilterInfo getFilterListForAllMembersRS(Expression expres * @param segmentProperties * @return long[] start key */ - public static long[] getStartKey(DimColumnResolvedFilterInfo dimColResolvedFilterInfo, - SegmentProperties segmentProperties, long[] startKey) { -MapdimensionFilter = -dimColResolvedFilterInfo.getDimensionResolvedFilterInstance(); -for (Map.Entry entry : dimensionFilter.entrySet()) { - List values = entry.getValue(); - if (null == values || !entry.getKey().hasEncoding(Encoding.DICTIONARY)) { -continue; - } - boolean isExcludePresent = false; - for (DimColumnFilterInfo info : values) { -if (!info.isIncludeFilter()) { - isExcludePresent = true; -} - } - if (isExcludePresent) { -continue; - } - getStartKeyBasedOnFilterResoverInfo(dimensionFilter, startKey); + public static void getStartKey(Map dimensionFilter, + AbsoluteTableIdentifier tableIdentifier, long[] startKey, SegmentProperties segmentProperties, --- End diff -- no use of `tableIdentifier` and `segmentProperties`, please remove from static method. --- 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 #70: [CARBONDATA-154] Fix the bug of block...
GitHub user Zhangshunyu opened a pull request: https://github.com/apache/incubator-carbondata/pull/70 [CARBONDATA-154] Fix the bug of block prune that query result is wrong. ## Why raise this pr: During block prune, endkey is always only decided by the last filter expression, this is a bug and can lead wrong result, For example, when load data whose dimension column is 12 lines of 'a', 12 lines of 'b', 12 lines of 'c', if query like "select * from tablename where colname='c' or colname='b' or colname='a'" only 12lines 'a' will be selected because of wrong endkey. ## How to solve this: Fix the end key consider all the filter expression end key get max and start key get (min - 1) for each column level, using this to produce a new start key an a new endkey. For more details please look at the test case. You can merge this pull request into a Git repository by running: $ git pull https://github.com/Zhangshunyu/incubator-carbondata blockprune Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-carbondata/pull/70.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 #70 commit d2bdb538f8b30df39ae3730aa0498a44ed934f03 Author: ZhangshunyuDate: 2016-08-10T03:09:20Z fix the bug og block prune --- 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. ---