You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Deneche A. Hakim (JIRA)" <ji...@apache.org> on 2015/11/03 19:12:27 UTC

[jira] [Commented] (DRILL-4012) Limit 0 on top of query with kvg/flatten results in assert

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

Deneche A. Hakim commented on DRILL-4012:
-----------------------------------------

I wasn't able to reproduce the error on the latest master:

{noformat}
0: jdbc:drill:zk=local> select * from (select id, flatten(kvgen(m)) from `missing-map.json`) limit 0;
+-----+---------+
| id  | EXPR$1  |
+-----+---------+
+-----+---------+
No rows selected (0.728 seconds)
0: jdbc:drill:zk=local> select * from sys.version;
+-----------------+-------------------------------------------+---------------------------------------------+----------------------------+--------------+----------------------------+
|     version     |                 commit_id                 |               commit_message                |        commit_time         | build_email  |         build_time         |
+-----------------+-------------------------------------------+---------------------------------------------+----------------------------+--------------+----------------------------+
| 1.3.0-SNAPSHOT  | bb69f2202ed6115b39bd8681e59c6ff6091e9b9e  | DRILL-3229: Miscellaneous Union-type fixes  | 03.11.2015 @ 00:40:32 PST  | Unknown      | 03.11.2015 @ 09:59:45 PST  |
+-----------------+-------------------------------------------+---------------------------------------------+----------------------------+--------------+----------------------------+
1 row selected (0.297 seconds)
0: jdbc:drill:zk=local> 
{noformat}

