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

ASF GitHub Bot commented on DRILL-7362:
---------------------------------------

vvysotskyi commented on pull request #1849: DRILL-7362: COUNT(*) on JSON with 
outer list results in JsonParse error
URL: https://github.com/apache/drill/pull/1849#discussion_r320397567
 
 

 ##########
 File path: 
exec/java-exec/src/test/java/org/apache/drill/exec/store/json/TestJsonRecordReader.java
 ##########
 @@ -261,4 +261,18 @@ public void 
testNotCountingQueryNotSkippingInvalidJSONRecords()
     }
     throw new Exception("testNotCountingQueryNotSkippingInvalidJSONRecords");
   }
+
+  @Test
+  @Category(UnlikelyTest.class)
+  // See DRILL-7362
+  /* Test for CountingJSONReader */
+  public void testContainingArrayCount() throws Exception {
+    testBuilder()
+      .sqlQuery("select count(*) as cnt from cp.`store/json/listdoc.json`")
+      .unOrdered()
+      .baselineColumns("cnt")
+      .baselineValues(2L)
+    .build()
 
 Review comment:
   Please fix formatting and use `.go()` instead of `.build().run();`.
 
----------------------------------------------------------------
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


> COUNT(*) on JSON with outer list results in JsonParse error
> -----------------------------------------------------------
>
>                 Key: DRILL-7362
>                 URL: https://issues.apache.org/jira/browse/DRILL-7362
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.16.0
>            Reporter: Oleg Zinoviev
>            Assignee: Oleg Zinoviev
>            Priority: Major
>             Fix For: 1.17.0
>
>
> Count from a JSON file with a outer array results in JsonParseException: 
> Cannot read from the middle of a record. Current token was START_ARRAY.
> P.S. A simple select from such file works normally.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to