[ https://issues.apache.org/jira/browse/ASTERIXDB-1653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15508127#comment-15508127 ]
Heri Ramampiaro commented on ASTERIXDB-1653: -------------------------------------------- What I meant was a better exception handling would be helpful. > NullPointerException in executing AQL > ------------------------------------- > > Key: ASTERIXDB-1653 > URL: https://issues.apache.org/jira/browse/ASTERIXDB-1653 > Project: Apache AsterixDB > Issue Type: Bug > Components: AsterixDB, Functions - AQL > Reporter: Heri Ramampiaro > Priority: Minor > > If one tries to run an UDF having an open type as input, but still specify > the field which is open, one gets > "Internal error. Please check instance logs for further details. > [NullPointerException]". > For example: > create type FeatureType as open { > id: string, > outlook: string, > temperature: double, > humidity: double, > windy:string > } > works fine, but > create type FeatureType as open { > id: string, > outlook: string, > temperature: double, > humidity: double, > windy:string, > play:string? > } > would give the exception when using FeatureType as an input type to a UDF. > Inside the UDF, for the first case one should add the field "play" with its > value, while for the second case one should set the value of the field > "play". However, the opposite would give the above exception, which does not > seem to reflect the real problem. > The log gives the following: > "org.apache.hyracks.api.exceptions.HyracksDataException: > org.apache.hyracks.api.exceptions.HyracksDataException: null > at > org.apache.hyracks.api.rewriter.runtime.SuperActivityOperatorNodePushable.runInParallel(SuperActivityOperatorNodePushable.java:218) > at > org.apache.hyracks.api.rewriter.runtime.SuperActivityOperatorNodePushable.initialize(SuperActivityOperatorNodePushable.java:83) > at org.apache.hyracks.control.nc.Task.run(Task.java:263) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.util.concurrent.ExecutionException: > org.apache.hyracks.api.exceptions.HyracksDataException: null > at java.util.concurrent.FutureTask.report(FutureTask.java:122) > at java.util.concurrent.FutureTask.get(FutureTask.java:192) > at > org.apache.hyracks.api.rewriter.runtime.SuperActivityOperatorNodePushable.runInParallel(SuperActivityOperatorNodePushable.java:212) > ... 5 more > Caused by: org.apache.hyracks.api.exceptions.HyracksDataException: null > at > org.apache.hyracks.storage.am.common.dataflow.IndexSearchOperatorNodePushable.close(IndexSearchOperatorNodePushable.java:233) > at > org.apache.hyracks.algebricks.runtime.operators.std.EmptyTupleSourceRuntimeFactory$1.close(EmptyTupleSourceRuntimeFactory.java:60) > at > org.apache.hyracks.algebricks.runtime.operators.meta.AlgebricksMetaOperatorDescriptor$1.initialize(AlgebricksMetaOperatorDescriptor.java:116) > at > org.apache.hyracks.api.rewriter.runtime.SuperActivityOperatorNodePushable.lambda$initialize$0(SuperActivityOperatorNodePushable.java:83) > at > org.apache.hyracks.api.rewriter.runtime.SuperActivityOperatorNodePushable$$Lambda$7/306984200.runAction(Unknown > Source) > at > org.apache.hyracks.api.rewriter.runtime.SuperActivityOperatorNodePushable$1.call(SuperActivityOperatorNodePushable.java:205) > at > org.apache.hyracks.api.rewriter.runtime.SuperActivityOperatorNodePushable$1.call(SuperActivityOperatorNodePushable.java:202) > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > ... 3 more > Caused by: java.lang.NullPointerException > at > org.apache.hyracks.algebricks.runtime.operators.base.AbstractOneInputOneOutputOneFramePushRuntime.flushAndReset(AbstractOneInputOneOutputOneFramePushRuntime.java:62) > at > org.apache.hyracks.algebricks.runtime.operators.base.AbstractOneInputOneOutputOneFramePushRuntime.flushIfNotFailed(AbstractOneInputOneOutputOneFramePushRuntime.java:69) > at > org.apache.hyracks.algebricks.runtime.operators.base.AbstractOneInputOneOutputOneFramePushRuntime.close(AbstractOneInputOneOutputOneFramePushRuntime.java:55) > at > org.apache.hyracks.algebricks.runtime.operators.meta.AlgebricksMetaOperatorDescriptor$2.close(AlgebricksMetaOperatorDescriptor.java:153) > at > org.apache.hyracks.storage.am.common.dataflow.IndexSearchOperatorNodePushable.close(IndexSearchOperatorNodePushable.java:230) > ... 10 more" -- This message was sent by Atlassian JIRA (v6.3.4#6332)