From issues-return-49143-archive-asf-public=cust-asf.ponee.io@drill.apache.org Thu Jan 25 13:59:05 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id D7057180651 for ; Thu, 25 Jan 2018 13:59:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C7340160C4F; Thu, 25 Jan 2018 12:59:05 +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 18EA2160C13 for ; Thu, 25 Jan 2018 13:59:04 +0100 (CET) Received: (qmail 77994 invoked by uid 500); 25 Jan 2018 12:59:04 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 77985 invoked by uid 99); 25 Jan 2018 12:59:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jan 2018 12:59:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id D9BEB180893 for ; Thu, 25 Jan 2018 12:59:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -108.711 X-Spam-Level: X-Spam-Status: No, score=-108.711 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id mO4wKVEjsrTn for ; Thu, 25 Jan 2018 12:59:02 +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 71E825F23E for ; Thu, 25 Jan 2018 12:59:02 +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 E2D70E01A8 for ; Thu, 25 Jan 2018 12:59:01 +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 1FA2221301 for ; Thu, 25 Jan 2018 12:59:00 +0000 (UTC) Date: Thu, 25 Jan 2018 12:59:00 +0000 (UTC) From: "Duarte Silva (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-6107) NullPointerException while querying MongoDB collection MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DRILL-6107?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Duarte Silva updated DRILL-6107: -------------------------------- Description:=20 I have installed Drill and configured it to connect to a MongoDB instance. = That instance as a collection with a single document. When I query that col= lection using: {code:sql} select ports from mongo.ivre.hosts;{code} It fails with a NullPointerException.=C2=A0I'm able to query that collectio= n as long as I don't select the "ports" property. Looking at the exception = stack trace and respective Drill code=C2=A0it is clear that the "map" varia= ble isn't suppose to be "null". {code:java} public MapOrListWriter list(final String name) { assert map !=3D null; return new MapOrListWriterImpl(map.list(name)); } {code} I couldn't figure out=C2=A0why it wasn't being initialized. I have attached= the log and the collection BSON file. Thanks in advance. was: I have installed Drill and configured it to connect to a MongoDB instance. = That instance as a collection with a single document. When I query that col= lection using: {code:sql} select ports from mongo.ivre.hosts;{code} It fails with a NullPointerException.=C2=A0I'm able to query that collectio= n as long as I don't select the "ports" property. Looking at the exception = stack trace and respective Drill code=C2=A0it is clear that the "map" varia= ble isn't supposed to be "null". {code:java} public MapOrListWriter list(final String name) { assert map !=3D null; return new MapOrListWriterImpl(map.list(name)); } {code} I couldn't figure out=C2=A0why it wasn't being initialized. I have attached= the log and the collection BSON file. Thanks in advance. > NullPointerException while querying MongoDB collection > ------------------------------------------------------ > > Key: DRILL-6107 > URL: https://issues.apache.org/jira/browse/DRILL-6107 > Project: Apache Drill > Issue Type: Bug > Components: Server > Affects Versions: 1.11.0, 1.12.0 > Environment: Drill=C2=A0specific > {noformat} > export DRILL_HEAP=3D${DRILL_HEAP:-"1G"} > export DRILL_MAX_DIRECT_MEMORY=3D${DRILL_MAX_DIRECT_MEMORY:-"2G"} > {noformat} > Other > {noformat} > Memory: 8 GiB > Processor: 2 VCPU (Intel i7) > Disk: 19 GiB (13 GiB free) > OS: Ubuntu 16.06 > Java: OpenJDK 1.8.0_151 > {noformat} > Reporter: Duarte Silva > Priority: Major > Attachments: collection.bson.log, drillbit.log > > > I have installed Drill and configured it to connect to a MongoDB instance= . That instance as a collection with a single document. When I query that c= ollection using: > {code:sql} > select ports from mongo.ivre.hosts;{code} > It fails with a NullPointerException.=C2=A0I'm able to query that collect= ion as long as I don't select the "ports" property. Looking at the exceptio= n stack trace and respective Drill code=C2=A0it is clear that the "map" var= iable isn't suppose to be "null". > {code:java} > public MapOrListWriter list(final String name) { > assert map !=3D null; > return new MapOrListWriterImpl(map.list(name)); > } > {code} > I couldn't figure out=C2=A0why it wasn't being initialized. I have attach= ed the log and the collection BSON file. Thanks in advance. -- This message was sent by Atlassian JIRA (v7.6.3#76005)