[ https://issues.apache.org/jira/browse/PHOENIX-628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14512174#comment-14512174 ]
ASF GitHub Bot commented on PHOENIX-628: ---------------------------------------- Github user JamesRTaylor commented on a diff in the pull request: https://github.com/apache/phoenix/pull/76#discussion_r29096669 --- Diff: phoenix-core/src/main/java/org/apache/phoenix/schema/types/PDataType.java --- @@ -1144,17 +1144,18 @@ public static PDataType fromLiteral(Object value) { return null; } for (PDataType type : PDataType.values()) { - if (type.isArrayType()) { - PhoenixArray arr = (PhoenixArray) value; - if ((type.getSqlType() == arr.baseType.sqlType + PDataType.ARRAY_TYPE_BASE) - && type.getJavaClass().isInstance(value)) { - return type; - } - } else { - if (type.getJavaClass().isInstance(value)) { - return type; - } - } + if (type.isArrayType() && type.getJavaClass().isInstance(value)) { --- End diff -- I get it (finally :-) ). I like Thomas' suggestion, though. > Support native JSON data type > ----------------------------- > > Key: PHOENIX-628 > URL: https://issues.apache.org/jira/browse/PHOENIX-628 > Project: Phoenix > Issue Type: Task > Affects Versions: 4.4.0 > Reporter: James Taylor > Assignee: Aakash Pradeep > Labels: JSON, Java, SQL > Fix For: 4.4.0 > > > MongoDB and PostGres do some interesting things with JSON. We should look at > adding similar support. For a detailed description, see JSONB support in > Postgres: > http://www.craigkerstiens.com/2014/03/24/Postgres-9.4-Looking-up > http://www.depesz.com/2014/03/25/waiting-for-9-4-introduce-jsonb-a-structured-format-for-storing-json/ > http://michael.otacoo.com/postgresql-2/manipulating-jsonb-data-with-key-unique/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)