[jira] [Commented] (HBASE-10789) Add NumberComparator
[ https://issues.apache.org/jira/browse/HBASE-10789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13942047#comment-13942047 ] Nick Dimiduk commented on HBASE-10789: -- Have a look at the [DataType|http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/types/DataType.html] API. I think we could provide a DataTypeComparator that took into account the presence of [isOrderPreserving|http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/types/DataType.html#isOrderPreserving()]. For implementations that are order preserving, it can do full ordering efficiently. Of course, if the type isn't order preserving, it could deserialize the values and compare them natively. Add NumberComparator Key: HBASE-10789 URL: https://issues.apache.org/jira/browse/HBASE-10789 Project: HBase Issue Type: Improvement Components: Filters Reporter: haosdent Assignee: haosdent Sometimes user may want to filter out which value less than a positive number. But they finally would get a result contains negative number. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (HBASE-10789) Add NumberComparator
[ https://issues.apache.org/jira/browse/HBASE-10789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940742#comment-13940742 ] Lars Hofhansl commented on HBASE-10789: --- I think this is a bit more tricky. You may want to sort things correctly too, and in that case you'd need to change the encoding. We can add a one-off comparator now. [~ndimiduk], FYI. Add NumberComparator Key: HBASE-10789 URL: https://issues.apache.org/jira/browse/HBASE-10789 Project: HBase Issue Type: Improvement Components: Filters Reporter: haosdent Assignee: haosdent Sometimes user may want to filter out which value less than a positive number. But they finally would get a result contains negative number. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (HBASE-10789) Add NumberComparator
[ https://issues.apache.org/jira/browse/HBASE-10789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940797#comment-13940797 ] Nick Dimiduk commented on HBASE-10789: -- DataType-aware filters are also on my todo list, though I wanted to get a little further along down that road before speculating about them. The advantage of using an order-preserving encoding (like {{OrderedBytes}}) is that the data is ordered this way by HBase and these filters can efficiently skip over swaths of data (depending on the use-case). There's definitely more to explore here. For the time being, it makes sense to have filters that support the different encoding formats produced by {{Bytes}}, but I think this is the wrong level of abstraction for the long run. Add NumberComparator Key: HBASE-10789 URL: https://issues.apache.org/jira/browse/HBASE-10789 Project: HBase Issue Type: Improvement Components: Filters Reporter: haosdent Assignee: haosdent Sometimes user may want to filter out which value less than a positive number. But they finally would get a result contains negative number. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (HBASE-10789) Add NumberComparator
[ https://issues.apache.org/jira/browse/HBASE-10789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13941304#comment-13941304 ] haosdent commented on HBASE-10789: -- [~ndimiduk] So we should add type aware filters based on OrderedBytes. Is it right? Bytes is regardless of data type. Add a number comparator to it isn't the best way. Not matter based on OrderedBytes or others, to provide a easier way for user to filter number is necessary. Add NumberComparator Key: HBASE-10789 URL: https://issues.apache.org/jira/browse/HBASE-10789 Project: HBase Issue Type: Improvement Components: Filters Reporter: haosdent Assignee: haosdent Sometimes user may want to filter out which value less than a positive number. But they finally would get a result contains negative number. -- This message was sent by Atlassian JIRA (v6.2#6252)