Github user gabrielreid commented on the pull request:
https://github.com/apache/phoenix/pull/47#issuecomment-82582761
This code looks pretty good (with the exception of a few code-formatting
issues). I think that the test coverage should be extended a bit though, with
the following things being added:
* tests using both sort orders (ascending and descending)
* a test where a the input value is null
* a test where the search string isn't found to verify the return value in
that situation
* a test where the function is used in a filter (as this ensures that the
function is serialized/deserialized)
Specifically around the serialization/deserialization, there will be a
no-args constructor needed, as well as an init method to initialize the search
string. See the implementation of RegexpSplitFunction for an example of how
this is done.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---