<?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 Databricks inconsistent count and select in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/databricks-inconsistent-count-and-select/m-p/104444#M41753</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table with 2 versions:&lt;/P&gt;&lt;P&gt;1. Add txn: path = "a.parquet" numRecords = 10 deletionVector = null&lt;/P&gt;&lt;P&gt;2. Add txn: path = "a.parquet" numRecords = 10 deletionVector = (..., cardinality = 2)&lt;/P&gt;&lt;P&gt;Please note both transactions point to the same physical path ("a.parquet"), without any remove transaction.&lt;/P&gt;&lt;P&gt;From my understanding of the delta protocol, since the above are 2 separate logical files residing in two different versions, the above describes a &lt;STRONG&gt;legal&lt;/STRONG&gt; delta table.&lt;/P&gt;&lt;P&gt;When querying the table using databricks, I'm seeing inconsistent results:&lt;/P&gt;&lt;P&gt;1. Select * from table - returns 18 rows (as expected)&lt;/P&gt;&lt;P&gt;2. Select count(*) from table - returns count = 8&lt;/P&gt;&lt;P&gt;It seems like count(*) is ignoring the first add transaction.&lt;/P&gt;&lt;P&gt;Could you please settle this? is there indeed a bug with count(*) calculation?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shani&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jan 2025 23:47:43 GMT</pubDate>
    <dc:creator>shanisolomon</dc:creator>
    <dc:date>2025-01-06T23:47:43Z</dc:date>
    <item>
      <title>Databricks inconsistent count and select</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-inconsistent-count-and-select/m-p/104444#M41753</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table with 2 versions:&lt;/P&gt;&lt;P&gt;1. Add txn: path = "a.parquet" numRecords = 10 deletionVector = null&lt;/P&gt;&lt;P&gt;2. Add txn: path = "a.parquet" numRecords = 10 deletionVector = (..., cardinality = 2)&lt;/P&gt;&lt;P&gt;Please note both transactions point to the same physical path ("a.parquet"), without any remove transaction.&lt;/P&gt;&lt;P&gt;From my understanding of the delta protocol, since the above are 2 separate logical files residing in two different versions, the above describes a &lt;STRONG&gt;legal&lt;/STRONG&gt; delta table.&lt;/P&gt;&lt;P&gt;When querying the table using databricks, I'm seeing inconsistent results:&lt;/P&gt;&lt;P&gt;1. Select * from table - returns 18 rows (as expected)&lt;/P&gt;&lt;P&gt;2. Select count(*) from table - returns count = 8&lt;/P&gt;&lt;P&gt;It seems like count(*) is ignoring the first add transaction.&lt;/P&gt;&lt;P&gt;Could you please settle this? is there indeed a bug with count(*) calculation?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shani&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2025 23:47:43 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-inconsistent-count-and-select/m-p/104444#M41753</guid>
      <dc:creator>shanisolomon</dc:creator>
      <dc:date>2025-01-06T23:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks inconsistent count and select</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-inconsistent-count-and-select/m-p/104445#M41754</link>
      <description>&lt;P&gt;Hello the behavior observed indeed seems to be inconsistent with the expected behavior in delta, do you have a support contract to open a support ticket so this can be further analyzed?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2025 01:42:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-inconsistent-count-and-select/m-p/104445#M41754</guid>
      <dc:creator>Walter_C</dc:creator>
      <dc:date>2025-01-07T01:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks inconsistent count and select</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-inconsistent-count-and-select/m-p/104447#M41755</link>
      <description>&lt;P&gt;Thanks, Walter.&lt;/P&gt;&lt;P&gt;I do not have a support contract. I observed this bug using Azure databricks, and wanted to bring it to your attention.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2025 01:51:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-inconsistent-count-and-select/m-p/104447#M41755</guid>
      <dc:creator>shanisolomon</dc:creator>
      <dc:date>2025-01-07T01:51:39Z</dc:date>
    </item>
  </channel>
</rss>

