BITMAP_ANDNOT

Learn how to use the BITMAP_ANDNOT bitmap function in PlaidCloud Lakehouse. Returns the difference of two bitmaps (elements in first but not second).

Returns the difference of two bitmaps (elements in first but not second).

Analyze Syntax

func.bitmap_andnot(<bm1>, <bm2>)

Analyze Examples

func.bitmap_andnot(get_column(table, 'bm1'), get_column(table, 'bm2'))

┌──────────┐
 (bitmap) 
└──────────┘

SQL Syntax

BITMAP_ANDNOT(<bm1>, <bm2>)

SQL Examples

SELECT BITMAP_TO_STRING(BITMAP_ANDNOT(
  BITMAP_FROM_STRING('1,2,3'), BITMAP_FROM_STRING('2,3')));

┌───┐
 1 
└───┘