[
https://issues.apache.org/jira/browse/PHOENIX-524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gabriel Reid resolved PHOENIX-524.
----------------------------------
Resolution: Fixed
Bulk resolve of closed issues imported from GitHub. This status was reached by
first re-opening all closed imported issues and then resolving them in bulk.
> Add unit tests around CHAR conversion to/from VARCHAR/CHAR
> ----------------------------------------------------------
>
> Key: PHOENIX-524
> URL: https://issues.apache.org/jira/browse/PHOENIX-524
> Project: Phoenix
> Issue Type: Task
> Reporter: James Taylor
> Assignee: saikiran perumala
>
> Now that CHAR types are auto-padded, we need to add some tests around how we
> handle SUBSTR over them, in particular when we're substring-ing into the
> padded characters. First step is to figure out what the SQL spec says to do.
> Then add a few unit tests around this and fix any issues that turn up.
> One test that would be interesting would be the following simple test:
> CREATE TABLE substr_test(s CHAR(10));
> UPSERT INTO TABLE substr_test VALUES('foo');
> UPSERT INTO TABLE substr_test VALUES('foobar');
> SELECT * FROM substr_test WHERE substr(s,3,3) = 'o'; -- should 'o' be
> padded? should 'foo' row be returned?
> SELECT * FROM substr_test WHERE substr(s,4,3) = 'bar'; -- does this
> cause an exception?
> SELECT * FROM substr_test WHERE substr(s,4,3) != 'bar'; -- does this
> return 'foo' and should it?
--
This message was sent by Atlassian JIRA
(v6.2#6252)