Invalid Query Exception

I’m facing a similar problem. I described it on his thread: Dremio jobs taking too long to planning