[ 
https://issues.apache.org/jira/browse/HBASE-15333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15260928#comment-15260928
 ] 

Zhan Zhang commented on HBASE-15333:
------------------------------------

[~jmhsieh] Thanks for reviewing the code. I want to discuss in more details 
before changing the code.
Following is my comments:

1. DefaultSource.scala: It is not a replacement, instead it fix the logic in 
the partition pruning and predicate pushdown logic (here we assume the data is 
naive encoded, same as the current code base).
2. DefaultSource.scala:618: typo- Will fix it.
3. Make sense. Will do it.
4.
  4.1 will move to separate class.
  4.2 We are not assume any specific encoding/decoding here. As we want to 
support the java primitive type as already done in the current existing 
codebase. You are definitely right that we may want to more flexibility and 
different encoder/decoder. I think fixing the current naive bytes may take 
priority, and can be the first step. 
5. If we don't change it, and there is PassFilter, it will crash the region 
server.
6. BoundRange.scala:26: Will format the doc in more formal way. Typically it is 
inclusive, but the upper level logic need to take care of exclusive for special 
cases.
7. Will change FilterOps to  JavaBytesEncoder
8. Will enhance the current test cases.

Overall, I think we can first make the code base support naive encoding work 
correctly as the first step, and the framework level it does not prevent adding 
special encoding/decoding, which can be added later by me or other 
contributors. How do you think? Please let me know if you have any concerns.




> Enhance the filter to handle short, integer, long, float and double
> -------------------------------------------------------------------
>
>                 Key: HBASE-15333
>                 URL: https://issues.apache.org/jira/browse/HBASE-15333
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Zhan Zhang
>            Assignee: Zhan Zhang
>         Attachments: HBASE-15333-1.patch, HBASE-15333-2.patch, 
> HBASE-15333-3.patch, HBASE-15333-4.patch, HBASE-15333-5.patch
>
>
> Currently, the range filter is based on the order of bytes. But for java 
> primitive type, such as short, int, long, double, float, etc, their order is 
> not consistent with their byte order, extra manipulation has to be in place 
> to take care of them  correctly.
> For example, for the integer range (-100, 100), the filter <= 1, the current 
> filter will return 0 and 1, and the right return value should be (-100, 1]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to