<?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 Spark Job fails with No plan for OptimizedForeachBatchFastpath in Administration &amp; Architecture</title>
    <link>https://community.databricks.com/t5/administration-architecture/spark-job-fails-with-no-plan-for-optimizedforeachbatchfastpath/m-p/105372#M2750</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I am trying to run a job on Databricks cluster 14.3LTS which streams data from parquet to custom sink. I am facing below error. The same code used to work a month back, however i am facing this issue recently.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;org.apache.spark.SparkException: [INTERNAL_ERROR] The Spark SQL phase planning 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&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Caused by: java.lang.AssertionError: assertion failed: No plan for OptimizedForeachBatchFastpath&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jan 2025 10:24:36 GMT</pubDate>
    <dc:creator>SravanThotakura</dc:creator>
    <dc:date>2025-01-13T10:24:36Z</dc:date>
    <item>
      <title>Spark Job fails with No plan for OptimizedForeachBatchFastpath</title>
      <link>https://community.databricks.com/t5/administration-architecture/spark-job-fails-with-no-plan-for-optimizedforeachbatchfastpath/m-p/105372#M2750</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I am trying to run a job on Databricks cluster 14.3LTS which streams data from parquet to custom sink. I am facing below error. The same code used to work a month back, however i am facing this issue recently.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;org.apache.spark.SparkException: [INTERNAL_ERROR] The Spark SQL phase planning 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&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Caused by: java.lang.AssertionError: assertion failed: No plan for OptimizedForeachBatchFastpath&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2025 10:24:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/spark-job-fails-with-no-plan-for-optimizedforeachbatchfastpath/m-p/105372#M2750</guid>
      <dc:creator>SravanThotakura</dc:creator>
      <dc:date>2025-01-13T10:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: Spark Job fails with No plan for OptimizedForeachBatchFastpath</title>
      <link>https://community.databricks.com/t5/administration-architecture/spark-job-fails-with-no-plan-for-optimizedforeachbatchfastpath/m-p/105383#M2751</link>
      <description>&lt;P class="_1t7bu9h1 paragraph"&gt;&lt;SPAN&gt;The error you are encountering, &lt;CODE&gt;java.lang.AssertionError: assertion failed: No plan for OptimizedForeachBatchFastpath&lt;/CODE&gt;, appears to be related to a known issue with the &lt;CODE&gt;OptimizedForeachBatchFastpath&lt;/CODE&gt; node in Databricks Runtime (DBR) 14.3 LTS. This issue can occur when using the &lt;CODE&gt;foreachBatch&lt;/CODE&gt; sink in streaming jobs, particularly when Photon is enabled.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="_1t7bu9h1 paragraph"&gt;&lt;SPAN&gt;Here are some steps you can take to mitigate this issue:&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P class="_1t7bu9h1 paragraph"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Disable the Optimized Fast Path for &lt;CODE&gt;foreachBatch&lt;/CODE&gt;&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/P&gt;
&lt;SPAN&gt;You can disable the optimized fast path for &lt;CODE&gt;foreachBatch&lt;/CODE&gt; by setting the following Spark configuration:&lt;/SPAN&gt;
&lt;DIV class="gb5fhw2"&gt;
&lt;PRE&gt;&lt;CODE class="markdown-code-scala _1t7bu9hb hljs language-python gb5fhw3"&gt;spark.conf.&lt;SPAN class="hljs-built_in"&gt;set&lt;/SPAN&gt;(&lt;SPAN class="hljs-string"&gt;"spark.databricks.streaming.forEachBatch.optimized.fastPath.enabled"&lt;/SPAN&gt;, &lt;SPAN class="hljs-string"&gt;"false"&lt;/SPAN&gt;)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;P class="_1t7bu9h1 paragraph"&gt;&lt;SPAN&gt;This can be done at the cluster level in the cluster configuration under Advanced options -&amp;gt; Spark, or within your notebook.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P class="_1t7bu9h1 paragraph"&gt;&lt;STRONG&gt;Disable Photon&lt;/STRONG&gt;: &lt;SPAN&gt;If the issue persists, you can try disabling Photon to see if it resolves the problem. Photon can be disabled in the cluster configuration settings.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Mon, 13 Jan 2025 12:04:06 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/spark-job-fails-with-no-plan-for-optimizedforeachbatchfastpath/m-p/105383#M2751</guid>
      <dc:creator>Walter_C</dc:creator>
      <dc:date>2025-01-13T12:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Spark Job fails with No plan for OptimizedForeachBatchFastpath</title>
      <link>https://community.databricks.com/t5/administration-architecture/spark-job-fails-with-no-plan-for-optimizedforeachbatchfastpath/m-p/105397#M2752</link>
      <description>&lt;P&gt;Thanks. Disabling Photon acceleration on the cluster fixed the issue&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2025 12:44:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/spark-job-fails-with-no-plan-for-optimizedforeachbatchfastpath/m-p/105397#M2752</guid>
      <dc:creator>SravanThotakura</dc:creator>
      <dc:date>2025-01-13T12:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: Spark Job fails with No plan for OptimizedForeachBatchFastpath</title>
      <link>https://community.databricks.com/t5/administration-architecture/spark-job-fails-with-no-plan-for-optimizedforeachbatchfastpath/m-p/105422#M2753</link>
      <description>&lt;P&gt;Great to hear the issue got fixed.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2025 14:04:29 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/spark-job-fails-with-no-plan-for-optimizedforeachbatchfastpath/m-p/105422#M2753</guid>
      <dc:creator>Walter_C</dc:creator>
      <dc:date>2025-01-13T14:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: Spark Job fails with No plan for OptimizedForeachBatchFastpath</title>
      <link>https://community.databricks.com/t5/administration-architecture/spark-job-fails-with-no-plan-for-optimizedforeachbatchfastpath/m-p/132837#M4083</link>
      <description>&lt;P&gt;Disabling the setting worked for me on 16.4 (serverless):&lt;/P&gt;&lt;LI-CODE lang="python"&gt;spark.databricks.streaming.forEachBatch.optimized.fastPath.enabled=false&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;But you have to wonder if this is something Databricks are aware of and are looking to fix.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Sep 2025 13:04:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/spark-job-fails-with-no-plan-for-optimizedforeachbatchfastpath/m-p/132837#M4083</guid>
      <dc:creator>Malthe</dc:creator>
      <dc:date>2025-09-23T13:04:36Z</dc:date>
    </item>
  </channel>
</rss>

