[ https://issues.apache.org/jira/browse/HIVE-2535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13151100#comment-13151100 ]
Hudson commented on HIVE-2535: ------------------------------ Integrated in Hive-trunk-h0.21 #1089 (See [https://builds.apache.org/job/Hive-trunk-h0.21/1089/]) HIVE-2535: Use sorted nature of compact indexes (Kevin Wilfong via He Yongqiang) heyongqiang : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1202525 Files : * /hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java * /hive/trunk/conf/hive-default.xml * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ExprNodeGenericFuncEvaluator.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FilterOperator.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/index/compact/CompactIndexHandler.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/BucketizedHiveRecordReader.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/CombineHiveInputFormat.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/CombineHiveRecordReader.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/HiveContextAwareRecordReader.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/HiveInputFormat.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/HiveRecordReader.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/IOContext.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/RCFile.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/RCFileRecordReader.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeGenericFuncDesc.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/FilterDesc.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/MapredWork.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBaseCompare.java * /hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/hooks/VerifyHiveSortedInputFormatUsedHook.java * /hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/io/TestHiveBinarySearchRecordReader.java * /hive/trunk/ql/src/test/queries/clientpositive/index_compact_binary_search.q * /hive/trunk/ql/src/test/results/clientpositive/index_compact_binary_search.q.out > Use sorted nature of compact indexes > ------------------------------------ > > Key: HIVE-2535 > URL: https://issues.apache.org/jira/browse/HIVE-2535 > Project: Hive > Issue Type: Improvement > Reporter: Kevin Wilfong > Assignee: Kevin Wilfong > Attachments: HIVE-2535.1.patch.txt, HIVE-2535.2.patch.txt, > HIVE-2535.3.patch.txt, HIVE-2535.4.patch.txt > > > Compact indexes are sorted based on the indexed columns, but we are not using > this fact when we access the index. > To start with, if the index is stored as an RC file, and if the predicate > being used to access the index consists of only one non-partition condition > using one of the operators >,>=,<,<=,= we could use a binary search (if > necessary) to find the block to begin scanning for unfiltered rows, and we > could use the result of comparing the value in the column with the constant > (this is necessarily the form of a predicate which is optimized using an > index) to determine when we have found all the rows which will be unfiltered. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira