siddharthteotia commented on a change in pull request #6951:
URL: https://github.com/apache/incubator-pinot/pull/6951#discussion_r637213879



##########
File path: 
pinot-core/src/test/java/org/apache/pinot/queries/JsonDataTypeQueriesTest.java
##########
@@ -123,6 +118,14 @@ public void setUp()
         "{\"name\": {\"first\": \"goofy\", \"last\": \"dwag\"}, \"id\": 171, 
\"data\": [\"k\", \"b\", \"c\", \"d\"]}"));
     records.add(createRecord(9, "ludwik von drake",
         "{\"name\": {\"first\": \"ludwik\", \"last\": \"von drake\"}, \"id\": 
181, \"data\": [\"l\", \"b\", \"c\", \"d\"]}"));
+    records.add(createRecord(10, "nested array",
+        
"{\"name\":{\"first\":\"nested\",\"last\":\"array\"},\"id\":111,\"data\":[{\"e\":[{\"x\":[{\"i1\":1,\"i2\":2}]},{\"y\":[{\"i1\":1,\"i2\":2}]},{\"z\":[{\"i1\":1,\"i2\":2}]}]},{\"b\":[{\"x\":[{\"i1\":1,\"i2\":2}]},{\"y\":[{\"i1\":1,\"i2\":2}]},{\"z\":[{\"i1\":10,\"i2\":20}]}]}]}"));

Review comment:
       (nit)
   
   If I were to write these test cases, I would add json formatted data 
structure of the record before each test. It will help with 2 things
   
   - When reading the test data and corresponding test case, it really makes it 
more readable to understand the functionality and what is being test
   - Tomorrow if someone has to debug this test, pretty printed json data will 
help with debugging. Single one line json string isn't super helpful and will 
only make it worse as more complicated test cases are added.
   
   Will make the code verbose, but will be helpful imo




-- 
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.

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