You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2014/10/07 02:50:34 UTC

[jira] [Commented] (PHOENIX-1327) Disallow creating arrays of fixed width base type without the max length being specified

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

James Taylor commented on PHOENIX-1327:
---------------------------------------

That's actually an error that we resolve BINARY_ARRAY. Try keeping the rename you had for PDataType of arrays (i.e. return "BINARY ARRAY" as the name). You should just get an error about the type not existing if you use BINARY_ARRAY as a type name.

> Disallow creating arrays of fixed width base type without the max length being specified
> ----------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-1327
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1327
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Samarth Jain
>             Fix For: 5.0.0, 4.2, 3.2
>
>
> Today, we allow a user to specify an array who base type is of fixed width as:
> CREATE TABLE foo (k BINARY_ARRAY NOT NULL PRIMARY KEY)
> This shouldn't be allowed as for fixed width data types like CHAR and BINARY, specifying a max length is mandatory. 
> These alternate statements properly enforce the max length constraint:
> CREATE TABLE foo (k BINARY ARRAY NOT NULL PRIMARY KEY)
> CREATE TABLE foo (k BINARY[] NOT NULL PRIMARY KEY)



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