[ https://issues.apache.org/jira/browse/HBASE-7474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13549585#comment-13549585 ]
Ted Yu commented on HBASE-7474: ------------------------------- @Anil: Thanks for the detailed response. In the future, you can quote comments using bq<dot>. People would be able to correlate your response with original comment. w.r.t. singleRegion in SortingProtocolImplementation.sortIncreasing(), your explanation makes sense. + * @param singleRegion does this scan request spans multiple regions? Here 'scan request' is singular, so 'spans' should be 'span'. I am fine with the javadoc after correcting spelling. + if (sortDecreasing) return instance.sortDecreasing(scan, columnFamily, columnQualifier, + colInterpreter, startIndex, pageSize, true); + else return instance.sortIncreasing(scan, columnFamily, columnQualifier, bq. I am curious to know if there is any technical reason for not using "else" in the above case? The reason is that when sortDecreasing is true, we would return from the method, hence not reaching else statement. bq. I am worried that this abstraction will make the implementation a tab more slow There are several conditional statements inside colInterpreter.compare(), I doubt there would be noticeable impact on performance if we unite code ascending and descending sorting. You can record the performance number for current implementation and compare the performance of rewritten code with that number. bq. I am thinking of adding the missing method "T getValue(KeyValue kv) throws IOException;" in ColumnInterpreter. Is that fine? ColumnInterpreter is able to provide access to value of the passed in KeyValue, so I don't think there is need to add the new method. > Endpoint Implementation to support Scans with Sorting of Rows based on column > values(similar to "order by" clause of RDBMS) > --------------------------------------------------------------------------------------------------------------------------- > > Key: HBASE-7474 > URL: https://issues.apache.org/jira/browse/HBASE-7474 > Project: HBase > Issue Type: New Feature > Components: Coprocessors, Scanners > Affects Versions: 0.94.3 > Reporter: Anil Gupta > Assignee: Anil Gupta > Priority: Minor > Labels: coprocessors, scan, sort > Fix For: 0.94.5 > > Attachments: hbase-7474.patch, hbase-7474-v2.patch, > SortingEndpoint_high_level_flowchart.pdf > > > Recently, i have developed an Endpoint which can sort the Results(rows) on > the basis of column values. This functionality is similar to "order by" > clause of RDBMS. I will be submitting this Patch for HBase0.94.3 > I am almost done with the initial development and testing of feature. But, i > need to write the JUnits for this. I will also try to make design doc. > Thanks, > Anil Gupta > Software Engineer II, Intuit, inc -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira