Duarte Silva created DRILL-6107: ----------------------------------- Summary: 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.12.0, 1.11.0 Environment: Drill specific
{noformat} export DRILL_HEAP=${DRILL_HEAP:-"1G"} export DRILL_MAX_DIRECT_MEMORY=${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 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 collection using: {code:sql} select ports from mongo.ivre.hosts;{code} It fails with a NullPointerException. I'm able to query that collection as long as I don't select the "ports" property. Looking at the exception stack trace and respective Drill code it is clear that the "map" variable isn't supposed to be "null". {code:java} public MapOrListWriter list(final String name) { assert map != null; return new MapOrListWriterImpl(map.list(name)); } {code} I couldn't figure out why it wasn't being initialized. I have attached the log and the collection BSON file. Thanks in advance. -- This message was sent by Atlassian JIRA (v7.6.3#76005)