abhioncbr commented on code in PR #10765:
URL: https://github.com/apache/pinot/pull/10765#discussion_r1195857950
##########
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:
I added more tests.
I skipped the `select * ` because I am not sure how to skip the `ts` column
from the output. The other one selecting both `json` and `string` columns is
already there.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]