walterddr commented on code in PR #10765:
URL: https://github.com/apache/pinot/pull/10765#discussion_r1195307453


##########
pinot-query-runtime/src/test/resources/queries/JsonType.json:
##########
@@ -0,0 +1,41 @@
+{
+  "json_data": {
+    "tables": {
+      "jsonTbl": {
+        "schema": [
+          {"name": "jsonCol", "type": "JSON"},
+          {"name": "stringCol", "type": "STRING"}
+        ],
+        "inputs": [
+          ["{\"key1\":\"val1\",\"key2\":\"val2\"}", "str1"],
+          ["{\"key11\":\"val11\",\"key22\":\"val22\"}", "str22"],
+          ["{\"key111\":\"val111\",\"key222\":{\"key222_a\":\"val222_a\"}}", 
"str33"]
+        ]
+      }
+    },
+    "queries": [
+      {
+        "sql": "SELECT jsonCol FROM {jsonTbl}",
+        "outputs": [
+          ["{\"key1\":\"val1\",\"key2\":\"val2\"}"],
+          ["{\"key11\":\"val11\",\"key22\":\"val22\"}"],
+          ["{\"key111\":\"val111\",\"key222\":{\"key222_a\":\"val222_a\"}}"]
+        ]
+      },
+      {
+        "sql": "SELECT jsonCol, stringCol FROM {jsonTbl}",
+        "outputs": [
+          ["{\"key1\":\"val1\",\"key2\":\"val2\"}", "str1"],
+          ["{\"key11\":\"val11\",\"key22\":\"val22\"}", "str22"],
+          ["{\"key111\":\"val111\",\"key222\":{\"key222_a\":\"val222_a\"}}", 
"str33"]
+        ]
+      },
+      {
+        "sql": "SELECT jsonCol, stringCol FROM {jsonTbl} where 
stringCol='str33'",
+        "outputs": [
+          ["{\"key111\":\"val111\",\"key222\":{\"key222_a\":\"val222_a\"}}", 
"str33"]

Review Comment:
   can you also add 
   - `SELECT stringCol FROM {jsonTbl} where jsonCol = '<escaped json str>'` to 
check the equal comparison?
   - `SELECT ... where jsonCol LIKE '%val222%'` for string function apply to 
json columns?
   - `SELECT * ` 
   



-- 
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: commits-unsubscr...@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to