<?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 Internal Error when querying a doubleType column of a delta table using &amp;quot;&amp;gt;&amp;quot; &amp;quot;&amp;lt;&amp;quot; operators in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/internal-error-when-querying-a-doubletype-column-of-a-delta/m-p/59306#M31367</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;we are currently facing a pretty confusing issue:&lt;/P&gt;&lt;P&gt;We have a delta table (~2TB) which has been working just fine over the last few years and months. For a few days or weeks now, querying the table on one of its columns, let´s call it double_column, from datatype DoubleType, using "&amp;gt;" "&amp;lt;" operators, results in an error.&lt;/P&gt;&lt;P&gt;So a query like...&lt;/P&gt;&lt;P&gt;SELECT * FROM example_table WHERE double_column &amp;gt; 1&lt;/P&gt;&lt;P&gt;... would throw an error, whereas using "==" or "!="... works just fine.&lt;/P&gt;&lt;P&gt;The following error is thrown:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;AssertionError: assertion failed&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&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.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;However, querying an older version of the table works&amp;nbsp; just fine:&lt;/P&gt;&lt;P&gt;SELECT * FROM example_table VERSION AS OF 100 WHERE double_column &amp;gt; 1&lt;/P&gt;&lt;P&gt;...returns the desired result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What´s even more confusing, when we query the latest version of the table using...&lt;/P&gt;&lt;P&gt;SELECT * FROM example_table VERSION AS OF 500 [this is the latest version] WHERE double_column &amp;gt; 1&lt;/P&gt;&lt;P&gt;...it works as well, even though it should query the same state of the table as the first query, right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would be nice if anyone has some suggestions on how to fix this &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;kind regards&lt;BR /&gt;Christoph&lt;/P&gt;</description>
    <pubDate>Mon, 05 Feb 2024 15:56:50 GMT</pubDate>
    <dc:creator>Christoph</dc:creator>
    <dc:date>2024-02-05T15:56:50Z</dc:date>
    <item>
      <title>Internal Error when querying a doubleType column of a delta table using "&gt;" "&lt;" operators</title>
      <link>https://community.databricks.com/t5/data-engineering/internal-error-when-querying-a-doubletype-column-of-a-delta/m-p/59306#M31367</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;we are currently facing a pretty confusing issue:&lt;/P&gt;&lt;P&gt;We have a delta table (~2TB) which has been working just fine over the last few years and months. For a few days or weeks now, querying the table on one of its columns, let´s call it double_column, from datatype DoubleType, using "&amp;gt;" "&amp;lt;" operators, results in an error.&lt;/P&gt;&lt;P&gt;So a query like...&lt;/P&gt;&lt;P&gt;SELECT * FROM example_table WHERE double_column &amp;gt; 1&lt;/P&gt;&lt;P&gt;... would throw an error, whereas using "==" or "!="... works just fine.&lt;/P&gt;&lt;P&gt;The following error is thrown:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;AssertionError: assertion failed&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&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.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;However, querying an older version of the table works&amp;nbsp; just fine:&lt;/P&gt;&lt;P&gt;SELECT * FROM example_table VERSION AS OF 100 WHERE double_column &amp;gt; 1&lt;/P&gt;&lt;P&gt;...returns the desired result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What´s even more confusing, when we query the latest version of the table using...&lt;/P&gt;&lt;P&gt;SELECT * FROM example_table VERSION AS OF 500 [this is the latest version] WHERE double_column &amp;gt; 1&lt;/P&gt;&lt;P&gt;...it works as well, even though it should query the same state of the table as the first query, right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would be nice if anyone has some suggestions on how to fix this &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;kind regards&lt;BR /&gt;Christoph&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 15:56:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/internal-error-when-querying-a-doubletype-column-of-a-delta/m-p/59306#M31367</guid>
      <dc:creator>Christoph</dc:creator>
      <dc:date>2024-02-05T15:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Error when querying a doubleType column of a delta table using "&gt;" "&amp;</title>
      <link>https://community.databricks.com/t5/data-engineering/internal-error-when-querying-a-doubletype-column-of-a-delta/m-p/59461#M31415</link>
      <description>&lt;P&gt;Nice &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;Do you happen to use a Photon cluster?&amp;nbsp; If so, can you run a test without Photon?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2024 12:46:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/internal-error-when-querying-a-doubletype-column-of-a-delta/m-p/59461#M31415</guid>
      <dc:creator>-werners-</dc:creator>
      <dc:date>2024-02-06T12:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Error when querying a doubleType column of a delta table using "&gt;" "&amp;</title>
      <link>https://community.databricks.com/t5/data-engineering/internal-error-when-querying-a-doubletype-column-of-a-delta/m-p/59465#M31417</link>
      <description>&lt;P&gt;No, Photon was not activated on any of the clusters I tried running the queries on.&lt;/P&gt;&lt;P&gt;The easiest solution for this problem is casting the column&amp;nbsp;&lt;SPAN&gt;double_column to FloatType. Then it works as expected again, I coudn´t figure out why though. So this will be our short term fix, but still we would like to understand this issue &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2024 13:13:44 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/internal-error-when-querying-a-doubletype-column-of-a-delta/m-p/59465#M31417</guid>
      <dc:creator>Christoph</dc:creator>
      <dc:date>2024-02-06T13:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Error when querying a doubleType column of a delta table using "&gt;" "&amp;</title>
      <link>https://community.databricks.com/t5/data-engineering/internal-error-when-querying-a-doubletype-column-of-a-delta/m-p/59466#M31418</link>
      <description>&lt;P&gt;it might be a bug which is already logged, or a new one.&amp;nbsp; You can check the Spark Jira pages.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2024 13:22:45 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/internal-error-when-querying-a-doubletype-column-of-a-delta/m-p/59466#M31418</guid>
      <dc:creator>-werners-</dc:creator>
      <dc:date>2024-02-06T13:22:45Z</dc:date>
    </item>
  </channel>
</rss>

