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

Paul Rogers commented on DRILL-5947:
------------------------------------

Will fix this in conjunction with the revision to the JSON reader for the batch 
size control project.

> COUNT(<column-name>) on empty JSON results in schema change error
> -----------------------------------------------------------------
>
>                 Key: DRILL-5947
>                 URL: https://issues.apache.org/jira/browse/DRILL-5947
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Flow
>    Affects Versions: 1.11.0
>            Reporter: Khurram Faraaz
>            Assignee: Paul Rogers
>
> Count over a field, from a non-empty and another empty JSON file results in 
> schema change error, "Streaming aggregate does not support schema changes"
> {noformat}
> OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support 
> was removed in 8.0
> apache drill 1.11.0-mapr 
> "drill baby drill"
> 0: jdbc:drill:schema=dfs.tmp> select count(id) from `diff_types`;
> Error: UNSUPPORTED_OPERATION ERROR: Streaming aggregate does not support 
> schema changes
> Prior schema : 
> BatchSchema [fields=[id(BIGINT:OPTIONAL)], selectionVector=NONE]
> New schema : 
> BatchSchema [fields=[id(INT:OPTIONAL)], selectionVector=NONE]
> Fragment 0:0
> [Error Id: c1c77a0e-c7cf-494e-b8d2-ef2cc7e816e0 on centos-01.qa.lab:31010] 
> (state=,code=0)
> 0: jdbc:drill:schema=dfs.tmp> select id from `dif`Display all 872 
> possibilities? (y or n)
> 0: jdbc:drill:schema=dfs.tmp> select id from `diff_types/m1.json`;
> +-------+
> |  id   |
> +-------+
> | 1234  |
> +-------+
> 1 row selected (0.157 seconds)
> 0: jdbc:drill:schema=dfs.tmp> select id from `diff_types/m2.json`;
> +-------+
> |  id   |
> +-------+
> | null  |
> +-------+
> 1 row selected (0.169 seconds)
> 0: jdbc:drill:schema=dfs.tmp> select * from `diff_types`;
> +-------+
> |  id   |
> +-------+
> | 1234  |
> | null  |
> +-------+
> 2 rows selected (0.209 seconds)
> 0: jdbc:drill:schema=dfs.tmp> select count(*) from `diff_types`;
> +---------+
> | EXPR$0  |
> +---------+
> | 2       |
> +---------+
> 1 row selected (0.208 seconds)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to