bitmap_count() function's output is different in databricks compared to snowflake

vigneshp
New Contributor

I have found that the results of the bitmap_count() function output differs significantly between databricks and snowflake.

eg: snowflake returns a value of '1' for this code. "select bitmap_count(X'0001056c000000000000') "

vigneshp_1-1701992518337.png

 

while  Databricks returns a value of '7' . 

vigneshp_0-1701992493192.png

 

does anyone know the reason for this difference? Am I doing anything wrong here? This is part of a migration project. 

Similar to the bitmap_count() function , the bitmap_or_agg() function also works differently, it databricks it pads a lot of zeroes at the end.