For a similar issue, see the following article in the Microsoft Knowledge Base:
3052167 FIX: Error 1205 when you execute parallel query that contains outer join operators in SQL Server 2014
Symptoms
Assume that you have a table that has columnstore indexes in Microsoft SQL Server 2014 or 2016. When you execute a query plan that has a Nested Loop join between two Hash joins working in batch mode, an intra-query deadlock may occur.
Resolution
Service pack information
This issue was fixed in the SQL Server 2016 Service Pack 1 (SP1). See the SQL Server 2016 build versions.
Cumulative update information
This issue is fixed in the following cumulative updates for SQL Server:Cumulative Update 2 for SQL Server 2016 SP1 Cumulative Update 4 for SQL Server 2016
Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:
SQL Server 2016 This issue is fixed in On-demand hotfix for SQL Server 2016 CU2.
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
References
Learn about the terminology that Microsoft uses to describe software updates.