Return-Path: X-Original-To: apmail-drill-issues-archive@minotaur.apache.org Delivered-To: apmail-drill-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C4408182F3 for ; Tue, 3 Nov 2015 18:53:28 +0000 (UTC) Received: (qmail 3789 invoked by uid 500); 3 Nov 2015 18:53:28 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 3686 invoked by uid 500); 3 Nov 2015 18:53:28 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 3423 invoked by uid 99); 3 Nov 2015 18:53:28 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2015 18:53:28 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id ED97F2C1F72 for ; Tue, 3 Nov 2015 18:53:27 +0000 (UTC) Date: Tue, 3 Nov 2015 18:53:27 +0000 (UTC) From: "Victoria Markman (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-4012) Limit 0 on top of query with kvg/flatten results in assert MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DRILL-4012?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1498= 7854#comment-14987854 ]=20 Victoria Markman commented on DRILL-4012: ----------------------------------------- This works for me in 1.3.0 as well (pre-union type fix): {code} 0: jdbc:drill:schema=3Ddfs> select * from (select id, flatten(kvgen(m)) fro= m `json_kvgenflatten/missing-map.json`) limit 0; +-----+---------+ | id | EXPR$1 | +-----+---------+ +-----+---------+ No rows selected (0.8 seconds) {code} > 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 qui= te 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=3Ddfs> select * from (select id, flatten(kvgen(m)) f= rom `missing-map.json`) limit 0; > Error: SYSTEM ERROR: ClassCastException: Cannot cast org.apache.drill.exe= c.vector.NullableIntVector to org.apache.drill.exec.vector.complex.Repeated= ValueVector > Fragment 0:0 > [Error Id: 046bb4d4-2c54-43ab-9577-cf21542ff8ef on atsqa4-133.qa.lab:3101= 0] (state=3D,code=3D0) > {code} > 'limit 1' works: > {code} > 0: jdbc:drill:schema=3Ddfs> select * from (select id, flatten(kvgen(m)) f= rom `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=3Ddfs> select * from (select id, flatten(kvgen(m)) f= rom `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] IN= FO o.a.d.e.s.schedule.BlockMapBuilder - Failure finding Drillbit running o= n host atsqa4-136.qa.lab. Skipping affinity to that host. > 2015-11-03 15:23:20,944 [29c72e96-c9f6-9fce-ecf1-14eaa145f72b:foreman] IN= FO o.a.d.e.s.schedule.BlockMapBuilder - Failure finding Drillbit running o= n host atsqa4-134.qa.lab. Skipping affinity to that host. > 2015-11-03 15:23:20,944 [29c72e96-c9f6-9fce-ecf1-14eaa145f72b:foreman] IN= FO 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] IN= FO o.a.d.e.s.schedule.BlockMapBuilder - Get block maps: Executed 1 out of = 1 using 1 threads. Earliest start: 1.744000 =CE=BCs, Latest start: 1.744000= =CE=BCs, Average start: 1.744000 =CE=BCs . > 2015-11-03 15:23:20,968 [29c72e96-c9f6-9fce-ecf1-14eaa145f72b:frag:0:0] I= NFO o.a.d.e.w.fragment.FragmentExecutor - 29c72e96-c9f6-9fce-ecf1-14eaa145= f72b:0:0: State change requested AWAITING_ALLOCATION --> RUNNING > 2015-11-03 15:23:20,968 [29c72e96-c9f6-9fce-ecf1-14eaa145f72b:frag:0:0] I= NFO o.a.d.e.w.f.FragmentStatusReporter - 29c72e96-c9f6-9fce-ecf1-14eaa145f= 72b:0:0: State to report: RUNNING > 2015-11-03 15:23:20,974 [29c72e96-c9f6-9fce-ecf1-14eaa145f72b:frag:0:0] W= ARN 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] W= ARN 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] I= NFO o.a.d.e.w.fragment.FragmentExecutor - 29c72e96-c9f6-9fce-ecf1-14eaa145= f72b:0:0: State change requested RUNNING --> FAILED > 2015-11-03 15:23:20,976 [29c72e96-c9f6-9fce-ecf1-14eaa145f72b:frag:0:0] I= NFO o.a.d.e.w.fragment.FragmentExecutor - 29c72e96-c9f6-9fce-ecf1-14eaa145= f72b:0:0: State change requested FAILED --> FINISHED > 2015-11-03 15:23:20,978 [29c72e96-c9f6-9fce-ecf1-14eaa145f72b:frag:0:0] E= RROR 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:3101= 0] > org.apache.drill.common.exceptions.UserException: SYSTEM ERROR: ClassCast= Exception: Cannot cast org.apache.drill.exec.vector.NullableIntVector to or= g.apache.drill.exec.vector.complex.RepeatedValueVector > Fragment 0:0 > [Error Id: c82c7f59-4dad-47ad-8901-5a2261c81279 on atsqa4-133.qa.lab:3101= 0] > 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.sendFinal= State(FragmentExecutor.java:323) [drill-java-exec-1.2.0.jar:1.2.0] > at org.apache.drill.exec.work.fragment.FragmentExecutor.cleanup(F= ragmentExecutor.java:178) [drill-java-exec-1.2.0.jar:1.2.0] > at org.apache.drill.exec.work.fragment.FragmentExecutor.run(Fragm= entExecutor.java:292) [drill-java-exec-1.2.0.jar:1.2.0] > at org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningR= unnable.java:38) [drill-common-1.2.0.jar:1.2.0] > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolEx= ecutor.java:1145) [na:1.7.0_71] > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolE= xecutor.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.exe= c.vector.NullableIntVector to org.apache.drill.exec.vector.complex.Repeated= ValueVector > 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.innerNe= xt(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(Abstract= RecordBatch.java:147) ~[drill-java-exec-1.2.0.jar:1.2.0] > at org.apache.drill.exec.record.AbstractRecordBatch.next(Abstract= RecordBatch.java:104) ~[drill-java-exec-1.2.0.jar:1.2.0] > at org.apache.drill.exec.record.AbstractRecordBatch.next(Abstract= RecordBatch.java:94) ~[drill-java-exec-1.2.0.jar:1.2.0] > at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNe= xt(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(Abstract= RecordBatch.java:147) ~[drill-java-exec-1.2.0.jar:1.2.0] > at org.apache.drill.exec.record.AbstractRecordBatch.next(Abstract= RecordBatch.java:104) ~[drill-java-exec-1.2.0.jar:1.2.0] > at org.apache.drill.exec.record.AbstractRecordBatch.next(Abstract= RecordBatch.java:94) ~[drill-java-exec-1.2.0.jar:1.2.0] > at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNe= xt(AbstractSingleRecordBatch.java:51) ~[drill-java-exec-1.2.0.jar:1.2.0] > at org.apache.drill.exec.physical.impl.limit.LimitRecordBatch.inn= erNext(LimitRecordBatch.java:115) ~[drill-java-exec-1.2.0.jar:1.2.0] > at org.apache.drill.exec.record.AbstractRecordBatch.next(Abstract= RecordBatch.java:147) ~[drill-java-exec-1.2.0.jar:1.2.0] > at org.apache.drill.exec.record.AbstractRecordBatch.next(Abstract= RecordBatch.java:104) ~[drill-java-exec-1.2.0.jar:1.2.0] > at org.apache.drill.exec.record.AbstractRecordBatch.next(Abstract= RecordBatch.java:94) ~[drill-java-exec-1.2.0.jar:1.2.0] > at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNe= xt(AbstractSingleRecordBatch.java:51) ~[drill-java-exec-1.2.0.jar:1.2.0] > at org.apache.drill.exec.physical.impl.svremover.RemovingRecordBa= tch.innerNext(RemovingRecordBatch.java:94) ~[drill-java-exec-1.2.0.jar:1.2.= 0] > at org.apache.drill.exec.record.AbstractRecordBatch.next(Abstract= RecordBatch.java:147) ~[drill-java-exec-1.2.0.jar:1.2.0] > at org.apache.drill.exec.record.AbstractRecordBatch.next(Abstract= RecordBatch.java:104) ~[drill-java-exec-1.2.0.jar:1.2.0] > at org.apache.drill.exec.record.AbstractRecordBatch.next(Abstract= RecordBatch.java:94) ~[drill-java-exec-1.2.0.jar:1.2.0] > at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNe= xt(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(Abstract= RecordBatch.java:147) ~[drill-java-exec-1.2.0.jar:1.2.0] > at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRoot= Exec.java:83) ~[drill-java-exec-1.2.0.jar:1.2.0] > at org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.i= nnerNext(ScreenCreator.java:80) ~[drill-java-exec-1.2.0.jar:1.2.0] > at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRoot= Exec.java:73) ~[drill-java-exec-1.2.0.jar:1.2.0] > at org.apache.drill.exec.work.fragment.FragmentExecutor$1.run(Fra= gmentExecutor.java:258) ~[drill-java-exec-1.2.0.jar:1.2.0] > at org.apache.drill.exec.work.fragment.FragmentExecutor$1.run(Fra= gmentExecutor.java:252) ~[drill-java-exec-1.2.0.jar:1.2.0] > at java.security.AccessController.doPrivileged(Native Method) ~[n= a: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(UserGroup= Information.java:1566) ~[hadoop-common-2.5.1-mapr-1503.jar:na] > at org.apache.drill.exec.work.fragment.FragmentExecutor.run(Fragm= entExecutor.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.F= oreman - 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.ControlMessageHan= dler - Dropping request to cancel fragment. 29c72e96-c9f6-9fce-ecf1-14eaa14= 5f72b:0:0 does not exist. > {code} > I'm not sure about priority of this issue, 'limit 0' is generated by tool= s usually ... Leaving it as "Major" for now. -- This message was sent by Atlassian JIRA (v6.3.4#6332)