> Limit 0 on top of query with kvg/flatten results in assert
> ----------------------------------------------------------
>
>                 Key: DRILL-4012
>                 URL: https://issues.apache.org/jira/browse/DRILL-4012
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Data Types
>            Reporter: Victoria Markman
>
> I've found couple of bugs that are very similar, but none of them are quite the same:
> missing-map.json
> {code}
> {
>     "id": 1,
>     "m": {"a":1,"b":2}
> }
> {
>     "id": 2
> }
> {
>     "id": 3,
>     "m": {"c":3,"d":4}
> }
> {code}
> 'limit 0' results in an assert:
> {code}
> 0: jdbc:drill:schema=dfs> select * from (select id, flatten(kvgen(m)) from `missing-map.json`) limit 0;
> Error: SYSTEM ERROR: ClassCastException: Cannot cast org.apache.drill.exec.vector.NullableIntVector to org.apache.drill.exec.vector.complex.RepeatedValueVector
> Fragment 0:0
> [Error Id: 046bb4d4-2c54-43ab-9577-cf21542ff8ef on atsqa4-133.qa.lab:31010] (state=,code=0)
> {code}
> 'limit 1' works:
> {code}
> 0: jdbc:drill:schema=dfs> select * from (select id, flatten(kvgen(m)) from `missing-map.json`) limit 1;
> +-----+------------------------+
> | id  |         EXPR$1         |
> +-----+------------------------+
> | 1   | {"key":"a","value":1}  |
> +-----+------------------------+
> 1 row selected (0.247 seconds)
> {code}
> No limit, just in subquery: works
> {code}
> 0: jdbc:drill:schema=dfs> select * from (select id, flatten(kvgen(m)) from `json_kvgenflatten/missing-map.json`);
> +-----+------------------------+
> | id  |         EXPR$1         |
> +-----+------------------------+
> | 1   | {"key":"a","value":1}  |
> | 1   | {"key":"b","value":2}  |
> | 3   | {"key":"c","value":3}  |
> | 3   | {"key":"d","value":4}  |
> +-----+------------------------+
> 4 rows selected (0.247 seconds)
> {code}
> drillbit.log
> {code}
> 2015-11-03 15:23:20,943 [29c72e96-c9f6-9fce-ecf1-14eaa145f72b:foreman] INFO  o.a.d.e.s.schedule.BlockMapBuilder - Failure finding Drillbit running on host atsqa4-136.qa.lab.  Skipping affinity to that host.
> 2015-11-03 15:23:20,944 [29c72e96-c9f6-9fce-ecf1-14eaa145f72b:foreman] INFO  o.a.d.e.s.schedule.BlockMapBuilder - Failure finding Drillbit running on host atsqa4-134.qa.lab.  Skipping affinity to that host.
> 2015-11-03 15:23:20,944 [29c72e96-c9f6-9fce-ecf1-14eaa145f72b:foreman] INFO  o.a.d.e.s.schedule.BlockMapBuilder - Get block maps: Executed 1 out of 1 using 1 threads. Time: 1ms total, 1.530719ms avg, 1ms max.
> 2015-11-03 15:23:20,944 [29c72e96-c9f6-9fce-ecf1-14eaa145f72b:foreman] INFO  o.a.d.e.s.schedule.BlockMapBuilder - Get block maps: Executed 1 out of 1 using 1 threads. Earliest start: 1.744000 μs, Latest start: 1.744000 μs, Average start: 1.744000 μs .
> 2015-11-03 15:23:20,968 [29c72e96-c9f6-9fce-ecf1-14eaa145f72b:frag:0:0] INFO  o.a.d.e.w.fragment.FragmentExecutor - 29c72e96-c9f6-9fce-ecf1-14eaa145f72b:0:0: State change requested AWAITING_ALLOCATION --> RUNNING
> 2015-11-03 15:23:20,968 [29c72e96-c9f6-9fce-ecf1-14eaa145f72b:frag:0:0] INFO  o.a.d.e.w.f.FragmentStatusReporter - 29c72e96-c9f6-9fce-ecf1-14eaa145f72b:0:0: State to report: RUNNING
> 2015-11-03 15:23:20,974 [29c72e96-c9f6-9fce-ecf1-14eaa145f72b:frag:0:0] WARN  o.a.d.e.e.ExpressionTreeMaterializer - Unable to find value vector of path `EXPR$3`, returning null instance.
> 2015-11-03 15:23:20,975 [29c72e96-c9f6-9fce-ecf1-14eaa145f72b:frag:0:0] WARN  o.a.d.e.e.ExpressionTreeMaterializer - Unable to find value vector of path `EXPR$3`, returning null instance.
> 2015-11-03 15:23:20,976 [29c72e96-c9f6-9fce-ecf1-14eaa145f72b:frag:0:0] INFO  o.a.d.e.w.fragment.FragmentExecutor - 29c72e96-c9f6-9fce-ecf1-14eaa145f72b:0:0: State change requested RUNNING --> FAILED
> 2015-11-03 15:23:20,976 [29c72e96-c9f6-9fce-ecf1-14eaa145f72b:frag:0:0] INFO  o.a.d.e.w.fragment.FragmentExecutor - 29c72e96-c9f6-9fce-ecf1-14eaa145f72b:0:0: State change requested FAILED --> FINISHED
> 2015-11-03 15:23:20,978 [29c72e96-c9f6-9fce-ecf1-14eaa145f72b:frag:0:0] ERROR o.a.d.e.w.fragment.FragmentExecutor - SYSTEM ERROR: ClassCastException: Cannot cast org.apache.drill.exec.vector.NullableIntVector to org.apache.drill.exec.vector.complex.RepeatedValueVector
> Fragment 0:0
> [Error Id: c82c7f59-4dad-47ad-8901-5a2261c81279 on atsqa4-133.qa.lab:31010]
> org.apache.drill.common.exceptions.UserException: SYSTEM ERROR: ClassCastException: Cannot cast org.apache.drill.exec.vector.NullableIntVector to org.apache.drill.exec.vector.complex.RepeatedValueVector
> Fragment 0:0
> [Error Id: c82c7f59-4dad-47ad-8901-5a2261c81279 on atsqa4-133.qa.lab:31010]
>         at org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:534) ~[drill-common-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.work.fragment.FragmentExecutor.sendFinalState(FragmentExecutor.java:323) [drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.work.fragment.FragmentExecutor.cleanup(FragmentExecutor.java:178) [drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:292) [drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38) [drill-common-1.2.0.jar:1.2.0]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_71]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_71]
>         at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71]
> Caused by: java.lang.ClassCastException: Cannot cast org.apache.drill.exec.vector.NullableIntVector to org.apache.drill.exec.vector.complex.RepeatedValueVector
>         at java.lang.Class.cast(Class.java:3176) ~[na:1.7.0_71]
>         at org.apache.drill.exec.physical.impl.flatten.FlattenRecordBatch.getFlattenFieldTransferPair(FlattenRecordBatch.java:270) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.physical.impl.flatten.FlattenRecordBatch.setupNewSchema(FlattenRecordBatch.java:292) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:78) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.physical.impl.flatten.FlattenRecordBatch.innerNext(FlattenRecordBatch.java:120) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:147) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:104) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:94) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:129) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:147) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:104) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:94) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.physical.impl.limit.LimitRecordBatch.innerNext(LimitRecordBatch.java:115) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:147) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:104) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:94) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.physical.impl.svremover.RemovingRecordBatch.innerNext(RemovingRecordBatch.java:94) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:147) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:104) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:94) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:129) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:147) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:83) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext(ScreenCreator.java:80) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:73) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.work.fragment.FragmentExecutor$1.run(FragmentExecutor.java:258) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.work.fragment.FragmentExecutor$1.run(FragmentExecutor.java:252) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_71]
>         at javax.security.auth.Subject.doAs(Subject.java:415) ~[na:1.7.0_71]
>         at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1566) ~[hadoop-common-2.5.1-mapr-1503.jar:na]
>         at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:252) [drill-java-exec-1.2.0.jar:1.2.0]
>         ... 4 common frames omitted
> 2015-11-03 15:23:20,998 [BitServer-4] WARN  o.a.drill.exec.work.foreman.Foreman - Dropping request to move to COMPLETED state as query is already at FAILED state (which is terminal).
> 2015-11-03 15:23:20,998 [BitServer-4] WARN  o.a.d.e.w.b.ControlMessageHandler - Dropping request to cancel fragment. 29c72e96-c9f6-9fce-ecf1-14eaa145f72b:0:0 does not exist.
> {code}
> I'm not sure about priority of this issue, 'limit 0' is generated by tools usually ... Leaving  it as "Major" for now.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)