Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 69B91200D49 for ; Fri, 24 Nov 2017 21:31:04 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 626B1160BF2; Fri, 24 Nov 2017 20:31:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A9079160BDA for ; Fri, 24 Nov 2017 21:31:03 +0100 (CET) Received: (qmail 89507 invoked by uid 500); 24 Nov 2017 20:31:02 -0000 Mailing-List: contact notifications-help@asterixdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.apache.org Delivered-To: mailing list notifications@asterixdb.apache.org Received: (qmail 89498 invoked by uid 99); 24 Nov 2017 20:31:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Nov 2017 20:31:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 033441A0FBC for ; Fri, 24 Nov 2017 20:31:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id L8jaVd2fiArl for ; Fri, 24 Nov 2017 20:31:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id CE4015FB91 for ; Fri, 24 Nov 2017 20:31:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 55A16E0A29 for ; Fri, 24 Nov 2017 20:31:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 0B4F3241A0 for ; Fri, 24 Nov 2017 20:31:00 +0000 (UTC) Date: Fri, 24 Nov 2017 20:31:00 +0000 (UTC) From: "Taewoo Kim (JIRA)" To: notifications@asterixdb.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (ASTERIXDB-2176) Deletion doesn't work on the RTree index. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 24 Nov 2017 20:31:04 -0000 [ https://issues.apache.org/jira/browse/ASTERIXDB-2176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Taewoo Kim updated ASTERIXDB-2176: ---------------------------------- Summary: Deletion doesn't work on the RTree index. (was: Upsert doesn't work on the RTree index.) > Deletion doesn't work on the RTree index. > ----------------------------------------- > > Key: ASTERIXDB-2176 > URL: https://issues.apache.org/jira/browse/ASTERIXDB-2176 > Project: Apache AsterixDB > Issue Type: Bug > Reporter: Taewoo Kim > > This is a simplified version of "upsert/primary-secondary-tree" AQL test case. > spatialData.json file > { "id": 12, "point": point("6.0,3.0") } > moreSpatialData.json file > {"id": 12, "point": point("4.1,7.0")} > DDL: > {code} > drop dataverse test if exists; > create dataverse test; > use dataverse test; > create type MyRecord as closed { > id: int64, > point: point > } > create dataset UpsertTo(MyRecord) > primary key id; > create dataset UpsertFrom(MyRecord) > primary key id; > create index rtree_index_point on UpsertTo(point) type rtree; > {code} > DML > {code} > load dataset UpsertTo > using localfs > (("path"="asterix_nc1://data/spatial/spatialData.json"),("format"="adm")); > load dataset UpsertFrom > using localfs > (("path"="asterix_nc1://data/spatial/moreSpatialData.json"),("format"="adm")); > upsert into dataset UpsertTo( > for $x in dataset UpsertFrom > return $x > ); > for $o in dataset('UpsertTo') > where spatial-intersect($o.point, create-polygon([4.0,1.0,4.0,4.0,12.0,4.0,12.0,1.0])) > order by $o.id > return $o; > {code} > This DML returns the new record correctly. But, the issue is that the indexed value in RTree has not been updated. > When searching the rtree_index_point index, the searcher sees the previous value - point("6.0,3.0"), not the new value - point("4.1,7.0"). So, this record will be fetched from the primary index. However, the primary index search returns the updated value and the select() verifies the value. It returns true by coincidence because the new value satisfies the spatial-intersect() condition. > The secondary index search should see the updated value, not the previous value. And this is an issue for the index-only plan case since it only uses the value from a secondary index. > -- This message was sent by Atlassian JIRA (v6.4.14#64029)