# Bug: Queries running perfectly fine are suddenly returning NullPointerException

**URL:** <https://community.dremio.com/t/bug-queries-running-perfectly-fine-are-suddenly-returning-nullpointerexception/4721>\
**Category:** Uncategorized\
**Created:** [December 9, 2019, 10:38am UTC](https://community.dremio.com/t/bug-queries-running-perfectly-fine-are-suddenly-returning-nullpointerexception/4721 "2019-12-09T10:38:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joejk](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/joejk/32/1446_2.png) [@joejk](https://community.dremio.com/u/joejk)\
**Post date:** [December 9, 2019, 10:38am UTC](https://community.dremio.com/t/bug-queries-running-perfectly-fine-are-suddenly-returning-nullpointerexception/4721/1 "2019-12-09T10:38:50Z")

</div>

Woke up today morning to multiple scheduled queries returning **NullPointerException**.  
I found that queries with where expression of X not in (a,b,c) run into this problem. It works if I remove that condition.  
Here’s a job profile with the bug.  
[137f82a8-da14-43b8-86d9-7dbc7333e5cf.zip](https://community.dremio.com/uploads/short-url/vbbAu1QpcCwc3ELuipeWXllNHGO.zip) (68.4 KB)

Here’s a job profile where I changed the query to work around the bug. But this is far slower for me.  
[97e0e259-fb27-416d-9f93-506515ba395e.zip](https://community.dremio.com/uploads/short-url/buN7UPeJssLWp1i4uQJ78H9gAi9.zip) (95.2 KB)

This bug is when I run the query on a cluster with 1 coordinator and 3 executors (12GB each).  
I have another cluster with 1 coordinator and 1 executor (100GB). The query runs without any problem on the single executor cluster.

---

<div class="post-metadata">

**Author:** ![joejk](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/joejk/32/1446_2.png) [@joejk](https://community.dremio.com/u/joejk)\
**Post date:** [December 9, 2019, 1:27pm UTC](https://community.dremio.com/t/bug-queries-running-perfectly-fine-are-suddenly-returning-nullpointerexception/4721/2 "2019-12-09T13:27:03Z")

</div>

Would this be causing the bug?  
[https://docs.dremio.com/release-notes/4-release-notes.html#nested-loop-join](https://docs.dremio.com/release-notes/4-release-notes.html#nested-loop-join)
