[ https://issues.apache.org/jira/browse/DRILL-2590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15080770#comment-15080770 ]
Sean Hsuan-Yi Chu commented on DRILL-2590: ------------------------------------------ The behavior is correct. Drill follows a pipeline model. It can not see the schema change until there is one. > Union all query returns results and Exception > --------------------------------------------- > > Key: DRILL-2590 > URL: https://issues.apache.org/jira/browse/DRILL-2590 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization > Affects Versions: 0.9.0 > Environment: {code} > 0: jdbc:drill:> select * from sys.version; > +------------+----------------+-------------+-------------+------------+ > | commit_id | commit_message | commit_time | build_email | build_time | > +------------+----------------+-------------+-------------+------------+ > | 9d92b8e319f2d46e8659d903d355450e15946533 | DRILL-2580: Exit early from > HashJoinBatch if build side is empty | 26.03.2015 @ 16:13:53 EDT | Unknown > | 26.03.2015 @ 16:53:21 EDT | > +------------+----------------+-------------+-------------+------------+ > 1 row selected (0.109 seconds) > {code} > Reporter: Khurram Faraaz > Assignee: Sean Hsuan-Yi Chu > Fix For: 0.9.0 > > Attachments: DRILL-2590.1.patch > > > Union all over JSON data file (int data and boolean data) results in > Exception. Query returns some results and also returns Exception. > {code} > 0: jdbc:drill:> select key from `intData.json` union all select key from > `booldata.json`; > Query failed: Query stopped., Failure while trying to materialize incoming > schema. Errors: > > Error in expression at index -1. Error: Missing function implementation: > [castBIGINT(BIT-OPTIONAL)]. Full expression: --UNKNOWN EXPRESSION--.. [ > ebb1ddb9-789e-4c69-ba6f-ca44cf67d67c on centos-04.qa.lab:31010 ] > +------------+ > | key | > +------------+ > | -291344610 | > | 10331709374297784 | > | -1184860307 | > | 67862516816374816 | > | -1921037123 | > | 11968068521452206 | > | 1023332588 | > | 89090303541569808 | > | 1780205110 | > | 5730049513235057 | > | -127065493 | > | 45860081566575456 | > | -299030658 | > | 869008363115253 | > | -2108348330 | > | 78779878523955616 | > | -709349595 | > | 77042673985263184 | > ... > | 341564214 | > | 18953296325892812 | > +------------+ > | key | > +------------+ > | 0 | > java.lang.RuntimeException: java.sql.SQLException: Failure while executing > query. > at sqlline.SqlLine$IncrementalRows.hasNext(SqlLine.java:2514) > at sqlline.SqlLine$TableOutputFormat.print(SqlLine.java:2148) > at sqlline.SqlLine.print(SqlLine.java:1809) > at sqlline.SqlLine$Commands.execute(SqlLine.java:3766) > at sqlline.SqlLine$Commands.sql(SqlLine.java:3663) > at sqlline.SqlLine.dispatch(SqlLine.java:889) > at sqlline.SqlLine.begin(SqlLine.java:763) > at sqlline.SqlLine.start(SqlLine.java:498) > at sqlline.SqlLine.main(SqlLine.java:460) > {code} > {code} > 2015-03-27 00:02:26,715 [2aeb61ed-1770-79c8-e0a2-b94f408e7b5b:frag:0:0] ERROR > o.a.drill.exec.work.foreman.Foreman - Error > e47f6df7-678f-4f1a-b144-2c120b331e95: RemoteRpcException: Failure while > running fragment., Failure while trying to materialize incoming schema. > Errors: > Error in expression at index -1. Error: Missing function implementation: > [castBIGINT(BIT-OPTIONAL)]. Full expression: --UNKNOWN EXPRESSION--.. [ > 3f0a4e99-fe80-4187-a17e-32aa7914285c on centos-04.qa.lab:31010 ] > [ 3f0a4e99-fe80-4187-a17e-32aa7914285c on centos-04.qa.lab:31010 ] > org.apache.drill.exec.rpc.RemoteRpcException: Failure while running > fragment., Failure while trying to materialize incoming schema. Errors: > Error in expression at index -1. Error: Missing function implementation: > [castBIGINT(BIT-OPTIONAL)]. Full expression: --UNKNOWN EXPRESSION--.. [ > 3f0a4e99-fe80-4187-a17e-32aa7914285c on centos-04.qa.lab:31010 ] > [ 3f0a4e99-fe80-4187-a17e-32aa7914285c on centos-04.qa.lab:31010 ] > at > org.apache.drill.exec.work.foreman.QueryManager.statusUpdate(QueryManager.java:163) > [drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > org.apache.drill.exec.work.foreman.QueryManager$RootStatusReporter.statusChange(QueryManager.java:281) > [drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > org.apache.drill.exec.work.fragment.AbstractStatusReporter.fail(AbstractStatusReporter.java:114) > [drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > org.apache.drill.exec.work.fragment.AbstractStatusReporter.fail(AbstractStatusReporter.java:110) > [drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > org.apache.drill.exec.work.fragment.FragmentExecutor.internalFail(FragmentExecutor.java:230) > [drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:165) > [drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38) > [drill-common-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > [na:1.7.0_75] > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > [na:1.7.0_75] > at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75] > 2015-03-27 00:02:26,716 [2aeb61ed-1770-79c8-e0a2-b94f408e7b5b:frag:0:0] WARN > o.a.d.e.w.fragment.FragmentExecutor - Error while initializing or executing > fragment > java.lang.RuntimeException: Error closing fragment context. > at > org.apache.drill.exec.work.fragment.FragmentExecutor.closeOutResources(FragmentExecutor.java:224) > ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:166) > ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38) > [drill-common-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > [na:1.7.0_75] > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > [na:1.7.0_75] > at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75] > Caused by: org.apache.drill.exec.exception.SchemaChangeException: Failure > while trying to materialize incoming schema. Errors: > Error in expression at index -1. Error: Missing function implementation: > [castBIGINT(BIT-OPTIONAL)]. Full expression: --UNKNOWN EXPRESSION--.. > at > org.apache.drill.exec.physical.impl.union.UnionAllRecordBatch.doWork(UnionAllRecordBatch.java:229) > ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > org.apache.drill.exec.physical.impl.union.UnionAllRecordBatch.innerNext(UnionAllRecordBatch.java:113) > ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:142) > ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118) > ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:68) > ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext(ScreenCreator.java:96) > ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:58) > ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:163) > ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > ... 4 common frames omitted > 2015-03-27 00:02:26,717 [2aeb61ed-1770-79c8-e0a2-b94f408e7b5b:frag:0:0] ERROR > o.a.drill.exec.ops.FragmentContext - Fragment Context received failure -- > Fragment: 0:0 > java.lang.RuntimeException: Error closing fragment context. > at > org.apache.drill.exec.work.fragment.FragmentExecutor.closeOutResources(FragmentExecutor.java:224) > ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:166) > ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38) > [drill-common-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > [na:1.7.0_75] > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > [na:1.7.0_75] > at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75] > Caused by: org.apache.drill.exec.exception.SchemaChangeException: Failure > while trying to materialize incoming schema. Errors: > Error in expression at index -1. Error: Missing function implementation: > [castBIGINT(BIT-OPTIONAL)]. Full expression: --UNKNOWN EXPRESSION--.. > at > org.apache.drill.exec.physical.impl.union.UnionAllRecordBatch.doWork(UnionAllRecordBatch.java:229) > ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > org.apache.drill.exec.physical.impl.union.UnionAllRecordBatch.innerNext(UnionAllRecordBatch.java:113) > ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:142) > ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118) > ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:68) > ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext(ScreenCreator.java:96) > ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:58) > ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at > org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:163) > ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > ... 4 common frames omitted > {code} > data sample from the two input JSON data files > intData.json > {code} > {"key":52459253098448904} > {"key":1116675951} > {"key":25214214380325172} > {"key":-131805793} > {"key":71488628536730208} > {"key":543347537} > {"key":6101249082635766} > {"key":2054005230} > {"key":53948664811212536} > {"key":-1508399828} > {"key":49628266552741376} > {"key":-256956495} > {"key":6142535567081493} > {"key":312950200} > {code} > booldata.json > {code} > {"key":true} > {"key":false} > {"key":true} > {"key":true} > {"key":false} > {"key":false} > {"key":true} > {"key":false} > {"key":true} > {"key":true} > {"key":true} > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)