Neeraja created DRILL-1589: ------------------------------ Summary: count(*) on json fails with exception Key: DRILL-1589 URL: https://issues.apache.org/jira/browse/DRILL-1589 Project: Apache Drill Issue Type: Bug Reporter: Neeraja Priority: Critical
A simple count(*) query on JSON fails while count(column) works fine. Below are the queries. 0: jdbc:drill:zk=local> select count(*) from dfs.`/users/nrentachintala/Downloads/yelp_dataset_challenge_academic_dataset/yelp_academic_dataset_business.json` b . . . . . . . . . . . > ; Query failed: Screen received stop request sent. You tried to start when you are using a ValueWriter of type NullableVarCharWriterImpl. [23966ff6-7ea9-4c6d-a3c6-0a024cedc972] Error: exception while executing query: Failure while trying to get next result batch. (state=,code=0) ------------ 0: jdbc:drill:zk=local> select count(business_id) from dfs.`/users/nrentachintala/Downloads/yelp_dataset_challenge_academic_dataset/yelp_academic_dataset_business.json` b; +------------+ | EXPR$0 | +------------+ | 42153 | +------------+ Explain plans are below. 0: jdbc:drill:zk=local> explain plan for select count(*) from dfs.`/users/nrentachintala/Downloads/yelp_dataset_challenge_academic_dataset/yelp_academic_dataset_business.json` b; +------------+------------+ | text | json | +------------+------------+ | 00-00 Screen 00-01 StreamAgg(group=[{}], EXPR$0=[COUNT()]) 00-02 Project($f0=[0]) 00-03 Scan(groupscan=[EasyGroupScan [selectionRoot=/users/nrentachintal | +------------+------------+ 1 row selected (0.139 seconds) 0: jdbc:drill:zk=local> explain plan for select count(business_Id) from dfs.`/users/nrentachintala/Downloads/yelp_dataset_challenge_academic_dataset/yelp_academic_dataset_business.json` b; +------------+------------+ | text | json | +------------+------------+ | 00-00 Screen 00-01 StreamAgg(group=[{}], EXPR$0=[COUNT($0)]) 00-02 Scan(groupscan=[EasyGroupScan [selectionRoot=/users/nrentachintala/Downloads/yelp_dataset_chall | +------------+------------+ -- This message was sent by Atlassian JIRA (v6.3.4#6332)