Databricks Spark SQL Query Error from Sigma

Keith Wong 0 Reputation points
2025-04-24T23:34:36.28+00:00

MDB SQL ERROR.txt

We need some help troubleshooting and issues we are having. One of our queries is not running in sigma, but the error is coming from the Databricks side. Here is the error message below.

Databricks: execution error: failed to execute query: unexpected operation state ERROR_STATE: [INTERNAL_ERROR] The Spark SQL phase optimization failed with an internal error. You hit a bug in Spark or the Spark plugins you use. Please, report this bug to the corresponding communities or vendors, and provide the full stack trace. SQLSTATE: XX000

I went through the sigma support channel already in depth and they said the error is from Databricks end so there was nothing further they could do. I tried running the query in Databricks directly and got the same result. Could you please help us figure out the issue?

I have attached the query in a text file.

Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
2,413 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.