You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Rahul Challapalli (JIRA)" <ji...@apache.org> on 2017/04/03 18:02:42 UTC

[jira] [Commented] (DRILL-3562) Query fails when using flatten on JSON data where some documents have an empty array

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

Rahul Challapalli commented on DRILL-3562:
------------------------------------------

[~arina] & [~amansinha100] I tested the case reported in this jira and also few other related cases. No issues found. However I observed that DRILL-5399 is happening more frequently in 1.10.0 compared to 1.9.0. Can this fix be related to that issue in one way or the other? If you think there is no relation, we can close this issue. 

> Query fails when using flatten on JSON data where some documents have an empty array
> ------------------------------------------------------------------------------------
>
>                 Key: DRILL-3562
>                 URL: https://issues.apache.org/jira/browse/DRILL-3562
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - JSON
>    Affects Versions: 1.1.0
>            Reporter: Philip Deegan
>            Assignee: Serhii Harnyk
>             Fix For: 1.10.0
>
>
> Drill query fails when using flatten when some records contain an empty array 
> {noformat}
> SELECT COUNT(*) FROM (SELECT FLATTEN(t.a.b.c) AS c FROM dfs.`flat.json` t) flat WHERE flat.c.d.e = 'f' limit 1;
> {noformat}
> Succeeds on 
> { "a": { "b": { "c": [  { "d": {  "e": "f" } } ] } } }
> Fails on
> { "a": { "b": { "c": [] } } }
> Error
> {noformat}
> Error: SYSTEM ERROR: ClassCastException: Cannot cast org.apache.drill.exec.vector.NullableIntVector to org.apache.drill.exec.vector.complex.RepeatedValueVector
> {noformat}
> Is it possible to ignore the empty arrays, or do they need to be populated with dummy data?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)