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

ASF GitHub Bot commented on PHOENIX-628:
----------------------------------------

tkhurana commented on code in PR #1667:
URL: https://github.com/apache/phoenix/pull/1667#discussion_r1323388922


##########
phoenix-core/src/main/java/org/apache/phoenix/schema/types/PJson.java:
##########
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.phoenix.schema.types;
+
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.phoenix.schema.SortOrder;
+import org.apache.phoenix.util.ByteUtil;
+
+import java.sql.Types;
+
+import org.bson.RawBsonDocument;

Review Comment:
   @ranganathg I was thinking if we could abstract the underlying json format 
and make it pluggable with BSON as the default. So rather than directly using 
BSON classes we could abstract that away behind an interface.





> 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 R. Taylor
>            Assignee: Ranganath Govardhanagiri
>              Labels: JSON, Java, SQL
>             Fix For: 4.4.1
>
>         Attachments: JSON Support for Phoenix.docx, Screen Shot 2022-02-02 at 
> 12.23.24 PM.png
>
>
> 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
(v8.20.10#820010)

Reply via email to