[GitHub] [phoenix-omid] stoty closed pull request #140: OMID-237 TestHBaseTransactionClient.testReadCommitTimestampFromCommit…

2023-09-22 Thread via GitHub


stoty closed pull request #140: OMID-237 
TestHBaseTransactionClient.testReadCommitTimestampFromCommit…
URL: https://github.com/apache/phoenix-omid/pull/140


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@phoenix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [phoenix-omid] stoty closed pull request #141: OMID-248 Transactional Phoenix tests fail on Java 17 in getDefaultNet…

2023-09-22 Thread via GitHub


stoty closed pull request #141: OMID-248 Transactional Phoenix tests fail on 
Java 17 in getDefaultNet…
URL: https://github.com/apache/phoenix-omid/pull/141


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@phoenix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Commented] (PHOENIX-6748) Add support for Java 17

2023-09-22 Thread Istvan Toth (Jira)


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

Istvan Toth commented on PHOENIX-6748:
--

We need to update to an OMID release with OMID-248.

> Add support for Java 17
> ---
>
> Key: PHOENIX-6748
> URL: https://issues.apache.org/jira/browse/PHOENIX-6748
> Project: Phoenix
>  Issue Type: Improvement
>  Components: core
>Reporter: Istvan Toth
>Priority: Major
>
> We cannot even run the test suite on JDK 17.
> Most of the problems are coming from HBase, so we can't do much until HBase 
> solves this problem.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [phoenix] Aarchy opened a new pull request, #1687: PHOENIX-7034 Disallow mapped view creation when the schema does not exists

2023-09-22 Thread via GitHub


Aarchy opened a new pull request, #1687:
URL: https://github.com/apache/phoenix/pull/1687

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@phoenix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Commented] (PHOENIX-7034) Disallow mapped view creation when the schema does not exists

2023-09-22 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on PHOENIX-7034:
-

Aarchy opened a new pull request, #1687:
URL: https://github.com/apache/phoenix/pull/1687

   (no comment)




