[
https://issues.apache.org/jira/browse/PHOENIX-1297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14158978#comment-14158978
]
James Taylor commented on PHOENIX-1297:
---------------------------------------
Looks good, [~samarthjain]. One comment on changing the sql type name returned
by PDataType - no matter what it's called, you'll need some special logic to
get the correct type name for an array. For example, if you have an array of
CHAR(15), you'll need to get the base type of the array (CHAR), then append the
(15) and then if it's an array, you'll need to tack on ARRAY or []. Also, you
should take into account scale: if pCol.getScale() is not null, then you'd want
to do a (<maxLength>,<scale>). Please make these changes in your util
functions. Given, that you won't be able to use it outright, my inclination is
to just leave the names as is.
Related to this, it'd be good to have a unit test that looks through all
PDataType.value(), gets the sql name using your new function, and then tries to
create a table with them to make sure they "roundtrip".
> Adding utility methods to get primary key information from the optimized
> query plan
> -----------------------------------------------------------------------------------
>
> Key: PHOENIX-1297
> URL: https://issues.apache.org/jira/browse/PHOENIX-1297
> Project: Phoenix
> Issue Type: Task
> Affects Versions: 5.0.0, 4.2, 3.2
> Reporter: Samarth Jain
> Assignee: Samarth Jain
> Attachments: PHOENIX-1297.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)