The following query produces an error in buildBtreeRuntime:
drop dataverse emergencyTest if exists;
create dataverse emergencyTest;
use dataverse emergencyTest;
create type CHPReport as {
"rid":uuid,
"etype":string,
"timestamp":datetime,
"epicenter":point,
"radius":double,
"message":string
}
create type userLocation as {
"id":uuid,
"user-id":int64,
"timestamp":datetime,
"location":point
}
create type tornadoShelter as {
"tsid":uuid,
"name":string,
"location":point
}
create dataset tornadoShelters(tornadoShelter)
primary key tsid autogenerated;
create dataset userLocations(userLocation)
primary key id autogenerated;
create dataset CHPReports(CHPReport)
primary key rid autogenerated;
create function NearbySheltersDuringTornadoDanger($userid) {
for $emergency in dataset CHPReports
let $dangerzone := create-circle($emergency.epicenter,$emergency.radius)
let $timewindow := day-time-duration("PT1M")
where (some $user in dataset userLocations satisfies
$user.user-id = $userid
)
return {
"shelter locations":for $shelter in dataset tornadoShelters where
spatial-intersect( $dangerzone,$shelter.location) return $shelter.location}
};
create type sub as closed{
"id":int,
"param0":int64
}
create dataset NearbySheltersDuringTornadoDangerChannelSubscriptions(sub)
primary key id;
for $sub in dataset NearbySheltersDuringTornadoDangerChannelSubscriptions
for $result in NearbySheltersDuringTornadoDanger($sub.param0)
return {
"result":$result};
Here is the error:
SEVERE: null
java.lang.NullPointerException
at edu.uci.ics.asterix.metadata.declared.AqlMetadataProvider.buildBtreeRuntime(AqlMetadataProvider.java:682)
at edu.uci.ics.asterix.metadata.declared.AqlMetadataProvider.buildInternalDatasetScan(AqlMetadataProvider.java:425)
at edu.uci.ics.asterix.metadata.declared.AqlMetadataProvider.getScannerRuntime(AqlMetadataProvider.java:328)
at edu.uci.ics.hyracks.algebricks.core.algebra.operators.physical.DataSourceScanPOperator.contributeRuntimeOperator(DataSourceScanPOperator.java:83)
at edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator.contributeRuntimeOperator(AbstractLogicalOperator.java:158)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:94)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:81)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:81)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:81)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:81)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:81)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:81)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:81)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:81)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:81)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:81)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:81)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:81)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:81)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:81)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:81)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:81)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:81)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compilePlan(PlanCompiler.java:57)
at edu.uci.ics.hyracks.algebricks.core.algebra.operators.physical.AbstractPhysicalOperator.buildPipelineWithProjection(AbstractPhysicalOperator.java:127)
at edu.uci.ics.hyracks.algebricks.core.algebra.operators.physical.AbstractPhysicalOperator.compileSubplans(AbstractPhysicalOperator.java:117)
at edu.uci.ics.hyracks.algebricks.core.algebra.operators.physical.SubplanPOperator.contributeRuntimeOperator(SubplanPOperator.java:89)
at edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator.contributeRuntimeOperator(AbstractLogicalOperator.java:158)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:94)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:81)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:81)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:81)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:81)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:81)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:81)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:81)
at edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compilePlan(PlanCompiler.java:57)
at edu.uci.ics.hyracks.algebricks.compiler.api.HeuristicCompilerFactoryBuilder$1$1.createJob(HeuristicCompilerFactoryBuilder.java:100)
at edu.uci.ics.asterix.api.common.APIFramework.compileQuery(APIFramework.java:345)
at edu.uci.ics.asterix.aql.translator.AqlTranslator.rewriteCompileQuery(AqlTranslator.java:1839)
Original issue reported on code.google.com by sjaco...@ucr.edu on 28 Apr 2015 at 9:25
Original issue reported on code.google.com by
sjaco...@ucr.edu
on 28 Apr 2015 at 9:25