Return-Path: X-Original-To: apmail-asterixdb-notifications-archive@minotaur.apache.org Delivered-To: apmail-asterixdb-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ED41918D1B for ; Sun, 14 Feb 2016 06:10:20 +0000 (UTC) Received: (qmail 22139 invoked by uid 500); 14 Feb 2016 06:10:20 -0000 Delivered-To: apmail-asterixdb-notifications-archive@asterixdb.apache.org Received: (qmail 22103 invoked by uid 500); 14 Feb 2016 06:10:20 -0000 Mailing-List: contact notifications-help@asterixdb.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.incubator.apache.org Delivered-To: mailing list notifications@asterixdb.incubator.apache.org Received: (qmail 22093 invoked by uid 99); 14 Feb 2016 06:10:20 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Feb 2016 06:10:20 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 6240BC0072 for ; Sun, 14 Feb 2016 06:10:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.226 X-Spam-Level: X-Spam-Status: No, score=-3.226 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.006] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 6cbmIG_Erbji for ; Sun, 14 Feb 2016 06:10:19 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with SMTP id 15D5D5FC11 for ; Sun, 14 Feb 2016 06:10:18 +0000 (UTC) Received: (qmail 22083 invoked by uid 99); 14 Feb 2016 06:10:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Feb 2016 06:10:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 2B5322C14F0 for ; Sun, 14 Feb 2016 06:10:18 +0000 (UTC) Date: Sun, 14 Feb 2016 06:10:18 +0000 (UTC) From: "Till Westmann (JIRA)" To: notifications@asterixdb.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ASTERIXDB-1161) NullPointerException when rewriting the spatial-intersect query with an RTree index involved MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ASTERIXDB-1161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15146395#comment-15146395 ] Till Westmann commented on ASTERIXDB-1161: ------------------------------------------ @Taewoo I'm a little confused about the 2 statements. Is it fixed, if we don't have the left-outer-unnestmap? > NullPointerException when rewriting the spatial-intersect query with an RTree index involved > -------------------------------------------------------------------------------------------- > > Key: ASTERIXDB-1161 > URL: https://issues.apache.org/jira/browse/ASTERIXDB-1161 > Project: Apache AsterixDB > Issue Type: Bug > Components: Optimizer > Reporter: Jianfeng Jia > Assignee: Taewoo Kim > > The following AQL will throw an NPE: > ------------------------------------- > drop dataverse test if exists; > create dataverse test; > use dataverse test; > create type TPoly as open{ > id: int64, > geometry: polygon > } > create dataset Polygons(TPoly) primary key id; > create index geoRtree on Polygons(geometry) type rtree; > create type TSample as closed { > id : int64, > location : point > } > create dataset Sample(TSample) primary key id; > insert into dataset Polygons ( [{ "id":1, "geometry": polygon("-1.2,130.0 -214000.0,2.15 -350.0,3.6 -0.0046,4.81")}]) > insert into dataset Sample ( [ {"id": 1, "location" : point("0,0")}] ) > for $s in dataset Sample limit 1 return {"ids": $s.id, > "idp": for $p in dataset Polygons where spatial-intersect($s.location, $p.geometry) return $p.id > } > --------------------------------- > NPE: > ---------------------------------- > java.lang.NullPointerException > at org.apache.asterix.om.util.NonTaggedFormatUtil.isOptional(NonTaggedFormatUtil.java:96) > at org.apache.asterix.metadata.entities.Index.getNonNullableType(Index.java:137) > at org.apache.asterix.optimizer.rules.am.AbstractIntroduceAccessMethodRule.isMatched(AbstractIntroduceAccessMethodRule.java:323) > at org.apache.asterix.optimizer.rules.am.AbstractIntroduceAccessMethodRule.pruneIndexCandidates(AbstractIntroduceAccessMethodRule.java:275) > at org.apache.asterix.optimizer.rules.am.AbstractIntroduceAccessMethodRule.pruneIndexCandidates(AbstractIntroduceAccessMethodRule.java:119) > at org.apache.asterix.optimizer.rules.am.IntroduceJoinAccessMethodRule.rewritePost(IntroduceJoinAccessMethodRule.java:140) > at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:126) > at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:100) > at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:100) > at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:100) > at org.apache.hyracks.algebricks.compiler.rewriter.rulecontrollers.SequentialFixpointRuleController.rewriteWithRuleCollection(SequentialFixpointRuleController.java:53) > at org.apache.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.runOptimizationSets(HeuristicOptimizer.java:95) > at org.apache.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.optimize(HeuristicOptimizer.java:82) > at org.apache.hyracks.algebricks.compiler.api.HeuristicCompilerFactoryBuilder$1$1.optimize(HeuristicCompilerFactoryBuilder.java:87) > at org.apache.asterix.api.common.APIFramework.compileQuery(APIFramework.java:279) > at org.apache.asterix.aql.translator.AqlTranslator.rewriteCompileQuery(AqlTranslator.java:1900) > at org.apache.asterix.aql.translator.AqlTranslator.handleQuery(AqlTranslator.java:2480) > at org.apache.asterix.aql.translator.AqlTranslator.compileAndExecute(AqlTranslator.java:385) > at org.apache.asterix.api.http.servlet.APIServlet.doPost(APIServlet.java:114) > --------------------------- > However, it won't be any problem if the ddl doesn't contain a RTree index. > E.g. if we comment out this line in the above query it will work fine. > // create index geoRtree on Polygons(geometry) type rtree; -- This message was sent by Atlassian JIRA (v6.3.4#6332)