<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Internal Error During Spark SQL Phase Optimization – Possible Bug in Spark/Databricks Runtime in Warehousing &amp; Analytics</title>
    <link>https://community.databricks.com/t5/warehousing-analytics/internal-error-during-spark-sql-phase-optimization-possible-bug/m-p/122504#M2134</link>
    <description>&lt;P&gt;&lt;STRONG&gt;Check Databricks runtime version:&lt;/STRONG&gt;&lt;BR /&gt;If possible, upgrade to the latest Databricks runtime, as internal errors are sometimes fixed in newer versions.&lt;/P&gt;</description>
    <pubDate>Mon, 23 Jun 2025 07:59:06 GMT</pubDate>
    <dc:creator>saurabh18cs</dc:creator>
    <dc:date>2025-06-23T07:59:06Z</dc:date>
    <item>
      <title>Internal Error During Spark SQL Phase Optimization – Possible Bug in Spark/Databricks Runtime</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/internal-error-during-spark-sql-phase-optimization-possible-bug/m-p/122498#M2132</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Bug Summary&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Title:&lt;/STRONG&gt; Spark SQL internal error when executing SQL code in the Azure Databricks SQL Editor&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;span class="lia-unicode-emoji" title=":clipboard:"&gt;📋&lt;/span&gt; Description&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;When executing SQL code in the Azure Databricks SQL Editor, a Spark SQL internal error is returned.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt; Steps to Reproduc&lt;/STRONG&gt;e&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Copy and paste the following code to a new query in Azure Databricks SQL Editor:&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;WITH&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Synergy_Transactions AS&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; SELECT T.TransactionDate&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; , last_day(T.TransactionDate) as EOM_Transaction_Date&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; , T.Status as TransactionStatus&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; , T.ValueTotal as TransactionValueTotal&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; FROM dbw_edp_prd_aue_01.silver02.pm_project_transaction_details T&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; LEFT JOIN dbw_edp_prd_aue_01.silver02.pm_project_master P ON P.ProjectId = T.ProjectId AND P.IsCurrent = true&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; LEFT JOIN dbw_edp_prd_aue_01.silver02.pm_project_stages S ON S.ProjectId = T.ProjectId AND S.IsCurrent = true&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; WHERE P.ProjectNumber &amp;lt;&amp;gt; 'Internal'&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; AND left(P.ProjectNumber,3) NOT IN ('INT','IAD','IPR')&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; AND T.Status IN ('WIP','Draft invoice')&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; AND S.FeeType NOT IN ('No billing')&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; AND T.TransactionDate &amp;gt;= '2023-03-01'&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; AND T.TransactionDate &amp;lt;= '2025-05-31'&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; AND T.IsCurrent = true&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SELECT T.EOM_Transaction_Date&lt;/P&gt;&lt;P&gt;, T.TransactionStatus&lt;/P&gt;&lt;P&gt;, SUM(T.TransactionValueTotal) as WIP&lt;/P&gt;&lt;P&gt;FROM Synergy_Transactions T&lt;/P&gt;&lt;P&gt;GROUP BY T.EOM_Transaction_Date&lt;/P&gt;&lt;P&gt;, T.TransactionStatus&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Click the &lt;STRONG&gt;Run&lt;/STRONG&gt; button to execute code&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;span class="lia-unicode-emoji" title=":magnifying_glass_tilted_left:"&gt;🔍&lt;/span&gt; Expected Result&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The query to run successfully and output aggregated dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;span class="lia-unicode-emoji" title=":cross_mark:"&gt;❌&lt;/span&gt; Actual Result&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The following error is experienced when executing the code:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="julianner_0-1750662110562.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/17687i305FD9BB8508FA1D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="julianner_0-1750662110562.png" alt="julianner_0-1750662110562.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 07:02:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/internal-error-during-spark-sql-phase-optimization-possible-bug/m-p/122498#M2132</guid>
      <dc:creator>julianner</dc:creator>
      <dc:date>2025-06-23T07:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Error During Spark SQL Phase Optimization – Possible Bug in Spark/Databricks Runtime</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/internal-error-during-spark-sql-phase-optimization-possible-bug/m-p/122499#M2133</link>
      <description>&lt;P&gt;Request: I would appreciate assistance with troubleshooting/resolving this problem&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 07:04:21 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/internal-error-during-spark-sql-phase-optimization-possible-bug/m-p/122499#M2133</guid>
      <dc:creator>julianner</dc:creator>
      <dc:date>2025-06-23T07:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Error During Spark SQL Phase Optimization – Possible Bug in Spark/Databricks Runtime</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/internal-error-during-spark-sql-phase-optimization-possible-bug/m-p/122504#M2134</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Check Databricks runtime version:&lt;/STRONG&gt;&lt;BR /&gt;If possible, upgrade to the latest Databricks runtime, as internal errors are sometimes fixed in newer versions.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 07:59:06 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/internal-error-during-spark-sql-phase-optimization-possible-bug/m-p/122504#M2134</guid>
      <dc:creator>saurabh18cs</dc:creator>
      <dc:date>2025-06-23T07:59:06Z</dc:date>
    </item>
  </channel>
</rss>