> Disallow mapped view creation when the schema does not exists
> -
>
> Key: PHOENIX-7034
> URL: https://issues.apache.org/jira/browse/PHOENIX-7034
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 5.2.0, 5.1.3
>Reporter: Richárd Antal
>Assignee: Aron Attila Meszaros
>Priority: Major
>
> Currently it is possible to create a mapped view on an HBase table even if 
> the schema is not created in phoenix.
> We should throw a schema does not exists error similarly to the table 
> creation.
> Steps to repro:
> hbase shell
> {noformat}
> create_namespace 'T'
> create 'T:T1’, {NAME => 'f1', VERSIONS => 5}
> put 'T:T1', '1', 'f1:lastname', 'Foo'
> {noformat}
> phoenix-sqlline
> {noformat}
> CREATE VIEW "T.T1" ( pk VARCHAR PRIMARY KEY, "f1"."lastname" VARCHAR 
> );{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [phoenix] shahrs87 commented on pull request #1686: PHOENIX-7003 Harden hbase region inconsistencies check in CQSI#getAllTableRegions method

2023-09-22 Thread via GitHub


shahrs87 commented on PR #1686:
URL: https://github.com/apache/phoenix/pull/1686#issuecomment-1731832397

   @Divneet18  Istvan is asking to change commit message (which is 
[here](https://github.com/apache/phoenix/pull/1686/commits)). You changed the 
title and that is also required.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@phoenix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Commented] (PHOENIX-7003) Harden hbase region inconsistencies check in CQSI#getAllTableRegions method

2023-09-22 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on PHOENIX-7003:
-

shahrs87 commented on PR #1686:
URL: https://github.com/apache/phoenix/pull/1686#issuecomment-1731832397

   @Divneet18  Istvan is asking to change commit message (which is 
[here](https://github.com/apache/phoenix/pull/1686/commits)). You changed the 
title and that is also required.




> Harden hbase region inconsistencies check in CQSI#getAllTableRegions method
> ---
>
> Key: PHOENIX-7003
> URL: https://issues.apache.org/jira/browse/PHOENIX-7003
> Project: Phoenix
>  Issue Type: Bug
>  Components: core
>Reporter: Rushabh Shah
>Assignee: Divneet Kaur
>Priority: Major
>
> Encountered an issue in production cluster where the region inconsistency 
> check didn't catch region hole and full region overlaps and the range scan 
> query returned incorrect results (result were out of range). We were running 
> hbck repair operation _exactly_ at the same time the query was running.
> This is the check 
> [here|https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java#L707-L720]
>  but this will check whether current regions end key is greater than previous 
> region's end key. 
> {code}
> if (Bytes.compareTo(regionLocation.getRegionInfo().getEndKey(), 
> currentKey) <= 0
> && !Bytes.equals(currentKey, HConstants.EMPTY_START_ROW)
> && !Bytes.equals(regionLocation.getRegionInfo().getEndKey(), 
> HConstants.EMPTY_END_ROW)) {
> GLOBAL_HBASE_COUNTER_METADATA_INCONSISTENCY.increment();
> String regionNameString =
> new 
> String(regionLocation.getRegionInfo().getRegionName(), 
> StandardCharsets.UTF_8);
> throw new IOException(String.format(
> "HBase region information overlap/inconsistencies on 
> region %s", regionNameString));
> }
> {code}
> The above check will NOT check if there are any region holes and full region 
> overlaps.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [phoenix] gjacoby126 commented on a diff in pull request #1686: PHOENIX-7003 Harden hbase region inconsistencies check in CQSI#getAllTableRegions method

2023-09-22 Thread via GitHub


gjacoby126 commented on code in PR #1686:
URL: https://github.com/apache/phoenix/pull/1686#discussion_r1334765885


##
phoenix-core/src/test/java/org/apache/phoenix/query/ConnectionQueryServicesImplTest.java:
##
@@ -194,7 +194,28 @@ public void testGetNextRegionStartKey() {
 
GlobalClientMetrics.GLOBAL_HBASE_COUNTER_METADATA_INCONSISTENCY.getMetric().reset();
 when(mockHRegionInfo.getStartKey()).thenReturn(notCorruptedStartKey);
 when(mockHRegionInfo.getEndKey()).thenReturn(notCorruptedNewKey);
-testGetNextRegionStartKey(mockCqsi, mockRegionLocation, 
notCorruptedEndKey, false);
+testGetNextRegionStartKey(mockCqsi, mockRegionLocation, 
notCorruptedEndKey, true);

Review Comment:
   Why is isCorrupted true here if both start and endkey are not corrupt and 
the current endkey is greater than the previous end key?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@phoenix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Commented] (PHOENIX-7003) Harden hbase region inconsistencies check in CQSI#getAllTableRegions method

2023-09-22 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on PHOENIX-7003:
-

gjacoby126 commented on code in PR #1686:
URL: https://github.com/apache/phoenix/pull/1686#discussion_r1334765885


##
phoenix-core/src/test/java/org/apache/phoenix/query/ConnectionQueryServicesImplTest.java:
##
@@ -194,7 +194,28 @@ public void testGetNextRegionStartKey() {
 
GlobalClientMetrics.GLOBAL_HBASE_COUNTER_METADATA_INCONSISTENCY.getMetric().reset();
 when(mockHRegionInfo.getStartKey()).thenReturn(notCorruptedStartKey);
 when(mockHRegionInfo.getEndKey()).thenReturn(notCorruptedNewKey);
-testGetNextRegionStartKey(mockCqsi, mockRegionLocation, 
notCorruptedEndKey, false);
+testGetNextRegionStartKey(mockCqsi, mockRegionLocation, 
notCorruptedEndKey, true);

Review Comment:
   Why is isCorrupted true here if both start and endkey are not corrupt and 
the current endkey is greater than the previous end key?





> Harden hbase region inconsistencies check in CQSI#getAllTableRegions method
> ---
>
> Key: PHOENIX-7003
> URL: https://issues.apache.org/jira/browse/PHOENIX-7003
> Project: Phoenix
>  Issue Type: Bug
>  Components: core
>Reporter: Rushabh Shah
>Assignee: Divneet Kaur
>Priority: Major
>
> Encountered an issue in production cluster where the region inconsistency 
> check didn't catch region hole and full region overlaps and the range scan 
> query returned incorrect results (result were out of range). We were running 
> hbck repair operation _exactly_ at the same time the query was running.
> This is the check 
> [here|https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java#L707-L720]
>  but this will check whether current regions end key is greater than previous 
> region's end key. 
> {code}
> if (Bytes.compareTo(regionLocation.getRegionInfo().getEndKey(), 
> currentKey) <= 0
> && !Bytes.equals(currentKey, HConstants.EMPTY_START_ROW)
> && !Bytes.equals(regionLocation.getRegionInfo().getEndKey(), 
> HConstants.EMPTY_END_ROW)) {
> GLOBAL_HBASE_COUNTER_METADATA_INCONSISTENCY.increment();
> String regionNameString =
> new 
> String(regionLocation.getRegionInfo().getRegionName(), 
> StandardCharsets.UTF_8);
> throw new IOException(String.format(
> "HBase region information overlap/inconsistencies on 
> region %s", regionNameString));
> }
> {code}
> The above check will NOT check if there are any region holes and full region 
> overlaps.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [phoenix] tkhurana commented on a diff in pull request #1667: PHOENIX-628 - Support native JSON data type

2023-09-22 Thread via GitHub


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


##
phoenix-core/src/it/java/org/apache/phoenix/end2end/json/JsonValueIT.java:
##
@@ -0,0 +1,580 @@
+/*
+ * 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.end2end.json;
+
+import org.apache.hadoop.hbase.TableName;
+import org.apache.phoenix.end2end.ParallelStatsDisabledIT;
+import org.apache.phoenix.util.PropertiesUtil;
+import org.apache.phoenix.util.TestUtil;
+import org.junit.Test;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.util.Properties;
+
+import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
+import static org.junit.Assert.*;
+
+public class JsonValueIT extends ParallelStatsDisabledIT {
+private String JsonDoc1 = "{  \n" +
+" \"info\":{\n" +
+"   \"type\":1,  \n" +
+"   \"address\":{\n" +
+" \"town\":\"Bristol\",  \n" +
+" \"county\":\"Avon\",  \n" +
+" \"country\":\"England\"  \n" +
+"   },  \n" +
+"   \"tags\":[\"Sport\", \"Water polo\"]  \n" +
+"},  \n" +
+"\"type\":\"Basic\",  \n" +
+"\"name\":\"AndersenFamily\"  \n" +
+" }";
+
+private String JsonDatatypes = "{\n" + "" +
+"   \"datatypes\": {\n" + "" +
+"   \"stringtype\": \"someString\",\n" +
+"\"inttype\": 1,\n" +
+"\"booltype\": true,\n" +
+"\"booltypef\": false,\n" +
+"\"doubletype\": 2.5, \n" +
+"\"longtype\": 1490020778457845, \n" +
+"\"intArray\": [1, 2, 3], \n" +
+"\"nullcheck\": null \n"+
+"}\n" +
+"}";
+
+private String JsonDoc2="{\n" +
+"   \"testCnt\": \"SomeCnt1\",\n" +
+"   \"test\": \"test1\",\n" +
+"   \"batchNo\": 1,\n" +
+"   \"infoTop\":[\n" +
+"   {\n" +
+"   \"_id\": \"618d982e407a8dbd65781450\",\n" +
+"   \"index\": 0,\n" +
+"   \"guid\": 
\"4f5a46f2-7271-492a-8347-a8223516715f\",\n" +
+"   \"isActive\": true,\n" +
+"   \"balance\": \"$3,746.11\",\n" +
+"   \"picture\": 
\"http://placehold.it/32x32\",\n"; +
+"   \"age\": 20,\n" +
+"   \"eyeColor\": \"green\",\n" +
+"   \"name\": \"Castaneda Golden\",\n" +
+"   \"gender\": \"male\",\n" +
+"   \"company\": \"AUSTEX\",\n" +
+"   \"email\": 
\"castanedagol...@austex.com\",\n" +
+"   \"phone\": \"+1 (979) 486-3061\",\n" +
+"   \"info\": {\n" +
+"   \"address\": {\n" +
+"   \"street\": \"function\",\n" +
+"   \"town\": \"Urbana\",\n" +
+"   \"state\": \"Delaware\"\n" +
+"   }\n" +
+"   },\n" +
+"   \"address\": \"322 Hancock Street, Nicut, 
Georgia, 5007\",\n" +
+"   \"about\": \"Esse anim minim nostrud 
aliquip. Quis anim ex dolore magna exercitation deserunt minim ad do est non. 
Magna fugiat eiusmod incididunt cupidatat. Anim occaecat nulla cillum culpa 
sunt amet.\\r\\n\",\n" +
+"   \"registered\": \"2015-11-06T01:32:28 
+08:00\",\n" +
+"   \"latitude\": 83.51654,\n" +
+"   \"longitude\": -93.749216,\n" +
+"   \"tags\": [\n" +
+  

[jira] [Commented] (PHOENIX-628) Support native JSON data type

2023-09-22 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on PHOENIX-628:


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


##
phoenix-core/src/it/java/org/apache/phoenix/end2end/json/JsonValueIT.java:
##
@@ -0,0 +1,580 @@
+/*
+ * 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.end2end.json;
+
+import org.apache.hadoop.hbase.TableName;
+import org.apache.phoenix.end2end.ParallelStatsDisabledIT;
+import org.apache.phoenix.util.PropertiesUtil;
+import org.apache.phoenix.util.TestUtil;
+import org.junit.Test;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.util.Properties;
+
+import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
+import static org.junit.Assert.*;
+
+public class JsonValueIT extends ParallelStatsDisabledIT {
+private String JsonDoc1 = "{  \n" +
+" \"info\":{\n" +
+"   \"type\":1,  \n" +
+"   \"address\":{\n" +
+" \"town\":\"Bristol\",  \n" +
+" \"county\":\"Avon\",  \n" +
+" \"country\":\"England\"  \n" +
+"   },  \n" +
+"   \"tags\":[\"Sport\", \"Water polo\"]  \n" +
+"},  \n" +
+"\"type\":\"Basic\",  \n" +
+"\"name\":\"AndersenFamily\"  \n" +
+" }";
+
+private String JsonDatatypes = "{\n" + "" +
+"   \"datatypes\": {\n" + "" +
+"   \"stringtype\": \"someString\",\n" +
+"\"inttype\": 1,\n" +
+"\"booltype\": true,\n" +
+"\"booltypef\": false,\n" +
+"\"doubletype\": 2.5, \n" +
+"\"longtype\": 1490020778457845, \n" +
+"\"intArray\": [1, 2, 3], \n" +
+"\"nullcheck\": null \n"+
+"}\n" +
+"}";
+
+private String JsonDoc2="{\n" +
+"   \"testCnt\": \"SomeCnt1\",\n" +
+"   \"test\": \"test1\",\n" +
+"   \"batchNo\": 1,\n" +
+"   \"infoTop\":[\n" +
+"   {\n" +
+"   \"_id\": \"618d982e407a8dbd65781450\",\n" +
+"   \"index\": 0,\n" +
+"   \"guid\": 
\"4f5a46f2-7271-492a-8347-a8223516715f\",\n" +
+"   \"isActive\": true,\n" +
+"   \"balance\": \"$3,746.11\",\n" +
+"   \"picture\": 
\"http://placehold.it/32x32\",\n"; +
+"   \"age\": 20,\n" +
+"   \"eyeColor\": \"green\",\n" +
+"   \"name\": \"Castaneda Golden\",\n" +
+"   \"gender\": \"male\",\n" +
+"   \"company\": \"AUSTEX\",\n" +
+"   \"email\": 
\"castanedagol...@austex.com\",\n" +
+"   \"phone\": \"+1 (979) 486-3061\",\n" +
+"   \"info\": {\n" +
+"   \"address\": {\n" +
+"   \"street\": \"function\",\n" +
+"   \"town\": \"Urbana\",\n" +
+"   \"state\": \"Delaware\"\n" +
+"   }\n" +
+"   },\n" +
+"   \"address\": \"322 Hancock Street, Nicut, 
Georgia, 5007\",\n" +
+"   \"about\": \"Esse anim minim nostrud 
aliquip. Quis anim ex dolore magna exercitation deserunt minim ad do est non. 
Magna fugiat eiusmod incididunt cupidatat. Anim occaecat nulla cillum culpa 
sunt amet.\\r\\n\",\n" +
+"   

[GitHub] [phoenix] tkhurana commented on a diff in pull request #1667: PHOENIX-628 - Support native JSON data type

2023-09-22 Thread via GitHub


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


##
phoenix-core/src/it/java/org/apache/phoenix/end2end/json/JsonValueIT.java:
##
@@ -0,0 +1,580 @@
+/*
+ * 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.end2end.json;
+
+import org.apache.hadoop.hbase.TableName;
+import org.apache.phoenix.end2end.ParallelStatsDisabledIT;
+import org.apache.phoenix.util.PropertiesUtil;
+import org.apache.phoenix.util.TestUtil;
+import org.junit.Test;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.util.Properties;
+
+import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
+import static org.junit.Assert.*;
+
+public class JsonValueIT extends ParallelStatsDisabledIT {
+private String JsonDoc1 = "{  \n" +
+" \"info\":{\n" +
+"   \"type\":1,  \n" +
+"   \"address\":{\n" +
+" \"town\":\"Bristol\",  \n" +
+" \"county\":\"Avon\",  \n" +
+" \"country\":\"England\"  \n" +
+"   },  \n" +
+"   \"tags\":[\"Sport\", \"Water polo\"]  \n" +
+"},  \n" +
+"\"type\":\"Basic\",  \n" +
+"\"name\":\"AndersenFamily\"  \n" +
+" }";
+
+private String JsonDatatypes = "{\n" + "" +
+"   \"datatypes\": {\n" + "" +
+"   \"stringtype\": \"someString\",\n" +
+"\"inttype\": 1,\n" +
+"\"booltype\": true,\n" +
+"\"booltypef\": false,\n" +
+"\"doubletype\": 2.5, \n" +
+"\"longtype\": 1490020778457845, \n" +
+"\"intArray\": [1, 2, 3], \n" +
+"\"nullcheck\": null \n"+
+"}\n" +
+"}";
+
+private String JsonDoc2="{\n" +
+"   \"testCnt\": \"SomeCnt1\",\n" +
+"   \"test\": \"test1\",\n" +
+"   \"batchNo\": 1,\n" +
+"   \"infoTop\":[\n" +
+"   {\n" +
+"   \"_id\": \"618d982e407a8dbd65781450\",\n" +
+"   \"index\": 0,\n" +
+"   \"guid\": 
\"4f5a46f2-7271-492a-8347-a8223516715f\",\n" +
+"   \"isActive\": true,\n" +
+"   \"balance\": \"$3,746.11\",\n" +
+"   \"picture\": 
\"http://placehold.it/32x32\",\n"; +
+"   \"age\": 20,\n" +
+"   \"eyeColor\": \"green\",\n" +
+"   \"name\": \"Castaneda Golden\",\n" +
+"   \"gender\": \"male\",\n" +
+"   \"company\": \"AUSTEX\",\n" +
+"   \"email\": 
\"castanedagol...@austex.com\",\n" +
+"   \"phone\": \"+1 (979) 486-3061\",\n" +
+"   \"info\": {\n" +
+"   \"address\": {\n" +
+"   \"street\": \"function\",\n" +
+"   \"town\": \"Urbana\",\n" +
+"   \"state\": \"Delaware\"\n" +
+"   }\n" +
+"   },\n" +
+"   \"address\": \"322 Hancock Street, Nicut, 
Georgia, 5007\",\n" +
+"   \"about\": \"Esse anim minim nostrud 
aliquip. Quis anim ex dolore magna exercitation deserunt minim ad do est non. 
Magna fugiat eiusmod incididunt cupidatat. Anim occaecat nulla cillum culpa 
sunt amet.\\r\\n\",\n" +
+"   \"registered\": \"2015-11-06T01:32:28 
+08:00\",\n" +
+"   \"latitude\": 83.51654,\n" +
+"   \"longitude\": -93.749216,\n" +
+"   \"tags\": [\n" +
+  

[jira] [Commented] (PHOENIX-628) Support native JSON data type

2023-09-22 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on PHOENIX-628:


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


##
phoenix-core/src/it/java/org/apache/phoenix/end2end/json/JsonValueIT.java:
##
@@ -0,0 +1,580 @@
+/*
+ * 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.end2end.json;
+
+import org.apache.hadoop.hbase.TableName;
+import org.apache.phoenix.end2end.ParallelStatsDisabledIT;
+import org.apache.phoenix.util.PropertiesUtil;
+import org.apache.phoenix.util.TestUtil;
+import org.junit.Test;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.util.Properties;
+
+import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
+import static org.junit.Assert.*;
+
+public class JsonValueIT extends ParallelStatsDisabledIT {
+private String JsonDoc1 = "{  \n" +
+" \"info\":{\n" +
+"   \"type\":1,  \n" +
+"   \"address\":{\n" +
+" \"town\":\"Bristol\",  \n" +
+" \"county\":\"Avon\",  \n" +
+" \"country\":\"England\"  \n" +
+"   },  \n" +
+"   \"tags\":[\"Sport\", \"Water polo\"]  \n" +
+"},  \n" +
+"\"type\":\"Basic\",  \n" +
+"\"name\":\"AndersenFamily\"  \n" +
+" }";
+
+private String JsonDatatypes = "{\n" + "" +
+"   \"datatypes\": {\n" + "" +
+"   \"stringtype\": \"someString\",\n" +
+"\"inttype\": 1,\n" +
+"\"booltype\": true,\n" +
+"\"booltypef\": false,\n" +
+"\"doubletype\": 2.5, \n" +
+"\"longtype\": 1490020778457845, \n" +
+"\"intArray\": [1, 2, 3], \n" +
+"\"nullcheck\": null \n"+
+"}\n" +
+"}";
+
+private String JsonDoc2="{\n" +
+"   \"testCnt\": \"SomeCnt1\",\n" +
+"   \"test\": \"test1\",\n" +
+"   \"batchNo\": 1,\n" +
+"   \"infoTop\":[\n" +
+"   {\n" +
+"   \"_id\": \"618d982e407a8dbd65781450\",\n" +
+"   \"index\": 0,\n" +
+"   \"guid\": 
\"4f5a46f2-7271-492a-8347-a8223516715f\",\n" +
+"   \"isActive\": true,\n" +
+"   \"balance\": \"$3,746.11\",\n" +
+"   \"picture\": 
\"http://placehold.it/32x32\",\n"; +
+"   \"age\": 20,\n" +
+"   \"eyeColor\": \"green\",\n" +
+"   \"name\": \"Castaneda Golden\",\n" +
+"   \"gender\": \"male\",\n" +
+"   \"company\": \"AUSTEX\",\n" +
+"   \"email\": 
\"castanedagol...@austex.com\",\n" +
+"   \"phone\": \"+1 (979) 486-3061\",\n" +
+"   \"info\": {\n" +
+"   \"address\": {\n" +
+"   \"street\": \"function\",\n" +
+"   \"town\": \"Urbana\",\n" +
+"   \"state\": \"Delaware\"\n" +
+"   }\n" +
+"   },\n" +
+"   \"address\": \"322 Hancock Street, Nicut, 
Georgia, 5007\",\n" +
+"   \"about\": \"Esse anim minim nostrud 
aliquip. Quis anim ex dolore magna exercitation deserunt minim ad do est non. 
Magna fugiat eiusmod incididunt cupidatat. Anim occaecat nulla cillum culpa 
sunt amet.\\r\\n\",\n" +
+"