From drill-user-return-564-apmail-incubator-drill-user-archive=incubator.apache.org@incubator.apache.org Sun Aug 10 04:55:33 2014 Return-Path: X-Original-To: apmail-incubator-drill-user-archive@minotaur.apache.org Delivered-To: apmail-incubator-drill-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 210631137B for ; Sun, 10 Aug 2014 04:55:32 +0000 (UTC) Received: (qmail 82616 invoked by uid 500); 10 Aug 2014 04:55:32 -0000 Delivered-To: apmail-incubator-drill-user-archive@incubator.apache.org Received: (qmail 82551 invoked by uid 500); 10 Aug 2014 04:55:32 -0000 Mailing-List: contact drill-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: drill-user@incubator.apache.org Delivered-To: mailing list drill-user@incubator.apache.org Received: (qmail 82539 invoked by uid 99); 10 Aug 2014 04:55:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Aug 2014 04:55:31 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gcaidu-user@m.gmane.org designates 80.91.229.3 as permitted sender) Received: from [80.91.229.3] (HELO plane.gmane.org) (80.91.229.3) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Aug 2014 04:55:05 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XGL9r-0007Jj-FV for drill-user@incubator.apache.org; Sun, 10 Aug 2014 06:55:03 +0200 Received: from d210-49-169-150.sun801.vic.optusnet.com.au ([210.49.169.150]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 10 Aug 2014 06:55:03 +0200 Received: from lmorandini by d210-49-169-150.sun801.vic.optusnet.com.au with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 10 Aug 2014 06:55:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: drill-user@incubator.apache.org From: Luca Morandini Subject: Querying GeoJSON Date: Sun, 10 Aug 2014 14:51:47 +1000 Lines: 57 Message-ID: Reply-To: lmorandini@ieee.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: d210-49-169-150.sun801.vic.optusnet.com.au User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 X-Virus-Checked: Checked by ClamAV on apache.org I put Drill to the test on GeoJSON data (GeoJSON is, as the name implies, a way to serialize geo-spatial data in JSON, see an example at the end of this post), but found an issue. The trouble is that geometry features are held in a vector, which is where all the selection should happen, but how I have to figure out how to do it. I tried this statement: select t.features.properties.name from dfs.`/opt/drill/sample-data/geo2.json` t; but... Query failed: Failure while running fragment. org.apache.drill.exec.vector.complex.RepeatedMapVector cannot be cast to org.apache.drill.exec.vector.complex.MapVector [4098f044-ebba-4ca4-8bec-c8b2760dd2ec] Error: exception while executing query: Failure while trying to get next result batch. (state=,code=0) While, specifying the vector index works as expected: select t.features[0].properties.name from dfs.`/opt/drill/sample-data/geo2.json` t; Help appreciated, Luca Morandini Data Architect - AURIN project Melbourne eResearch Group Department of Computing and Information Systems University of Melbourne Tel. +61 03 903 58 380 Skype: lmorandini { "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": {"type": "Point", "coordinates": [-75.343, 39.984]}, "properties": { "name": "Location A", "category": "Store" } }, { "type": "Feature", "geometry": {"type": "Point", "coordinates": [-75.833, 39.284]}, "properties": { "name": "Location B", "category": "House" } }, { "type": "Feature", "geometry": {"type": "Point", "coordinates": [ -75.534, 39.123]}, "properties": { "name": "Location C", "category": "Office" } } ] }