I’m trying to translate SQL server queries that use bitwise AND (&) and bitwise NOT (~) operators but have not found a way to perform them in dremio. Does dremio support bitwise operators?
The following SQL server snippet is sample logic that I’m trying to rewrite:
WHEN CAST(varbinary_value AS INT) & 0x80 = 0x80
THEN do_something
ELSE something_else
@balaji.ramaswamy
Thanks for pointing me in the right direction. Based on examples that I’ve found, looks like bitwise_and() takes integer as input. The variable I’m working with is varbinary, so performing
bitwise_and(cast(varbinary_value AS Integer), 128)
doesn’t work due to the invalid cast. I’m totally new with dremio so apologize for these basic questions.