Confusing ARP JDBC Error Message

I’ve been seeing a JDBC error recently, “Query cancelled by user”. I’ve seen it from both MS SQL and Snowflake. In my query I’m joining several datasets together from different platforms, so Dremio is running parts of the query in parallel, distributing the data across the provisioned cluster, and doing joins.

When I look at the log, it looks like what actually happens is that a previous Hash Distribution step fails, and so Dremio properly tells other steps happening in parallel to cancel, but when it does this the “Cancelled by user” error gets thrown from the JDBC driver, which leads Dremio to report that as the cause of the query failure, instead of the actual root cause, which is pretty well hidden in logs.

I don’t have good steps to reproduce this, it seems to show up from time to time when we cross join between JDBC datasets and other platforms.