cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Databricks inconsistent count and select

shanisolomon
New Contributor

Hi, 

I have a table with 2 versions:

1. Add txn: path = "a.parquet" numRecords = 10 deletionVector = null

2. Add txn: path = "a.parquet" numRecords = 10 deletionVector = (..., cardinality = 2)

Please note both transactions point to the same physical path ("a.parquet"), without any remove transaction.

From my understanding of the delta protocol, since the above are 2 separate logical files residing in two different versions, the above describes a legal delta table.

When querying the table using databricks, I'm seeing inconsistent results:

1. Select * from table - returns 18 rows (as expected)

2. Select count(*) from table - returns count = 8

It seems like count(*) is ignoring the first add transaction.

Could you please settle this? is there indeed a bug with count(*) calculation?

Thanks,

Shani

2 REPLIES 2

Walter_C
Databricks Employee
Databricks Employee

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?

Thanks, Walter.

I do not have a support contract. I observed this bug using Azure databricks, and wanted to bring it to your attention.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group