Gabriel Reid created PHOENIX-116:
------------------------------------

             Summary: Phoenix array integer types overlap with existing 
java.sql.Types
                 Key: PHOENIX-116
                 URL: https://issues.apache.org/jira/browse/PHOENIX-116
             Project: Phoenix
          Issue Type: Bug
            Reporter: Gabriel Reid


The type value returned for Phoenix typed arrays are currently created by 
taking the sum of java.sql.Types.ARRAY and the sql type of the element type. 
However, this causes some collisions with existing java.sql.Types values.

For example, the SQL type value for BINARY_ARRAY is the value of Types.ARRAY + 
Types.BINARY, which is 2003 + (-2), or 2001. 2001 is an existing constant for 
java.sql.Types.DISTINCT. 

There is also a collision with java.sql.Types.BLOB and 
PDataTypes.CHAR_ARRAY.getSqlType().

Next to the fact that these collisions occur, there's probably not much reason 
to base the SQL types for typed arrays on the java.sql.Types.ARRAY constant, as 
I assume that external tooling won't be aware of this convention anyhow.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to